Convert backend enum class to corresponding opengl defined value.
More...
|
static GLenum | toGLAttributeType (VertexFormat vertexFormat) |
| Convert attribute enum classs type to GLenum type.
|
|
static GLsizei | getGLAttributeSize (VertexFormat vertexFormat) |
| Convert attribute component count to GLsizei.
|
|
static GLsizei | getGLDataTypeSize (GLenum size) |
| Get opengl data type size in bytes.
|
|
static GLint | toGLMagFilter (SamplerFilter magFilter) |
| Convert magnification filter to GLint.
|
|
static GLint | toGLMinFilter (SamplerFilter minFilter, bool hasMipmaps, bool isPow2) |
| Convert minifying filter to GLint.
|
|
static GLint | toGLAddressMode (SamplerAddressMode addressMode, bool isPow2) |
| Convert wrap parameter for texture coordinate to GLint.
|
|
static void | toGLTypes (PixelFormat textureFormat, GLint &internalFormat, GLuint &format, GLenum &type, bool &isCompressed) |
| Get textrue parameters from texture pixle format.
|
|
static GLenum | toGLComareFunction (CompareFunction compareFunction) |
| Convert compare function to GLenum.
|
|
static GLenum | toGLStencilOperation (StencilOperation stencilOperation) |
| Convert stencil operation to GLenum.
|
|
static GLenum | toGLBlendOperation (BlendOperation blendOperation) |
| Convert blend operation to GLenum.
|
|
static GLenum | toGLBlendFactor (BlendFactor blendFactor) |
| Convert blend factor to GLenum.
|
|
static GLenum | toGLFrontFace (Winding winding) |
| Convert winding value to GLenum.
|
|
static GLenum | toGLPrimitiveType (PrimitiveType primitiveType) |
| Convert primitive type to GLenum.
|
|
static GLenum | toGLIndexType (IndexFormat indexType) |
| Convert index type to GLenum.
|
|
static GLenum | toGLCullMode (CullMode mode) |
| Convert cull mode to GLenum.
|
|
Convert backend enum class to corresponding opengl defined value.
static GLenum toGLAttributeType |
( |
VertexFormat |
vertexFormat | ) |
|
|
static |
Convert attribute enum classs type to GLenum type.
i.e. convert VertexFormat::FLOAT4 to GL_FLOAT.
- Parameters
-
vertexFormat | Specifies the attribute data type to convert. |
- Returns
- Attribute type.
static GLsizei getGLAttributeSize |
( |
VertexFormat |
vertexFormat | ) |
|
|
static |
Convert attribute component count to GLsizei.
i.e. convert VertexFormat::FLOAT4 to 4.
- Parameters
-
vertexFormat | Specifies the attribute type. |
- Returns
- Attribute component counts.
static GLsizei getGLDataTypeSize |
( |
GLenum |
size | ) |
|
|
static |
Get opengl data type size in bytes.
i.e. GL_FLOAT_VEC4 data type size is sizeof(GLfloat) * 4.
- Parameters
-
size | Specifies the data type. |
- Returns
- Data type size in bytes.
static GLint toGLMagFilter |
( |
SamplerFilter |
magFilter | ) |
|
|
static |
Convert magnification filter to GLint.
i.e. convert SamplerFilter::LINEAR to GL_LINEAR.
- Parameters
-
magFilter | Specifies the magnification filter to convert. |
- Returns
- Magnification filter.
static GLint toGLMinFilter |
( |
SamplerFilter |
minFilter, |
|
|
bool |
hasMipmaps, |
|
|
bool |
isPow2 |
|
) |
| |
|
static |
Convert minifying filter to GLint.
i.e. convert SamplerFilter::LINEAR to GL_LINEAR. If mipmaps is enabled and texture width and height are not power of two, then if minFilter is SamplerFilter::LINEAR, GL_LINEAR is returned, otherwise return GL_NEAREST.
- Parameters
-
minFilter | Specifies minifying filter. |
hasMipmaps | Specifies whether mipmap is enabled. |
isPow2 | Specifies if texture width and height are power of two. |
- Returns
- Minifying filter
static GLint toGLAddressMode |
( |
SamplerAddressMode |
addressMode, |
|
|
bool |
isPow2 |
|
) |
| |
|
static |
Convert wrap parameter for texture coordinate to GLint.
i.e. convert SamplerAddressMode::REPEAT to GL_REPEAT. If texture width and height are not power of 2, then GL_CLAMP_TO_EDGE is returned.
- Parameters
-
addressMode | Specifies wrapping mode. |
isPow2 | Specifies if texture width and height are power of two. |
- Returns
- Wrap mode.
static void toGLTypes |
( |
PixelFormat |
textureFormat, |
|
|
GLint & |
internalFormat, |
|
|
GLuint & |
format, |
|
|
GLenum & |
type, |
|
|
bool & |
isCompressed |
|
) |
| |
|
static |
Get textrue parameters from texture pixle format.
- Parameters
-
in | textureFormat Specifies texture pixel format. |
out | internalFormat Specifies the internal format of the texture. |
out | format Specifies the format of the texel data. |
out | type Specifies the data type of the texel data. |
out | isCompressed Specifies if the texel data is compressed. |
static GLenum toGLComareFunction |
( |
CompareFunction |
compareFunction | ) |
|
|
static |
Convert compare function to GLenum.
i.e. convert CompareFunction::NEVER to GL_NEVER.
- Parameters
-
compareFunction | Specifies the compare function to convert. |
- Returns
- Compare function.
static GLenum toGLStencilOperation |
( |
StencilOperation |
stencilOperation | ) |
|
|
static |
Convert stencil operation to GLenum.
i.e. convert StencilOperation::KEEP to GL_KEEP.
- Parameters
-
stencilOperation | Specifies stencil operation. |
- Returns
- Stencil operation.
static GLenum toGLBlendOperation |
( |
BlendOperation |
blendOperation | ) |
|
|
static |
Convert blend operation to GLenum.
i.e. convert BlendOperation::ADD to GL_FUNC_ADD.
- Parameters
-
blendOperation | Specifies blend function to convert. |
- Returns
- Blend operation.
static GLenum toGLBlendFactor |
( |
BlendFactor |
blendFactor | ) |
|
|
static |
Convert blend factor to GLenum.
i.e. convert BlendFactor::ZERO to GL_ZERO.
- Parameters
-
blendFactor | Specifies the blend factor to convert. |
- Returns
- Blend factor.
static GLenum toGLFrontFace |
( |
Winding |
winding | ) |
|
|
static |
Convert winding value to GLenum.
i.e. convert Winding::CLOCK_WISE to GL_CW.
- Parameters
-
winding | Specifies the winding value to convert. |
- Returns
- Winding mode.
static GLenum toGLPrimitiveType |
( |
PrimitiveType |
primitiveType | ) |
|
|
static |
Convert primitive type to GLenum.
i.e. convert PrimitiveType::TRIANGLE to GL_TRIANGLES.
- Parameters
-
primitiveType | Specifies the kind of primitives to convert. |
- Returns
- Primitive type.
static GLenum toGLIndexType |
( |
IndexFormat |
indexType | ) |
|
|
static |
Convert index type to GLenum.
i.e. convert IndexFormat::U_INT to GL_UNSIGNED_INT.
- Parameters
-
indexType | Specifies the index type to convert. |
- Returns
- Index type.
static GLenum toGLCullMode |
( |
CullMode |
mode | ) |
|
|
static |
Convert cull mode to GLenum.
i.e. convert CullMode::BACK to GL_BACK.
- Parameters
-
mode | Specifies the cull mode to convert. |
- Returns
- Cull mode.
The documentation for this class was generated from the following file: