On 26/02/2015 3:57 p.m., Gan wrote:
On Thursday, 26 February 2015 at 02:32:51 UTC, stewarth wrote:

I'd also try hacking in Window.d directly to see if even basic gl
commands work, e.g. immediately after window and context creation, try
rendering a triangle then tweak the context initialisation to see if
it affects anything.

It may help you track down exactly which part of the GL setup is
causing problems.


I know almost nothing about OpenGL but using your method(sorta):
void reportGLErrors() {
     GLenum errCode;
     const GLubyte *errString;
     if ((errCode = glGetError()) != GL_NO_ERROR)
         writeln("OPEN GL ERROR: ", errCode);

I get error code 1282 repeatedly.

 From a google search someone says:
"First, glGetError() will return 1282 - invalid operation if the GL
context is not current (or not yet created). So, create your context
first, then call glGetError. And, verify that any parent class or member
class does not call GL functions in their constructors or prior to
context being created."

Can someone with more OpenGL knowledge clarify what this means?

1. Program starts
2. Window gets created
3. Context gets created
4. Context is activated
5. Profit???

Basically before the context is created and activated you cannot call any OpenGL functions. If you do, they will error out.

The bit about constructors ext. don't worry about it. Its just about e.g. where the calls to OpenGL can exist.

Reply via email to