15 #ifndef FPLBASE_TYPE_CONVERSIONS_GL_H
16 #define FPLBASE_TYPE_CONVERSIONS_GL_H
18 #include "fplbase/handles.h"
19 #include "fplbase/internal/detailed_render_state.h"
70 inline TextureTarget TextureTargetFromGl(
unsigned int gl) {
71 return HandleUnionGl(gl).handle;
74 inline ShaderHandle ShaderHandleFromGl(
unsigned int gl) {
75 return HandleUnionGl(gl).handle;
78 inline UniformHandle UniformHandleFromGl(
int gl_int) {
84 inline BufferHandle BufferHandleFromGl(
unsigned int gl) {
85 return HandleUnionGl(gl).handle;
89 return HandleUnionGl(handle).gl;
92 inline unsigned int GlTextureTarget(TextureTarget handle) {
93 return HandleUnionGl(handle).gl;
96 inline unsigned int GlShaderHandle(ShaderHandle handle) {
97 return HandleUnionGl(handle).gl;
100 inline int GlUniformHandle(UniformHandle handle) {
106 inline unsigned int GlBufferHandle(BufferHandle handle) {
107 return HandleUnionGl(handle).gl;
112 #endif // FPLBASE_TYPE_CONVERSIONS_GL_H
unsigned int RenderTargetFormatToGl(RenderTargetFormat format)
Converts FPL RenderTargetFormat to equivalent GL enum value.
unsigned int BlendStateFactorToGl(BlendState::BlendFactor factor)
Converts FPL blend state factor to equivalent GL enum value.
internal::OpaqueHandle TextureHandle
Backend agnostic handles to various resources.
Definition: handles.h:40
unsigned int CullFaceToGl(CullState::CullFace face)
Converts FPL cull face value to equivalent GL enum value.
Definition: type_conversions_gl.h:49
unsigned int RenderFunctionToGlFunction(RenderFunction func)
Converts FPL render function value to equivalent GL enum value.
unsigned int StencilOpToGlOp(StencilOperation::StencilOperations op)
Converts FPL stencil operation value to equivalent GL enum value.