Hi,

On Tue, 2009-07-21 at 11:30 +0530, alex wrote:
> Hi Carsten
> 
> I found something another intersting thing.  Does anyone tried to check with 
> glErr function ?
>
> Basically my somehow my OpenGL device failed to create so glErr function is 
> going in infinate while loop . Does anyone tried to use it ?  Here it is 
> macro .
> 
> #if defined(OSG_DEBUG) && !defined(OSG_EMBEDDED)
> 
> #define glErr(text) \
> 
> { \
> 
> GLenum glerr; \
> 
> \
> 
> while((glerr = glGetError()) != GL_NO_ERROR) \
> 
> { \
> 
> FWARNING(("(%s,%d): %s failed: %s (%#x)\n", \
> 
> __FILE__, __LINE__, \
> 
> (text), \
> 
> gluErrorString(glerr), \
> 
> glerr)); \
> 
> } \
> 
> }
> 

It's a known problem, usually programs should not get that far if the
context creation fails, e.g. the X11 version does a hard exit if the
context creation fails. There seem to be some differences between
the different window implementations. I'll see if I can make sense
of them. Most likely we have to have init return something useful.
Otherwise I guess is is a good idea to check if the context has
a non null value after init.

One thing to note though, 2.x is much stricter as to when the context
is actually bound, due to some parallelisms in the rendering backend.

Unfortunately the external interface for apps is not finished yet as
it still needs some detail work for par drawer and the clustering.

So a good advice is to only do GL calls through functions that are
triggered through the OpenSG rendering backend as for 99.9% of the
time the app might not have a bound context.

kind regards,
  gerrit



------------------------------------------------------------------------------
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to