[GB.OPENGL]

* NEW: Gl.CheckExtensions() to check the openGL driver extensions/ability support.

' Check if the driver support OpenGL 1.4 and GL_ARB_point_sprite extension
PRINT Gl.CheckExtensions("GL_VERSION_1_4  GL_ARB_point_sprite")

--> TRUE or FALSE



git-svn-id: svn://localhost/gambas/trunk@3965 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Laurent Carlier 2011-08-03 07:20:37 +00:00
parent 750758a5b4
commit 5edf50d87b

View File

@ -48,6 +48,12 @@ BEGIN_METHOD_VOID(GLCHECKERROR)
END_METHOD
BEGIN_METHOD(GLCHECKEXTENSIONS, GB_STRING extlist)
GB.ReturnBoolean(glewIsSupported(GB.ToZeroString(ARG(extlist))));
END_METHOD
/**************************************************************************/
GB_DESC Cgl[] =
@ -56,6 +62,8 @@ GB_DESC Cgl[] =
/* Check errors */
GB_STATIC_METHOD("GetError", "i", GLCHECKERROR, NULL),
/* Check an extension or a driver ability */
GB_STATIC_METHOD("CheckExtensions", "b", GLCHECKEXTENSIONS, "(Extensions)s"),
/* Primitives - see GLprimitives.h */
GB_STATIC_METHOD("Begin", NULL, GLBEGIN, "(Primitive)i"),