Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
The ShaderEffect
structure contains
only private data and should be accessed using the provided API
Since: 1.4
Synopsis
- newtype ShaderEffect = ShaderEffect (ManagedPtr ShaderEffect)
- class (GObject o, IsDescendantOf ShaderEffect o) => IsShaderEffect o
- toShaderEffect :: (MonadIO m, IsShaderEffect o) => o -> m ShaderEffect
- shaderEffectGetProgram :: (HasCallStack, MonadIO m, IsShaderEffect a) => a -> m (Ptr ())
- shaderEffectGetShader :: (HasCallStack, MonadIO m, IsShaderEffect a) => a -> m (Ptr ())
- shaderEffectNew :: (HasCallStack, MonadIO m) => ShaderType -> m ShaderEffect
- shaderEffectSetShaderSource :: (HasCallStack, MonadIO m, IsShaderEffect a) => a -> Text -> m Bool
- shaderEffectSetUniformValue :: (HasCallStack, MonadIO m, IsShaderEffect a) => a -> Text -> GValue -> m ()
- constructShaderEffectShaderType :: (IsShaderEffect o, MonadIO m) => ShaderType -> m (GValueConstruct o)
Exported types
newtype ShaderEffect Source #
Memory-managed wrapper type.
ShaderEffect (ManagedPtr ShaderEffect) |
Instances
Eq ShaderEffect Source # | |
Defined in GI.Clutter.Objects.ShaderEffect (==) :: ShaderEffect -> ShaderEffect -> Bool # (/=) :: ShaderEffect -> ShaderEffect -> Bool # | |
GObject ShaderEffect Source # | |
Defined in GI.Clutter.Objects.ShaderEffect | |
ManagedPtrNewtype ShaderEffect Source # | |
Defined in GI.Clutter.Objects.ShaderEffect toManagedPtr :: ShaderEffect -> ManagedPtr ShaderEffect | |
TypedObject ShaderEffect Source # | |
Defined in GI.Clutter.Objects.ShaderEffect | |
HasParentTypes ShaderEffect Source # | |
Defined in GI.Clutter.Objects.ShaderEffect | |
IsGValue (Maybe ShaderEffect) Source # | Convert |
Defined in GI.Clutter.Objects.ShaderEffect gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe ShaderEffect -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe ShaderEffect) | |
type ParentTypes ShaderEffect Source # | |
Defined in GI.Clutter.Objects.ShaderEffect |
class (GObject o, IsDescendantOf ShaderEffect o) => IsShaderEffect o Source #
Type class for types which can be safely cast to ShaderEffect
, for instance with toShaderEffect
.
Instances
(GObject o, IsDescendantOf ShaderEffect o) => IsShaderEffect o Source # | |
Defined in GI.Clutter.Objects.ShaderEffect |
toShaderEffect :: (MonadIO m, IsShaderEffect o) => o -> m ShaderEffect Source #
Cast to ShaderEffect
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, createTexture, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, paintTarget, queueRepaint, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getActor, getData, getEnabled, getName, getProgram, getProperty, getQdata, getShader, getTarget, getTargetRect, getTargetSize, getTexture.
Setters
setData, setDataFull, setEnabled, setName, setProperty, setShaderSource, setUniformValue.
getProgram
shaderEffectGetProgram Source #
:: (HasCallStack, MonadIO m, IsShaderEffect a) | |
=> a |
|
-> m (Ptr ()) | Returns: a pointer to the program's handle,
or |
Retrieves a pointer to the program's handle
Since: 1.4
getShader
shaderEffectGetShader Source #
:: (HasCallStack, MonadIO m, IsShaderEffect a) | |
=> a |
|
-> m (Ptr ()) | Returns: a pointer to the shader's handle,
or |
Retrieves a pointer to the shader's handle
Since: 1.4
new
:: (HasCallStack, MonadIO m) | |
=> ShaderType |
|
-> m ShaderEffect | Returns: the newly created |
Creates a new ShaderEffect
, to be applied to an actor using
actorAddEffect
.
The effect will be empty until shaderEffectSetShaderSource
is called.
Since: 1.8
setShaderSource
shaderEffectSetShaderSource Source #
:: (HasCallStack, MonadIO m, IsShaderEffect a) | |
=> a |
|
-> Text |
|
-> m Bool | Returns: |
Sets the source of the GLSL shader used by effect
This function should only be called by implementations of
the ShaderEffect
class, and not by application code.
This function can only be called once; subsequent calls will yield no result.
Since: 1.4
setUniformValue
shaderEffectSetUniformValue Source #
:: (HasCallStack, MonadIO m, IsShaderEffect a) | |
=> a |
|
-> Text |
|
-> GValue |
|
-> m () |
Sets value
as the payload for the uniform name
inside the shader
effect
The GType
of the value
must be one of: G_TYPE_INT
, for a single
integer value; G_TYPE_FLOAT
, for a single floating point value;
CLUTTER_TYPE_SHADER_INT
, for an array of integer values;
CLUTTER_TYPE_SHADER_FLOAT
, for an array of floating point values;
and CLUTTER_TYPE_SHADER_MATRIX
, for a matrix of floating point
values. It also accepts G_TYPE_DOUBLE
for compatibility with other
languages than C.
Since: 1.4
Properties
shaderType
The type of shader that is used by the effect. This property
should be set by the constructor of ShaderEffect
sub-classes.
Since: 1.4
constructShaderEffectShaderType :: (IsShaderEffect o, MonadIO m) => ShaderType -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “shader-type
” property. This is rarely needed directly, but it is used by new
.