comparison libvo/gl_common.c @ 36121:60f5fa453719

Minor simplification.
author reimar
date Sat, 04 May 2013 09:44:42 +0000
parents 2c96438ef2ad
children cf45e1421a71
comparison
equal deleted inserted replaced
36120:7cfe91ac8df8 36121:60f5fa453719
407 const char *extstr; 407 const char *extstr;
408 const char *funcnames[7]; 408 const char *funcnames[7];
409 void *fallback; 409 void *fallback;
410 } extfunc_desc_t; 410 } extfunc_desc_t;
411 411
412 #define SIMPLE_FUNC_DESC(name) {&mpgl##name, NULL, {"gl"#name, NULL}, NULL}
412 #if !defined(CONFIG_GL_WIN32) && !defined(CONFIG_GL_X11) 413 #if !defined(CONFIG_GL_WIN32) && !defined(CONFIG_GL_X11)
413 #define DEF_FUNC_DESC(name) {&mpgl##name, NULL, {"gl"#name, NULL}, NULL} 414 #define DEF_FUNC_DESC(name) SIMPLE_FUNC_DESC(name)
414 #else 415 #else
415 #define DEF_FUNC_DESC(name) {&mpgl##name, NULL, {"gl"#name, NULL}, gl ##name} 416 #define DEF_FUNC_DESC(name) {&mpgl##name, NULL, {"gl"#name, NULL}, gl ##name}
416 #endif 417 #endif
417 static const extfunc_desc_t extfuncs[] = { 418 static const extfunc_desc_t extfuncs[] = {
418 // these aren't extension functions but we query them anyway to allow 419 // these aren't extension functions but we query them anyway to allow
497 {&mpglTexImage3D, NULL, {"glTexImage3D", NULL}}, 498 {&mpglTexImage3D, NULL, {"glTexImage3D", NULL}},
498 {&mpglAllocateMemoryMESA, "GLX_MESA_allocate_memory", {"glXAllocateMemoryMESA", NULL}}, 499 {&mpglAllocateMemoryMESA, "GLX_MESA_allocate_memory", {"glXAllocateMemoryMESA", NULL}},
499 {&mpglFreeMemoryMESA, "GLX_MESA_allocate_memory", {"glXFreeMemoryMESA", NULL}}, 500 {&mpglFreeMemoryMESA, "GLX_MESA_allocate_memory", {"glXFreeMemoryMESA", NULL}},
500 501
501 // Things needed to run on GLES 502 // Things needed to run on GLES
502 {&mpglVertexPointer, NULL, {"glVertexPointer", NULL}}, 503 SIMPLE_FUNC_DESC(VertexPointer),
503 {&mpglTexCoordPointer, NULL, {"glTexCoordPointer", NULL}}, 504 SIMPLE_FUNC_DESC(TexCoordPointer),
504 {&mpglClientActiveTexture, NULL, {"glClientActiveTexture", NULL}}, 505 SIMPLE_FUNC_DESC(ClientActiveTexture),
505 {&mpglEnableClientState, NULL, {"glEnableClientState", NULL}}, 506 SIMPLE_FUNC_DESC(EnableClientState),
506 {&mpglDisableClientState, NULL, {"glDisableClientState", NULL}}, 507 SIMPLE_FUNC_DESC(DisableClientState),
507 {&mpglDrawArrays, NULL, {"glDrawArrays", NULL}}, 508 SIMPLE_FUNC_DESC(DrawArrays),
508 {NULL} 509 {NULL}
509 }; 510 };
510 511
511 /** 512 /**
512 * \brief find the function pointers of some useful OpenGL extensions 513 * \brief find the function pointers of some useful OpenGL extensions