gi-clutter-1.0.5: clutter GObject bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Clutter.Objects.ShaderEffect

Description

The ShaderEffect structure contains only private data and should be accessed using the provided API

Since: 1.4

Synopsis

Exported types

newtype ShaderEffect Source #

Memory-managed wrapper type.

Constructors

ShaderEffect (ManagedPtr ShaderEffect) 

Instances

Instances details
Eq ShaderEffect Source # 
Instance details

Defined in GI.Clutter.Objects.ShaderEffect

GObject ShaderEffect Source # 
Instance details

Defined in GI.Clutter.Objects.ShaderEffect

ManagedPtrNewtype ShaderEffect Source # 
Instance details

Defined in GI.Clutter.Objects.ShaderEffect

Methods

toManagedPtr :: ShaderEffect -> ManagedPtr ShaderEffect

TypedObject ShaderEffect Source # 
Instance details

Defined in GI.Clutter.Objects.ShaderEffect

Methods

glibType :: IO GType

HasParentTypes ShaderEffect Source # 
Instance details

Defined in GI.Clutter.Objects.ShaderEffect

IsGValue (Maybe ShaderEffect) Source #

Convert ShaderEffect to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Clutter.Objects.ShaderEffect

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe ShaderEffect -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe ShaderEffect)

type ParentTypes ShaderEffect Source # 
Instance details

Defined in GI.Clutter.Objects.ShaderEffect

type ParentTypes ShaderEffect = '[OffscreenEffect, Effect, ActorMeta, Object]

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

Instances details
(GObject o, IsDescendantOf ShaderEffect o) => IsShaderEffect o Source # 
Instance details

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

getProgram

shaderEffectGetProgram Source #

Arguments

:: (HasCallStack, MonadIO m, IsShaderEffect a) 
=> a

effect: a ShaderEffect

-> m (Ptr ())

Returns: a pointer to the program's handle, or COGL_INVALID_HANDLE

Retrieves a pointer to the program's handle

Since: 1.4

getShader

shaderEffectGetShader Source #

Arguments

:: (HasCallStack, MonadIO m, IsShaderEffect a) 
=> a

effect: a ShaderEffect

-> m (Ptr ())

Returns: a pointer to the shader's handle, or COGL_INVALID_HANDLE

Retrieves a pointer to the shader's handle

Since: 1.4

new

shaderEffectNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ShaderType

shaderType: the type of the shader, either ShaderTypeFragmentShader, or ShaderTypeVertexShader

-> m ShaderEffect

Returns: the newly created ShaderEffect. Use objectUnref when done.

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 #

Arguments

:: (HasCallStack, MonadIO m, IsShaderEffect a) 
=> a

effect: a ShaderEffect

-> Text

source: the source of a GLSL shader

-> m Bool

Returns: True if the source was set

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 #

Arguments

:: (HasCallStack, MonadIO m, IsShaderEffect a) 
=> a

effect: a ShaderEffect

-> Text

name: the name of the uniform to set

-> GValue

value: a Value with the value of the uniform to set

-> 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.