Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: creating rendering context other than 3.0 makes app crash

  1. #1
    Junior Member Newbie
    Join Date
    Jun 2014
    Posts
    18

    creating rendering context other than 3.0 makes app crash

    Hi everyone, I have been working on my game engine for a while now, I am using glfw to create and initialize the window and the context. Everything worked fine until I tried to ask glfw to create me an context of version higher than 3.0 (which defaults to).
    Glfw looks like is not the issue here, I contacted the guys and looks like glfw can create the context properly, I have opengl 4.5 supported.
    When I use an higher context I start to get fails on the most simpler opengl calls like in my VertexBuffer wrapper class:
    Code :
     
     
    VertexBuffer::VertexBuffer(GLuint upload_type) :
    							m_upload_type(upload_type),m_size(0)
    {
    	glGenBuffers(1,&m_buffer_index);	
    }
     
    void VertexBuffer::bind() const
    {
    	glBindBuffer(GL_ARRAY_BUFFER, m_buffer_index);
    	assert(glGetError()==0);
    }

    I my assertion get triggered in the bind method, returning error 1280, which googling should stand for GL_INVALID_ENUM. The buffer index is correctly generated and used.
    I have been scratching my head about this problem for a while and having trouble figuring out the problem.

    The guys on glfw repository mentioned that maybe my glew was outdated, but I am running on latest glew, 1.13.

    If i let the context default to 3.0 everything works fine, all my rendering , shadows etc.

    Any clue on this matter?

    PS: glew is loading fine and does not report errors.

    M.
    Last edited by giordi; 05-31-2016 at 08:18 AM.

  2. #2
    Junior Member Newbie
    Join Date
    Jun 2014
    Posts
    18
    after furtther investigation looks like opengl crashed way before my assertion, i will walk back the stack trace , i will report when i find more

  3. #3
    Junior Member Newbie
    Join Date
    Jun 2014
    Posts
    18
    Tracked the problem all the way up to glewInit().
    After much research I found that is actually a know bug in glew since years, to know more please refer to:
    https://github.com/glfw/glfw/issues/...ment-222752672

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •