gi-clutter-1.0.3: 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.Shader

Description

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

Since: 0.6

Synopsis

Exported types

newtype Shader Source #

Memory-managed wrapper type.

Constructors

Shader (ManagedPtr Shader) 

Instances

Instances details
Eq Shader Source # 
Instance details

Defined in GI.Clutter.Objects.Shader

Methods

(==) :: Shader -> Shader -> Bool #

(/=) :: Shader -> Shader -> Bool #

GObject Shader Source # 
Instance details

Defined in GI.Clutter.Objects.Shader

ManagedPtrNewtype Shader Source # 
Instance details

Defined in GI.Clutter.Objects.Shader

Methods

toManagedPtr :: Shader -> ManagedPtr Shader

TypedObject Shader Source # 
Instance details

Defined in GI.Clutter.Objects.Shader

Methods

glibType :: IO GType

HasParentTypes Shader Source # 
Instance details

Defined in GI.Clutter.Objects.Shader

IsGValue (Maybe Shader) Source #

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

Instance details

Defined in GI.Clutter.Objects.Shader

Methods

gvalueGType_ :: IO GType

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

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

type ParentTypes Shader Source # 
Instance details

Defined in GI.Clutter.Objects.Shader

type ParentTypes Shader = '[Object]

class (GObject o, IsDescendantOf Shader o) => IsShader o Source #

Type class for types which can be safely cast to Shader, for instance with toShader.

Instances

Instances details
(GObject o, IsDescendantOf Shader o) => IsShader o Source # 
Instance details

Defined in GI.Clutter.Objects.Shader

toShader :: (MonadIO m, IsShader o) => o -> m Shader Source #

Cast to Shader, for types for which this is known to be safe. For general casts, use castTo.

Methods

compile

shaderCompile Source #

Arguments

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

shader: a Shader

-> m ()

(Can throw GError)

Deprecated: (Since version 1.8)Use ShaderEffect instead.

Compiles and links GLSL sources set for vertex and fragment shaders for a Shader. If the compilation fails and a GError return location is provided the error will contain the errors from the compiler, if any.

Since: 0.8

getCoglFragmentShader

shaderGetCoglFragmentShader Source #

Arguments

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

shader: a Shader

-> m (Ptr ())

Returns: A CoglHandle for the fragment shader, or Nothing. The handle is owned by the Shader and it should not be unreferenced

Deprecated: (Since version 1.8)Use ShaderEffect instead.

Retrieves the underlying CoglHandle for the fragment shader.

Since: 1.0

getCoglProgram

shaderGetCoglProgram Source #

Arguments

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

shader: a Shader

-> m (Ptr ())

Returns: A CoglHandle for the shader program, or Nothing. The handle is owned by the Shader and it should not be unreferenced

Deprecated: (Since version 1.8)Use ShaderEffect instead.

Retrieves the underlying CoglHandle for the shader program.

Since: 1.0

getCoglVertexShader

shaderGetCoglVertexShader Source #

Arguments

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

shader: a Shader

-> m (Ptr ())

Returns: A CoglHandle for the vertex shader, or Nothing. The handle is owned by the Shader and it should not be unreferenced

Deprecated: (Since version 1.8)Use ShaderEffect instead.

Retrieves the underlying CoglHandle for the vertex shader.

Since: 1.0

getFragmentSource

shaderGetFragmentSource Source #

Arguments

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

shader: a Shader

-> m Text

Returns: the source of the fragment shader for this ClutterShader object or Nothing. The returned string is owned by the shader object and should never be modified or freed

Deprecated: (Since version 1.8)Use ShaderEffect instead.

Query the current GLSL fragment source set on shader.

Since: 0.6

getIsEnabled

shaderGetIsEnabled Source #

Arguments

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

shader: a Shader

-> m Bool

Returns: True if the shader is enabled.

Deprecated: (Since version 1.8)Use ShaderEffect instead.

Checks whether shader is enabled.

Since: 0.6

getVertexSource

shaderGetVertexSource Source #

Arguments

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

shader: a Shader

-> m Text

Returns: the source of the vertex shader for this ClutterShader object or Nothing. The returned string is owned by the shader object and should never be modified or freed

Deprecated: (Since version 1.8)Use ShaderEffect instead.

Query the current GLSL vertex source set on shader.

Since: 0.6

isCompiled

shaderIsCompiled Source #

Arguments

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

shader: a Shader

-> m Bool

Returns: True if the shader is compiled, linked and ready for use.

Deprecated: (Since version 1.8)Use ShaderEffect instead.

