Workaround/hack for platforms without working get_proc_address().
This commit is contained in:
parent
3c8b967008
commit
ca50a90c09
|
@ -891,10 +891,16 @@ static void gl_glsl_reset_attrib(void)
|
||||||
gl_attrib_index = 0;
|
gl_attrib_index = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Platforms with broken get_proc_address.
|
||||||
|
// Assume functions are available without proc_address.
|
||||||
|
#ifdef __PSL1GHT__
|
||||||
|
#define LOAD_GL_SYM(SYM) pgl##SYM = gl##SYM;
|
||||||
|
#else
|
||||||
#define LOAD_GL_SYM(SYM) if (!pgl##SYM) { \
|
#define LOAD_GL_SYM(SYM) if (!pgl##SYM) { \
|
||||||
gfx_ctx_proc_t sym = gfx_ctx_get_proc_address("gl" #SYM); \
|
gfx_ctx_proc_t sym = gfx_ctx_get_proc_address("gl" #SYM); \
|
||||||
memcpy(&(pgl##SYM), &sym, sizeof(sym)); \
|
memcpy(&(pgl##SYM), &sym, sizeof(sym)); \
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
bool gl_glsl_init(const char *path)
|
bool gl_glsl_init(const char *path)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue