Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Question regarding glCreateProgram return value of 0

Using GLFW
pcapp
2013-06-14
2013-06-16
  • pcapp
    pcapp
    2013-06-14

    Hello,

    I am using GLFW 3.0.1 and Google's Angle Project to create an Open GL ES 2.0 context on my Windows 7 machine. It looks like the context is being created successfully, but when I call glCreateProgram, it returns a value of 0. The following URL leads to a pastebin of the code: http://pastebin.com/FLgvaiHH

    Does my use of GLFW look correct in the above code? I am new to GLFW, so I first wanted to rule out that I am doing something incorrect with it. I am also new to OpenGL ES 2.0, so the likelihood I am doing something wonky is high, too.

    At any rate, I appreciate any help!

     
  • Camilla Löwy
    Camilla Löwy
    2013-06-14

    You are asking for an OpenGL ES 1.1 context, as you're not setting the desired version.

     
  • pcapp
    pcapp
    2013-06-14

    Adding the following lines

    glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 2);
    glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);

    after the original glfwWindowHint call yielded the same results.

    I will poke around and ensure my setup is correct.

     
  • Camilla Löwy
    Camilla Löwy
    2013-06-16

    Check your context strings.