# Question regarding glCreateProgram return value of 0

**URL:** <https://discourse.glfw.org/t/question-regarding-glcreateprogram-return-value-of-0/578>\
**Category:** support\
**Created:** [June 14, 2013, 6:15am UTC](https://discourse.glfw.org/t/question-regarding-glcreateprogram-return-value-of-0/578 "2013-06-14T06:15:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [June 14, 2013, 6:15am UTC](https://discourse.glfw.org/t/question-regarding-glcreateprogram-return-value-of-0/578/1 "2013-06-14T06:15:06Z")

</div>

**[pcapp](https://sourceforge.net/u/pcapp/)** wrote on [Friday, June 14, 2013](https://sourceforge.net/p/glfw/discussion/247562/thread/cb327f57/#7a78):

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](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!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [June 14, 2013, 10:07am UTC](https://discourse.glfw.org/t/question-regarding-glcreateprogram-return-value-of-0/578/2 "2013-06-14T10:07:07Z")

</div>

**[elmindreda](https://sourceforge.net/u/elmindreda/)** wrote on [Friday, June 14, 2013](https://sourceforge.net/p/glfw/discussion/247562/thread/cb327f57/#212e):

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [June 14, 2013, 8:53pm UTC](https://discourse.glfw.org/t/question-regarding-glcreateprogram-return-value-of-0/578/3 "2013-06-14T20:53:18Z")

</div>

**[pcapp](https://sourceforge.net/u/pcapp/)** wrote on [Friday, June 14, 2013](https://sourceforge.net/p/glfw/discussion/247562/thread/cb327f57/#d400):

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [June 16, 2013, 12:09am UTC](https://discourse.glfw.org/t/question-regarding-glcreateprogram-return-value-of-0/578/4 "2013-06-16T00:09:12Z")

</div>

**[elmindreda](https://sourceforge.net/u/elmindreda/)** wrote on [Sunday, June 16, 2013](https://sourceforge.net/p/glfw/discussion/247562/thread/cb327f57/#698e):

Check your context strings.
