Convert backend enum class to corresponding opengl defined value.
More...
Convert backend enum class to corresponding opengl defined value.
◆ toGLAttributeType()
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.
◆ getGLAttributeSize()
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.
◆ getGLDataTypeSize()
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.
◆ toGLMagFilter()
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.
◆ toGLMinFilter()
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
◆ toGLAddressMode()
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.
◆ toGLTypes()
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. |
◆ toGLComareFunction()
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.
◆ toGLStencilOperation()
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.
◆ toGLBlendOperation()
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.
◆ toGLBlendFactor()
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.
◆ toGLFrontFace()
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.
◆ toGLPrimitiveType()
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.
◆ toGLIndexType()
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.
◆ toGLCullMode()
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: