Answer the question
In order to leave comments, you need to log in
Create an OpenGL extension library?
Good day. The university set the task of creating a dynamic or static library of extensions and connecting it to the project with OpenGL in order to take functions from there to work with them.
This is how the task sounds:
Actually the links that were given:
www.opengl.org/registry/doc/glspec33.core.20100311.pdf
https://www.opengl.org/sdk/docs/man/
Actually the question:
What does the author of the task have in view of the creation of extensions? Does he really want me to write the work of the functions included in the opengl 3.3 standard and then make my own dynamic library? Or did he mean something else?
Actually, the example that was given in the manual:
if (SDL_GL_LoadLibrary("libGL.so") == -1) {
SDL_LogCritical(SDL_LOG_PRIORITY_CRITICAL, "Unable to load OpenGL library: %s", SDL_GetError());
}
typedef void ( * PFNGLCLEARCOLORPROC)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
typedef void ( * PFNGLCLEARPROC)(GLbitfield );
PFNGLCLEARPROC glClear;
PFNGLCLEARCOLORPROC glClearColor;
// Получаем адреса функций
glClear = (PFNGLCLEARPROC)SDL_GL_GetProcAddress("glClear");
glClearColor = (PFNGLCLEARCOLORPROC)SDL_GL_GetProcAddress("glClearColor");
Answer the question
In order to leave comments, you need to log in
Maybe I'm still stupid and don't understand anything in life and programming
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question