glCreateShader
is one of the functions which location must be obtained at runtime using a …gl…GetProcAddress
call. This call will give a valid pointer only if the function is actually supported by the installed OpenGL driver. Also even if the function is supported by the driver, the actual feature accessed by the function may not be supported by the device/OpenGL context you're using.
It's mandatory you're checking the validity of the function address assert(glCreateShader);
and that the function is actually supported (OpenGL version >= OpenGL-2.0 or GL_ARB_vertex_shader
and GL_ARB_fragment_shader
in the list of extensions).
I'm trying to run an OpenGl program on an Amazon EC2 instance.
Virtual machines normally don't have a GPU available. The functionality you're requesting is not available without a GPU in a standard Windows installation. As a workaround, however with largely reduced performance, you can build and install the Mesa3D opengl32.dll
software rasterizer alongside your program's .exe
(do not install in the system path!).