I am trying to load a Shader for image based rendering and I'm facing an Exception saying, "Access violation executing location 0x00000000."
//Load IBR logic Vertex and Fragmnet OpenGL shaders
void GLTextureManager::LoadIBRShaders()
{
m_ShaderProgramID = 0;
GLint GlewInitResult = glewInit();
if (GLEW_OK != GlewInitResult)
{
const GLubyte* pResult =glewGetErrorString(GlewInitResult);
printf("ERROR: %s\n",pResult);
}
// Create the shaders
GLuint VertexShaderID = glCreateShader(GL_VERTEX_SHADER); //Access Violation Exception occured here
GLuint FragmentShaderID = glCreateShader(GL_FRAGMENT_SHADER);
//Additional code after creating shader
}
Below are the include files used,
#include "GL/glew.h"
#include <GL/glu.h>
I have initialised GLEW before calling glCreateShader and I still face the same issue.
User contributions licensed under CC BY-SA 3.0