Safe Haskell | None |
---|---|
Language | Haskell2010 |
- newtype Uniform typ name = Uniform {
- unUniform :: typ
- newtype In typ name = In {
- unIn :: typ
- newtype Out typ name = Out {
- unOut :: typ
- newtype Const typ = Const {
- unConst :: typ
- type family ReadFrom a where ...
- type family WriteTo a where ...
- class Cast a b where
- type Readable a b = (Socketed (ReadFrom a), Socketed a, Socketed b, ReadFrom a ~ ReadFrom b)
- (+) :: Readable a b => a -> b -> ReadFrom a
- (-) :: Readable a b => a -> b -> ReadFrom a
- (*) :: Readable a b => a -> b -> ReadFrom a
- negate :: (Socketed a, Socketed (ReadFrom a)) => a -> ReadFrom a
- abs :: (Socketed a, Socketed (ReadFrom a)) => a -> ReadFrom a
- signum :: (Socketed a, Socketed (ReadFrom a)) => a -> ReadFrom a
- (/) :: Readable a b => a -> b -> ReadFrom a
- exp :: (Socketed a, Socketed (ReadFrom a)) => a -> ReadFrom a
- log :: (Socketed a, Socketed (ReadFrom a)) => a -> ReadFrom a
- sqrt :: (Socketed a, Socketed (ReadFrom a)) => a -> ReadFrom a
- (**) :: Readable a b => a -> b -> ReadFrom a
- logBase :: Readable a b => a -> b -> ReadFrom a
- sin :: (Socketed a, Socketed (ReadFrom a)) => a -> ReadFrom a
- cos :: (Socketed a, Socketed (ReadFrom a)) => a -> ReadFrom a
- tan :: (Socketed a, Socketed (ReadFrom a)) => a -> ReadFrom a
- asin :: (Socketed a, Socketed (ReadFrom a)) => a -> ReadFrom a
- acos :: (Socketed a, Socketed (ReadFrom a)) => a -> ReadFrom a
- atan :: (Socketed a, Socketed (ReadFrom a)) => a -> ReadFrom a
- sinh :: (Socketed a, Socketed (ReadFrom a)) => a -> ReadFrom a
- cosh :: (Socketed a, Socketed (ReadFrom a)) => a -> ReadFrom a
- tanh :: (Socketed a, Socketed (ReadFrom a)) => a -> ReadFrom a
- asinh :: (Socketed a, Socketed (ReadFrom a)) => a -> ReadFrom a
- acosh :: (Socketed a, Socketed (ReadFrom a)) => a -> ReadFrom a
- atanh :: (Socketed a, Socketed (ReadFrom a)) => a -> ReadFrom a
- (==) :: Readable a b => a -> b -> Xbool
- (/=) :: Readable a b => a -> b -> Xbool
- (<) :: Readable a b => a -> b -> Xbool
- (<=) :: Readable a b => a -> b -> Xbool
- (>) :: Readable a b => a -> b -> Xbool
- (>=) :: Readable a b => a -> b -> Xbool
- max :: Readable a b => a -> b -> ReadFrom a
- min :: Readable a b => a -> b -> ReadFrom a
- normalize :: (Socketed a, Socketed (ReadFrom a)) => a -> ReadFrom a
- dot :: Readable a b => a -> b -> Xfloat
- class Binding a t where
- data GLContext
- class HasContext a where
- uniform_ :: forall t name ts ctx. (KnownSymbol name, Socketed t, KnownTypeSymbol t) => IxShader ctx ts (ts :++ '[Uniform t name]) (Uniform t name)
- in_ :: forall t name ts ctx. (HasContext ctx, KnownSymbol name, Socketed t, KnownTypeSymbol t) => IxShader ctx ts (ts :++ '[In t name]) (In t name)
- out_ :: forall t name ts ctx. (HasContext ctx, KnownSymbol name, Socketed t, KnownTypeSymbol t) => IxShader ctx ts (ts :++ '[Out t name]) (Out t name)
- gl_Position :: forall ts ctx. IxShader ctx ts (ts :++ '[Out Xvec4 "gl_Position"]) (Out Xvec4 "gl_Position")
- type family GLFragName (a :: GLContext) where ...
- gl_FragColor :: forall ctx ts. (HasContext ctx, KnownSymbol (GLFragName ctx)) => IxShader ctx ts (ts :++ '[Out Xvec4 (GLFragName ctx)]) (Out Xvec4 (GLFragName ctx))
- gl_FragCoord :: Xvec4
Documentation
type Readable a b = (Socketed (ReadFrom a), Socketed a, Socketed b, ReadFrom a ~ ReadFrom b) Source #
class Binding a t where Source #
getVertexBinding :: t Source #
getUniformBinding :: t Source #
Binding [k] ([] k) [t] Source # | |
(Binding a a1 t, Binding [a] as [t]) => Binding [a] ((:) a a1 as) [t] Source # | |
Binding * (Out k a b) (Maybe String) Source # | |
KnownSymbol b => Binding * (In Symbol a b) (Maybe String) Source # | |
KnownSymbol b => Binding * (Uniform Symbol a b) (Maybe String) Source # | |
Binding * (Function k k1 k2 a b c) (Maybe String) Source # | |
Some glsl evaluation contexts. This is used to choose alternate syntax in
cases where shader code differs between contexts, for example the in
keyword
is not available on glsl bound for a webgl context, and should be replaced
with attribute
.
class HasContext a where Source #
An easy way to get the term level value of a type of kind GLContext
.
uniform_ :: forall t name ts ctx. (KnownSymbol name, Socketed t, KnownTypeSymbol t) => IxShader ctx ts (ts :++ '[Uniform t name]) (Uniform t name) Source #
in_ :: forall t name ts ctx. (HasContext ctx, KnownSymbol name, Socketed t, KnownTypeSymbol t) => IxShader ctx ts (ts :++ '[In t name]) (In t name) Source #
out_ :: forall t name ts ctx. (HasContext ctx, KnownSymbol name, Socketed t, KnownTypeSymbol t) => IxShader ctx ts (ts :++ '[Out t name]) (Out t name) Source #
gl_Position :: forall ts ctx. IxShader ctx ts (ts :++ '[Out Xvec4 "gl_Position"]) (Out Xvec4 "gl_Position") Source #
type family GLFragName (a :: GLContext) where ... Source #
GLFragName OpenGLContext = "fragColor" | |
GLFragName WebGLContext = "gl_FragColor" |
gl_FragColor :: forall ctx ts. (HasContext ctx, KnownSymbol (GLFragName ctx)) => IxShader ctx ts (ts :++ '[Out Xvec4 (GLFragName ctx)]) (Out Xvec4 (GLFragName ctx)) Source #
gl_FragCoord :: Xvec4 Source #