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 |
Synopsis
- data AttributeType
- data BitmapError
- data BlendStringError
- data DepthTestFunction
- data FilterReturn
- data FogMode
- data IndicesType
- data MaterialAlphaFunc
- data MaterialFilter
- data MaterialLayerType
- data MaterialWrapMode
- data PixelFormat
- = PixelFormatAny
- | PixelFormatA8
- | PixelFormatRgb565
- | PixelFormatRgba4444
- | PixelFormatRgba5551
- | PixelFormatYuv
- | PixelFormatG8
- | PixelFormatRg88
- | PixelFormatRgb888
- | PixelFormatBgr888
- | PixelFormatRgba8888
- | PixelFormatBgra8888
- | PixelFormatArgb8888
- | PixelFormatAbgr8888
- | PixelFormatRgba1010102
- | PixelFormatBgra1010102
- | PixelFormatArgb2101010
- | PixelFormatAbgr2101010
- | PixelFormatRgba8888Pre
- | PixelFormatBgra8888Pre
- | PixelFormatArgb8888Pre
- | PixelFormatAbgr8888Pre
- | PixelFormatRgba4444Pre
- | PixelFormatRgba5551Pre
- | PixelFormatRgba1010102Pre
- | PixelFormatBgra1010102Pre
- | PixelFormatArgb2101010Pre
- | PixelFormatAbgr2101010Pre
- | PixelFormatDepth16
- | PixelFormatDepth32
- | PixelFormatDepth24Stencil8
- | AnotherPixelFormat Int
- data RendererError
- data ShaderType
- data StereoMode
- data SystemError
- data TextureComponents
- data TextureError
- data TextureType
- data VerticesMode
- data Winding
- data WinsysFeature
- = WinsysFeatureMultipleOnscreen
- | WinsysFeatureSwapThrottle
- | WinsysFeatureVblankCounter
- | WinsysFeatureVblankWait
- | WinsysFeatureTextureFromPixmap
- | WinsysFeatureSwapBuffersEvent
- | WinsysFeatureSwapRegion
- | WinsysFeatureSwapRegionThrottle
- | WinsysFeatureSwapRegionSynchronized
- | WinsysFeatureBufferAge
- | WinsysFeatureSyncAndCompleteEvent
- | WinsysFeatureNFeatures
- | AnotherWinsysFeature Int
Enumerations
AttributeType
data AttributeType Source #
Data types for the components of a vertex attribute.
Since: 1.0
AttributeTypeByte | Data is the same size of a byte |
AttributeTypeUnsignedByte | Data is the same size of an unsigned byte |
AttributeTypeShort | Data is the same size of a short integer |
AttributeTypeUnsignedShort | Data is the same size of an unsigned short integer |
AttributeTypeFloat | Data is the same size of a float |
AnotherAttributeType Int | Catch-all for unknown values |
Instances
BitmapError
data BitmapError Source #
Error codes that can be thrown when performing bitmap
operations. Note that gdk_pixbuf_new_from_file()
can also throw
errors directly from the underlying image loading library. For
example, if GdkPixbuf is used then errors GdkPixbufError
s
will be used directly.
Since: 1.4
BitmapErrorFailed | Generic failure code, something went wrong. |
BitmapErrorUnknownType | Unknown image type. |
BitmapErrorCorruptImage | An image file was broken somehow. |
AnotherBitmapError Int | Catch-all for unknown values |
Instances
BlendStringError
data BlendStringError Source #
Error enumeration for the blend strings parser
Since: 1.0
BlendStringErrorParseError | Generic parse error |
BlendStringErrorArgumentParseError | Argument parse error |
BlendStringErrorInvalidError | Internal parser error |
BlendStringErrorGpuUnsupportedError | Blend string not supported by the GPU |
AnotherBlendStringError Int | Catch-all for unknown values |
Instances
DepthTestFunction
data DepthTestFunction Source #
When using depth testing one of these functions is used to compare
the depth of an incoming fragment against the depth value currently
stored in the depth buffer. The function is changed using
cogl_depth_state_set_test_function()
.
The test is only done when depth testing is explicitly enabled. (See
cogl_depth_state_set_test_enabled()
)
DepthTestFunctionNever | Never passes. |
DepthTestFunctionLess | Passes if the fragment's depth value is less than the value currently in the depth buffer. |
DepthTestFunctionEqual | Passes if the fragment's depth value is equal to the value currently in the depth buffer. |
DepthTestFunctionLequal | Passes if the fragment's depth value is less or equal to the value currently in the depth buffer. |
DepthTestFunctionGreater | Passes if the fragment's depth value is greater than the value currently in the depth buffer. |
DepthTestFunctionNotequal | Passes if the fragment's depth value is not equal to the value currently in the depth buffer. |
DepthTestFunctionGequal | Passes if the fragment's depth value greater than or equal to the value currently in the depth buffer. |
DepthTestFunctionAlways | Always passes. |
AnotherDepthTestFunction Int | Catch-all for unknown values |
Instances
FilterReturn
data FilterReturn Source #
Return values for the CoglXlibFilterFunc
and CoglWin32FilterFunc
functions.
FilterReturnContinue | The event was not handled, continues the processing |
FilterReturnRemove | Remove the event, stops the processing |
AnotherFilterReturn Int | Catch-all for unknown values |
Instances
FogMode
The fog mode determines the equation used to calculate the fogging blend
factor while fogging is enabled. The simplest FogModeLinear
mode
determines f as:
f = end - eye_distance / end - start
Where eye_distance is the distance of the current fragment in eye coordinates from the origin.
Since: 1.0
FogModeLinear | Calculates the fog blend factor as: > > f = end - eye_distance / end - start |
FogModeExponential | Calculates the fog blend factor as: > > f = e ^ -(density * eye_distance) |
FogModeExponentialSquared | Calculates the fog blend factor as: > > f = e ^ -(density * eye_distance)^2 |
AnotherFogMode Int | Catch-all for unknown values |
Instances
Enum FogMode Source # | |
Show FogMode Source # | |
Eq FogMode Source # | |
Ord FogMode Source # | |
BoxedEnum FogMode Source # | |
Defined in GI.Cogl.Enums | |
TypedObject FogMode Source # | |
Defined in GI.Cogl.Enums | |
HasParentTypes FogMode Source # | |
Defined in GI.Cogl.Enums | |
type ParentTypes FogMode Source # | |
Defined in GI.Cogl.Enums |
IndicesType
data IndicesType Source #
You should aim to use the smallest data type that gives you enough range, since it reduces the size of your index array and can help reduce the demand on memory bandwidth.
Note that IndicesTypeInt
is only supported if the
COGL_FEATURE_ID_UNSIGNED_INT_INDICES
feature is available. This
should always be available on OpenGL but on OpenGL ES it will only
be available if the GL_OES_element_index_uint extension is
advertized.
IndicesTypeByte | Your indices are unsigned bytes |
IndicesTypeShort | Your indices are unsigned shorts |
IndicesTypeInt | Your indices are unsigned ints |
AnotherIndicesType Int | Catch-all for unknown values |
Instances
MaterialAlphaFunc
data MaterialAlphaFunc Source #
Alpha testing happens before blending primitives with the framebuffer and
gives an opportunity to discard fragments based on a comparison with the
incoming alpha value and a reference alpha value. The MaterialAlphaFunc
determines how the comparison is done.
MaterialAlphaFuncNever | Never let the fragment through. |
MaterialAlphaFuncLess | Let the fragment through if the incoming alpha value is less than the reference alpha value |
MaterialAlphaFuncEqual | Let the fragment through if the incoming alpha value equals the reference alpha value |
MaterialAlphaFuncLequal | Let the fragment through if the incoming alpha value is less than or equal to the reference alpha value |
MaterialAlphaFuncGreater | Let the fragment through if the incoming alpha value is greater than the reference alpha value |
MaterialAlphaFuncNotequal | Let the fragment through if the incoming alpha value does not equal the reference alpha value |
MaterialAlphaFuncGequal | Let the fragment through if the incoming alpha value is greater than or equal to the reference alpha value. |
MaterialAlphaFuncAlways | Always let the fragment through. |
AnotherMaterialAlphaFunc Int | Catch-all for unknown values |
Instances
MaterialFilter
data MaterialFilter Source #
Texture filtering is used whenever the current pixel maps either to more than one texture element (texel) or less than one. These filter enums correspond to different strategies used to come up with a pixel color, by possibly referring to multiple neighbouring texels and taking a weighted average or simply using the nearest texel.
MaterialFilterNearest | Measuring in manhatten distance from the, current pixel center, use the nearest texture texel |
MaterialFilterLinear | Use the weighted average of the 4 texels nearest the current pixel center |
MaterialFilterNearestMipmapNearest | Select the mimap level whose
texel size most closely matches the current pixel, and use the
|
MaterialFilterLinearMipmapNearest | Select the mimap level whose
texel size most closely matches the current pixel, and use the
|
MaterialFilterNearestMipmapLinear | Select the two mimap levels
whose texel size most closely matches the current pixel, use
the |
MaterialFilterLinearMipmapLinear | Select the two mimap levels
whose texel size most closely matches the current pixel, use
the |
AnotherMaterialFilter Int | Catch-all for unknown values |
Instances
MaterialLayerType
data MaterialLayerType Source #
Available types of layers for a Material
. This enumeration
might be expanded in later versions.
Since: 1.0
MaterialLayerTypeTexture | The layer represents a <link linkend="cogl-Textures">texture</link> |
AnotherMaterialLayerType Int | Catch-all for unknown values |
Instances
MaterialWrapMode
data MaterialWrapMode Source #
The wrap mode specifies what happens when texture coordinates
outside the range 0→1 are used. Note that if the filter mode is
anything but MaterialFilterNearest
then texels outside the
range 0→1 might be used even when the coordinate is exactly 0 or 1
because OpenGL will try to sample neighbouring pixels. For example
if you are trying to render the full texture then you may get
artifacts around the edges when the pixels from the other side are
merged in if the wrap mode is set to repeat.
Since: 1.4
MaterialWrapModeRepeat | The texture will be repeated. This is useful for example to draw a tiled background. |
MaterialWrapModeClampToEdge | The coordinates outside the range 0→1 will sample copies of the edge pixels of the texture. This is useful to avoid artifacts if only one copy of the texture is being rendered. |
MaterialWrapModeAutomatic | Cogl will try to automatically
decide which of the above two to use. For |
AnotherMaterialWrapMode Int | Catch-all for unknown values |
Instances
PixelFormat
data PixelFormat Source #
Pixel formats used by Cogl. For the formats with a byte per
component, the order of the components specify the order in
increasing memory addresses. So for example
PixelFormatRgb888
would have the red component in the
lowest address, green in the next address and blue after that
regardless of the endianness of the system.
For the formats with non byte aligned components the component
order specifies the order within a 16-bit or 32-bit number from
most significant bit to least significant. So for
PixelFormatRgb565
, the red component would be in bits
11-15, the green component would be in 6-11 and the blue component
would be in 1-5. Therefore the order in memory depends on the
endianness of the system.
When uploading a texture PixelFormatAny
can be used as the
internal format. Cogl will try to pick the best format to use
internally and convert the texture data if necessary.
Since: 0.8
PixelFormatAny | Any format |
PixelFormatA8 | 8 bits alpha mask |
PixelFormatRgb565 | RGB, 16 bits |
PixelFormatRgba4444 | RGBA, 16 bits |
PixelFormatRgba5551 | RGBA, 16 bits |
PixelFormatYuv | Not currently supported |
PixelFormatG8 | Single luminance component |
PixelFormatRg88 | RG, 16 bits. Note that red-green textures
are only available if |
PixelFormatRgb888 | RGB, 24 bits |
PixelFormatBgr888 | BGR, 24 bits |
PixelFormatRgba8888 | RGBA, 32 bits |
PixelFormatBgra8888 | BGRA, 32 bits |
PixelFormatArgb8888 | ARGB, 32 bits |
PixelFormatAbgr8888 | ABGR, 32 bits |
PixelFormatRgba1010102 | RGBA, 32 bits, 10 bpc |
PixelFormatBgra1010102 | BGRA, 32 bits, 10 bpc |
PixelFormatArgb2101010 | ARGB, 32 bits, 10 bpc |
PixelFormatAbgr2101010 | ABGR, 32 bits, 10 bpc |
PixelFormatRgba8888Pre | Premultiplied RGBA, 32 bits |
PixelFormatBgra8888Pre | Premultiplied BGRA, 32 bits |
PixelFormatArgb8888Pre | Premultiplied ARGB, 32 bits |
PixelFormatAbgr8888Pre | Premultiplied ABGR, 32 bits |
PixelFormatRgba4444Pre | Premultiplied RGBA, 16 bits |
PixelFormatRgba5551Pre | Premultiplied RGBA, 16 bits |
PixelFormatRgba1010102Pre | Premultiplied RGBA, 32 bits, 10 bpc |
PixelFormatBgra1010102Pre | Premultiplied BGRA, 32 bits, 10 bpc |
PixelFormatArgb2101010Pre | Premultiplied ARGB, 32 bits, 10 bpc |
PixelFormatAbgr2101010Pre | Premultiplied ABGR, 32 bits, 10 bpc |
PixelFormatDepth16 | No description available in the introspection data. |
PixelFormatDepth32 | No description available in the introspection data. |
PixelFormatDepth24Stencil8 | No description available in the introspection data. |
AnotherPixelFormat Int | Catch-all for unknown values |
Instances
RendererError
data RendererError Source #
No description available in the introspection data.
RendererErrorXlibDisplayOpen | No description available in the introspection data. |
RendererErrorBadConstraint | No description available in the introspection data. |
AnotherRendererError Int | Catch-all for unknown values |
Instances
ShaderType
data ShaderType Source #
Types of shaders
Since: 1.0
ShaderTypeVertex | A program for proccessing vertices |
ShaderTypeFragment | A program for processing fragments |
AnotherShaderType Int | Catch-all for unknown values |
Instances
StereoMode
data StereoMode Source #
Represents how draw should affect the two buffers
of a stereo framebuffer. See cogl_framebuffer_set_stereo_mode()
.
StereoModeBoth | draw to both stereo buffers |
StereoModeLeft | draw only to the left stereo buffer |
StereoModeRight | draw only to the left stereo buffer |
AnotherStereoMode Int | Catch-all for unknown values |
Instances
SystemError
data SystemError Source #
Error enumeration for Cogl
The cOGLSYSTEMERRORUNSUPPORTED
error can be thrown for a
variety of reasons. For example:
<itemizedlist>
<listitem><para>You've tried to use a feature that is not
advertised by cogl_has_feature()
. This could happen if you create
a 2d texture with a non-power-of-two size when
COGL_FEATURE_ID_TEXTURE_NPOT
is not advertised.</para></listitem>
<listitem><para>The GPU can not handle the configuration you have
requested. An example might be if you try to use too many texture
layers in a single CoglPipeline
</para></listitem>
<listitem><para>The driver does not support some
configuration.</para></listiem>
</itemizedlist>
Currently this is only used by Cogl API marked as experimental so this enum should also be considered experimental.
Since: 1.4
SystemErrorCoglSystemErrorUnsupported | You tried to use a feature or configuration not currently available. |
SystemErrorCoglSystemErrorNoMemory | You tried to allocate a resource such as a texture and there wasn't enough memory. |
AnotherSystemError Int | Catch-all for unknown values |
Instances
TextureComponents
data TextureComponents Source #
See textureSetComponents
.
Since: 1.18
TextureComponentsA | Only the alpha component |
TextureComponentsRg | Red and green components. Note that
this can only be used if the |
TextureComponentsRgb | Red, green and blue components |
TextureComponentsRgba | Red, green, blue and alpha components |
TextureComponentsDepth | Only a depth component |
AnotherTextureComponents Int | Catch-all for unknown values |
Instances
TextureError
data TextureError Source #
Error codes that can be thrown when allocating textures.
Since: 1.8
TextureErrorSize | Unsupported size |
TextureErrorFormat | Unsupported format |
TextureErrorBadParameter | No description available in the introspection data. |
TextureErrorType | A primitive texture type that is unsupported by the driver was used |
AnotherTextureError Int | Catch-all for unknown values |
Instances
TextureType
data TextureType Source #
Constants representing the underlying hardware texture type of a
CoglTexture
.
Since: 1.10
TextureType2d | A |
TextureType3d | A |
TextureTypeRectangle | A |
AnotherTextureType Int | Catch-all for unknown values |
Instances
VerticesMode
data VerticesMode Source #
Different ways of interpreting vertices when drawing.
Since: 1.0
VerticesModePoints | FIXME, equivalent to <constant>GL_POINTS</constant> |
VerticesModeLines | FIXME, equivalent to <constant>GL_LINES</constant> |
VerticesModeLineLoop | FIXME, equivalent to <constant>GL_LINE_LOOP</constant> |
VerticesModeLineStrip | FIXME, equivalent to <constant>GL_LINE_STRIP</constant> |
VerticesModeTriangles | FIXME, equivalent to <constant>GL_TRIANGLES</constant> |
VerticesModeTriangleStrip | FIXME, equivalent to <constant>GL_TRIANGLE_STRIP</constant> |
VerticesModeTriangleFan | FIXME, equivalent to <constant>GL_TRIANGLE_FAN</constant> |
AnotherVerticesMode Int | Catch-all for unknown values |
Instances
Winding
Enum used to represent the two directions of rotation. This can be
used to set the front face for culling by calling
cogl_pipeline_set_front_face_winding()
.
WindingClockwise | Vertices are in a clockwise order |
WindingCounterClockwise | Vertices are in a counter-clockwise order |
AnotherWinding Int | Catch-all for unknown values |
Instances
Enum Winding Source # | |
Show Winding Source # | |
Eq Winding Source # | |
Ord Winding Source # | |
BoxedEnum Winding Source # | |
Defined in GI.Cogl.Enums | |
TypedObject Winding Source # | |
Defined in GI.Cogl.Enums | |
HasParentTypes Winding Source # | |
Defined in GI.Cogl.Enums | |
type ParentTypes Winding Source # | |
Defined in GI.Cogl.Enums |
WinsysFeature
data WinsysFeature Source #
No description available in the introspection data.
WinsysFeatureMultipleOnscreen | No description available in the introspection data. |
WinsysFeatureSwapThrottle | No description available in the introspection data. |
WinsysFeatureVblankCounter | No description available in the introspection data. |
WinsysFeatureVblankWait | No description available in the introspection data. |
WinsysFeatureTextureFromPixmap | No description available in the introspection data. |
WinsysFeatureSwapBuffersEvent | No description available in the introspection data. |
WinsysFeatureSwapRegion | No description available in the introspection data. |
WinsysFeatureSwapRegionThrottle | No description available in the introspection data. |
WinsysFeatureSwapRegionSynchronized | No description available in the introspection data. |
WinsysFeatureBufferAge | No description available in the introspection data. |
WinsysFeatureSyncAndCompleteEvent | No description available in the introspection data. |
WinsysFeatureNFeatures | No description available in the introspection data. |
AnotherWinsysFeature Int | Catch-all for unknown values |