PFNGLGETPROGRAMBINARYPROC glGetProgramBinary = NULL Īnd in GLRenderer.cpp in function InitAPI get the pointer to a function: In ogl.cpp define the pointer and set it to NULL: In ogl.h define extern function pointer, for example:Įxtern PFNGLGETPROGRAMBINARYPROC glGetProgramBinary Let’s revise the most important sub-steps. This step is described in more details in OpenGL 3.2 – Tutorial 01. Defining and retrieving function pointers. Typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIPROC) ( unsigned int program, Typedef void (APIENTRYP PFNGLPROGRAMBINARYPROC) ( unsigned int program, Unsigned int *binaryFormat, void *binary) Typedef void (APIENTRYP PFNGLGETPROGRAMBINARYPROC) ( unsigned int program, To avoid conflict with glext.h, when support for ARB_get_program_binary become available, all defines are in #ifndef/#end block. For each name, for the consistency reason (all GL constants start with GL_), we will add prefix GL_. Let’s copy all those tokens into ogl.h file. Those are the predefined constants used as parameters for the functions. Open the spec of the functionality you want to use (for example ARB_get_program_binary) and find section “New Tokens”. All file names will refer to that project. We will use the sample project from the previous tutorial to demonstrate adding support for ARB_get_program_binary extension.
As we are so impatient to try new functionality, let’s get ready to rumble. Usually glext.h/wglext.h are released together with the new spec. For the second way, take a look at OpenGL 3.2 – Tutorial 01. Why? Well, the first way is described in OpenGL 3.1 – Tutorial 01.
OPENGL EXTENSIONS VIEWER 4.1 HOW TO
what the new functions are and how to use them,.
OPENGL EXTENSIONS VIEWER 4.1 DRIVERS
At the same moment when the drivers come out we can use now functionality. For me, it is an advantage! We don’t need to wait until new SDK is out. The greatest problem in OpenGL for newcomers is lack of SDK that would provide direct access to the functionality.