0

I creating a small renderer using OpenGL and am getting the access violation error only when using that particular function. Other Gl functions work perfectly fine.

What I have tried so far

  • setting glewExperimental = GL_TRUE before glewInit
  • using glGenFramebuffersEXT instead of glGenFramebuffers - Same error

Here is the code I am using to initialize SFMLand GLEW

sf::ContextSettings settings;
settings.depthBits = 24;
settings.stencilBits = 8;
settings.majorVersion = 3;
settings.minorVersion = 3;
settings.attributeFlags = sf::ContextSettings::Core;

window = new sf::Window( sf::VideoMode( screenWidth, screenHeight, 32 ), "OpenGL SFML", sf::Style::Titlebar | sf::Style::Close, settings );

glewExperimental = GL_TRUE;

if ( GLEW_OK != glewInit( ) )
{
    std::cout << "Failed to initialize GLEW" << std::endl;
    return false;
}

System information:

  • OS: Windows 10
  • GPU : GTX 1060
  • GLEW version: 2.1.0
genpfault
  • 51,148
  • 11
  • 85
  • 139
B0rn2C0de
  • 585
  • 1
  • 7
  • 22
  • What are you getting for `GL_VERSION` after that `glewInit()`? – genpfault Nov 13 '19 at 22:53
  • I am getting 4.4.0 NVIDIA 441.08 – B0rn2C0de Nov 13 '19 at 23:11
  • Possible duplicate of [glGenFramebuffers() access violation when using GLFW + GLEW](https://stackoverflow.com/questions/15165863/glgenframebuffers-access-violation-when-using-glfw-glew) – Eddy Luten Nov 13 '19 at 23:43
  • Run glewinfo.exe in the glew library directory. It will tell you which extensions are enabled, and thus, if glGenFrameBuffers is available to you. – Ian Young Nov 14 '19 at 09:26

0 Answers0