Checks whether shader is is currently compiled, linked and bound to the GL context.

Since: 0.8

new

shaderNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Shader

Returns: a new Shader.

Deprecated: (Since version 1.8)Use ShaderEffect instead.

Create a new Shader instance.

Since: 0.6

release

shaderRelease Source #

Arguments

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

shader: a Shader

-> m () 

Deprecated: (Since version 1.8)Use ShaderEffect instead.

Frees up any GL context resources held by the shader.

Since: 0.6

setFragmentSource

shaderSetFragmentSource Source #

Arguments

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

shader: a Shader

-> Text

data: GLSL source code.

-> Int64

length: length of source buffer (currently ignored)

-> m () 

Deprecated: (Since version 1.8)Use ShaderEffect instead.

Sets the GLSL source code to be used by a Shader for the fragment program.

Since: 0.6

setIsEnabled

shaderSetIsEnabled Source #

Arguments

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

shader: a Shader

-> Bool

enabled: The new state of the shader.

-> m () 

Deprecated: (Since version 1.8)Use ShaderEffect instead.

Enables a shader. This function will attempt to compile and link the shader, if it isn't already.

When enabled is False the default state of the GL pipeline will be used instead.

Since: 0.6

setUniform

shaderSetUniform Source #

Arguments

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

shader: a Shader.

-> Text

name: name of uniform in GLSL shader program to set.

-> GValue

value: a ShaderFloat, ShaderInt or ShaderMatrix Value.

-> m () 

Deprecated: (Since version 1.8)Use ShaderEffect instead.

Sets a user configurable variable in the GLSL shader programs attached to a Shader.

Since: 1.0

setVertexSource

shaderSetVertexSource Source #

Arguments

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

shader: a Shader

-> Text

data: GLSL source code.

-> Int64

length: length of source buffer (currently ignored)

-> m () 

Deprecated: (Since version 1.8)Use ShaderEffect instead.

Sets the GLSL source code to be used by a Shader for the vertex program.

Since: 0.6

Properties

compiled

Whether the shader is compiled and linked, ready for use in the GL context.

Since: 0.8

getShaderCompiled :: (MonadIO m, IsShader o) => o -> m Bool Source #

Get the value of the “compiled” property. When overloading is enabled, this is equivalent to

get shader #compiled

enabled

Whether the shader is currently used in the GL rendering pipeline.

Since: 0.6

constructShaderEnabled :: (IsShader o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “enabled” property. This is rarely needed directly, but it is used by new.

getShaderEnabled :: (MonadIO m, IsShader o) => o -> m Bool Source #

Get the value of the “enabled” property. When overloading is enabled, this is equivalent to

get shader #enabled

setShaderEnabled :: (MonadIO m, IsShader o) => o -> Bool -> m () Source #

Set the value of the “enabled” property. When overloading is enabled, this is equivalent to

set shader [ #enabled := value ]

fragmentSource

GLSL source code for the fragment shader part of the shader program.

Since: 0.6

clearShaderFragmentSource :: (MonadIO m, IsShader o) => o -> m () Source #

Set the value of the “fragment-source” property to Nothing. When overloading is enabled, this is equivalent to

clear #fragmentSource

constructShaderFragmentSource :: (IsShader o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “fragment-source” property. This is rarely needed directly, but it is used by new.

getShaderFragmentSource :: (MonadIO m, IsShader o) => o -> m Text Source #

Get the value of the “fragment-source” property. When overloading is enabled, this is equivalent to

get shader #fragmentSource

setShaderFragmentSource :: (MonadIO m, IsShader o) => o -> Text -> m () Source #

Set the value of the “fragment-source” property. When overloading is enabled, this is equivalent to

set shader [ #fragmentSource := value ]

vertexSource

GLSL source code for the vertex shader part of the shader program, if any

Since: 0.6

clearShaderVertexSource :: (MonadIO m, IsShader o) => o -> m () Source #

Set the value of the “vertex-source” property to Nothing. When overloading is enabled, this is equivalent to

clear #vertexSource

constructShaderVertexSource :: (IsShader o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “vertex-source” property. This is rarely needed directly, but it is used by new.

getShaderVertexSource :: (MonadIO m, IsShader o) => o -> m Text Source #

Get the value of the “vertex-source” property. When overloading is enabled, this is equivalent to

get shader #vertexSource

setShaderVertexSource :: (MonadIO m, IsShader o) => o -> Text -> m () Source #

Set the value of the “vertex-source” property. When overloading is enabled, this is equivalent to

set shader [ #vertexSource := value ]