Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It's a shot in the dark, but fonts tend to get set up early because it's no fun being without text. So check that the first call to <code>wglMakeCurrent</code> precedes the <code>glGenTextures</code> used to create the name for the font texture.</p> <p>More generally, whilst I've only ever used OpenGL from C++, I've had a certain amount of wierd behaviour that I've had to track down. So I suggest two things that I've found helpful when working with OpenGL fairly directly:</p> <p>Firstly, insert calls to <code>glGetError</code> in as many places as possible. Putting this after every single OpenGL call -- except for a call to <code>wglMakeCurrent</code> to deactivate the current context, since <code>glGetError</code> always returns an error with no context -- is always good.</p> <p>Something simple like <code>assert(glGetError()==GL_NO_ERROR)</code> is a reasonable start (or pick any othe method of breaking into the debugger that lets you carry on anyway to see what happens next) and if you check the docs for <code>glGetError</code> you can probably come up with something more comprehensive.</p> <p>Secondly, on Windows at least, make sure that you are always operating with a valid current context. This is particularly important for the calls to <code>glGenTextures</code> that generate texture names.</p> <p><code>assert(wglGetCurrentContext())</code> will do the trick here, ideally just before every block of OpenGL calls, except of course for whichever call to <code>wglMakeCurrent</code> sets the current context.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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