module Graphics.HaGL.GLObj (
GLObj(..),
Graphics.HaGL.GLObj.PrimitiveMode,
GLObjException(..)
) where
import Control.Exception (Exception)
import qualified Graphics.Rendering.OpenGL.GL.PrimitiveMode (PrimitiveMode)
import Graphics.HaGL.Numerical (Vec)
import Graphics.HaGL.GLType
import Graphics.HaGL.GLExpr
data GLObj = GLObj {
GLObj -> PrimitiveMode
primitiveMode :: PrimitiveMode,
GLObj -> Maybe [ConstExpr UInt]
indices :: Maybe [ConstExpr UInt],
GLObj -> VertExpr (Vec 4 Float)
position :: VertExpr (Vec 4 Float),
GLObj -> FragExpr (Vec 4 Float)
color :: FragExpr (Vec 4 Float),
GLObj -> FragExpr Bool
discardWhen :: FragExpr Bool
}
type PrimitiveMode =
Graphics.Rendering.OpenGL.GL.PrimitiveMode.PrimitiveMode
data GLObjException =
NoInputVars |
EmptyInputVar |
MismatchedInputVars
deriving GLObjException -> GLObjException -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GLObjException -> GLObjException -> Bool
$c/= :: GLObjException -> GLObjException -> Bool
== :: GLObjException -> GLObjException -> Bool
$c== :: GLObjException -> GLObjException -> Bool
Eq
instance Show GLObjException where
show :: GLObjException -> String
show GLObjException
NoInputVars = String
"Attempted to process a GLObj containing no input variables"
show GLObjException
EmptyInputVar = String
"Input variable initialized using empty list"
show GLObjException
MismatchedInputVars = String
"Dimensions of input variables do not match"
instance Exception GLObjException