PDA

View Full Version : XGL (formerly WholeGL)



Julien Cayzac
03-15-2002, 01:56 AM
Version 0.5-dev (http://www.brainlex.com/3d/) is out, if anyone could test it on Win32, it would be great http://www.opengl.org/discussion_boards/ubb/smile.gif

Changes since 0.4 include a transparent OpenGL states manager: you use glEnable, glDisable, glIsEnabled, but behind your back XGL functions are used to avoid redundant states changes...

Thanks,
Julien.

zeckensack
03-15-2002, 02:11 AM
Originally posted by deepmind:
Version 0.5-dev (http://www.brainlex.com/3d/) is out, if anyone could test it on Win32, it would be great http://www.opengl.org/discussion_boards/ubb/smile.gif

Changes since 0.4 include a transparent OpenGL states manager: you use glEnable, glDisable, glIsEnabled, but behind your back XGL functions are used to avoid redundant states changes...
What if the driver already does that? Sounds like a valid optimization but then again, it may be implemented in most drivers already ???

Julien Cayzac
03-15-2002, 02:15 AM
Originally posted by zeckensack:
What if the driver already does that? Sounds like a valid optimization but then again, it may be implemented in most drivers already ???

I think I will introduce XGLHint() in the final 0.5 release, so it will be more flexible...

e.g.: XGLHint(XGL_STATES_MANAGER);

Thanks,
Julien.

richardve
03-15-2002, 04:03 AM
Originally posted by zeckensack:
What if the driver already does that? Sounds like a valid optimization but then again, it may be implemented in most drivers already ???

Nope.

[This message has been edited by richardve (edited 03-15-2002).]

Eric
03-15-2002, 05:06 AM
Regarding the caching of OpenGL states, I suppose you'll have the same problem than me with the use of display list. Say I have a display list that disables culling (uiList):




glEnable(GL_CULL_FACE);
glCallList(uiList);
glEnable(GL_CULL_FACE);


Your code has no way to know that calling uiList will disable culling. Hence when you call glEnable the second time, your routine will not actually change the state because it thinks that the culling is already enabled.

That kind of problem can be avoided by carefully planning your rendering loop but I thought I'd mention the problem anyway: chances are people will send you bug report on the caching not working properly while it is just a "logic" problem in their app.

You should probably have a note about that in your docs (sorry if it is already there, I am going to check !).

Regards.

Eric

Julien Cayzac
03-15-2002, 08:09 AM
Originally posted by Eric:
You should probably have a note about that in your docs (sorry if it is already there, I am going to check !).


There is virtually no doc at all for the moment http://www.opengl.org/discussion_boards/ubb/smile.gif

Thanks, I think it would be the only case where XGLSynchronizeStates() will be useful. I do not use display lists at all, so I would not have find this by myself...

Julien.

zeckensack
03-15-2002, 08:22 AM
Originally posted by richardve:
Nope.

Ohh, pity http://www.opengl.org/discussion_boards/ubb/frown.gif

Eric
03-15-2002, 08:44 AM
Actually, while thinking about it: you could intercept the glNewList command and keep track of all state changes in the display list. Then when glCallList is used, you actually have the necessary information to update the states kept by your manager.

Might not be very easy when using nested display lists..... Might also be a lot of work for nothing http://www.opengl.org/discussion_boards/ubb/wink.gif !

Regards.

Eric