Menu

Null Pointer error in Shader.hpp

Help
2013-08-23
2013-10-18
  • TickingHands

    TickingHands - 2013-08-23

    I'm using MSVC 2012. I followed the first tutorial, however I get a run time error about a null pointer. Occurs at the assert in Shader.hpp line 73, "Unhandled exception at 0x74C6C9F1 in OpenGL_Practice.exe: 0xC0000005: Access violation executing location 0x00000000."
    It happens right when I try to create the vertex shader source. vs.Source(...);
    Is the tutorial missing something? Is it MSVC? Or something in site_config?
    Thanks
    Edit: Code http://pastebin.com/fSv2Jgyi

     

    Last edit: TickingHands 2013-08-25
  • Matus Chochlik

    Matus Chochlik - 2013-10-18

    Sorry for the very late response.

    The problem is IMHO in the fact that you create the window after initializing glew and after you call Shader.Source(...).
    You also don't check the return value of glewInit().
    To work properly the GL-commands and glew needs to have an initialized and current opengl context and this is not yet created in your app.

    HTH

     

Log in to post a comment.

MongoDB Logo MongoDB