Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><a href="http://www.opengl.org/wiki/GL_Error_Codes" rel="nofollow">OpenGL.org</a> has this to say about that error: </p> <blockquote> <p><code>GL_INVALID_VALUE</code>​, 0x0501: Given when a value parameter is not a leval value for that function. This is only given for local problems; if the spec allows the value in certain circumstances, and other parameters or state dictate those circumstances, then GL_INVALID_OPERATION is the result instead.</p> </blockquote> <p>Step one is to find the exact opengl call that is causing the problem. You'll have to do trial and error to see which line is throwing that error. If you set up the program flow like this:</p> <pre><code>glSomeCallA() glGetError() //returns 0 glSomeCallB() glGetError() //returns 0 glSomeCallC() glGetError() //returns 0x501 </code></pre> <p>Then you'll know that <code>glSomeCallC</code> was the operation that caused the error. If you look at the man page for that particular call, it will enumerate everything that could cause a specific error to occur. </p> <p>In your case I'll guess that the error will be after glTexImage call just to save you some time, though I'm not positive. </p> <p>If you look at the <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexImage2D.xml" rel="nofollow">glTexImage man page</a>, at the bottom it will list everything that can cause an invalid value error. My guess will be that your texture is larger than the GL_MAX_TEXTURE_SIZE. You can confirm this by checking <code>glGetIntegerv(GL_MAX_TEXTURE_SIZE);</code></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload