mirror of
https://github.com/brl/mutter.git
synced 2024-11-10 07:56:14 -05:00
Load glBlendEquation and glBlendColor using cogl_get_proc_address
These are defined since OpenGL 1.2 and since Windows doesn't export any functions defined after 1.1 we need to load them dynamically.
This commit is contained in:
parent
db4fb91fe3
commit
00ac53042e
@ -52,6 +52,8 @@
|
||||
#define glActiveTexture ctx->pf_glActiveTexture
|
||||
#define glClientActiveTexture ctx->pf_glClientActiveTexture
|
||||
#define glBlendFuncSeparate ctx->pf_glBlendFuncSeparate
|
||||
#define glBlendEquation ctx->pf_glBlendEquation
|
||||
#define glBlendColor ctx->pf_glBlendColor
|
||||
#define glBlendEquationSeparate ctx->pf_glBlendEquationSeparate
|
||||
#endif
|
||||
|
||||
|
@ -170,6 +170,8 @@ typedef struct
|
||||
COGL_PFNGLACTIVETEXTUREPROC pf_glActiveTexture;
|
||||
COGL_PFNGLCLIENTACTIVETEXTUREPROC pf_glClientActiveTexture;
|
||||
|
||||
COGL_PFNGLBLENDEQUATIONPROC pf_glBlendEquation;
|
||||
COGL_PFNGLBLENDCOLORPROC pf_glBlendColor;
|
||||
COGL_PFNGLBLENDFUNCSEPARATEPROC pf_glBlendFuncSeparate;
|
||||
COGL_PFNGLBLENDEQUATIONSEPARATEPROC pf_glBlendEquationSeparate;
|
||||
} CoglContext;
|
||||
|
@ -1032,6 +1032,17 @@ typedef void
|
||||
(GLenum modeRGB,
|
||||
GLenum modeAlpha);
|
||||
|
||||
typedef void
|
||||
(APIENTRYP COGL_PFNGLBLENDEQUATIONPROC)
|
||||
(GLenum mode);
|
||||
|
||||
typedef void
|
||||
(APIENTRYP COGL_PFNGLBLENDCOLORPROC)
|
||||
(GLclampf red,
|
||||
GLclampf green,
|
||||
GLclampf blue,
|
||||
GLclampf alpha);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif
|
||||
|
@ -486,6 +486,13 @@ _cogl_features_init (void)
|
||||
(COGL_PFNGLCLIENTACTIVETEXTUREPROC)
|
||||
cogl_get_proc_address ("glClientActiveTexture");
|
||||
|
||||
ctx->pf_glBlendEquation =
|
||||
(COGL_PFNGLBLENDEQUATIONPROC)
|
||||
cogl_get_proc_address ("glBlendEquation");
|
||||
ctx->pf_glBlendColor =
|
||||
(COGL_PFNGLBLENDCOLORPROC)
|
||||
cogl_get_proc_address ("glBlendColor");
|
||||
|
||||
/* Available in 1.4 */
|
||||
ctx->pf_glBlendFuncSeparate =
|
||||
(COGL_PFNGLBLENDFUNCSEPARATEPROC)
|
||||
|
Loading…
Reference in New Issue
Block a user