Answer the question
In order to leave comments, you need to log in
How to make libGLESv2 friends with GLFW or SDL2?
I use GLFW and SDL2 (I tried two options, I thought there was a jamb in them) for rendering windows and I try to drag libGLESv2 to work with gl * functions (shaders and other tinsel). I cut everything in the form of libraries.
The Angle code itself is as follows:
glClearColor(0.0, 1.0, 0.0, 1.0); // green 1
glClear(0x00000100 | 0x00004000); // GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT
Answer the question
In order to leave comments, you need to log in
The issue is resolved, the result:
In short, it was necessary to use native opengl, and the functions that are not enough to be loaded via wglGetProcAddress, so the function (for example) of compiling shaders looks like this:
$gl = ....;
$glCreateShader = $gl->cast('GLuint (*)(GLenum shaderType)', $gl->wglGetProcAddress('glCreateShader'));
$glCreateShader(....);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question