|
From: David L. <dlo...@xR...> - 2003-12-02 03:24:48
|
Chetan,
We don't ever call GL_COMPILE_AND_EXECUTE for that very reason. We do compile
the lists on render when necessary, but we use GL_COMPILE only. We call the
lists thereafter. I'm not quite sure how GL_COMPILE_AND_EXECUTE works such
that it slows down the render process--perhaps it compiles as it is
executing.
An extra subroutine isn't necessary as when the lists are compiled really
doesn't matter, just that they aren't being executed concurrently with their
compilation (I believe).
In any case, we used to use GL_C_AND_E but found that it slowed things down
and after we switched over to just GL_C and then calling the list things sped
up.
The code looks like this:
> void render()
> {
> if(!mDisplayListId)
> {
> mDisplayListId = glGenLists(1);
> glNewList(mDisplayListId,
> GL_COMPILE);//<-----------------------------
> .......
> glEndList();
> }
>
> glCallList(mDisplayListId);
> }
-Dave
On Monday 01 December 2003 02:07 pm, Chetan Dandekar wrote:
> Dear All,
>
> On a opengl discussion board, I recently found a post saying
> GL_COMPILE_AND_EXECUTE
> slows down the rendering.
>
> What we genereally do (in glam and my application) is:
>
> void render()
> {
> if(!mDisplayListId)
> {
> mDisplayListId = glGenLists(1);
> glNewList(mDisplayListId,
> GL_COMPILE_AND_EXECUTE);//<-----------------------------
> .......
> glEndList();
> }
> else
> glCallList(mDisplayListId);
> }
>
> If the above post is correct, we should make some changes, like having a
> separate subroutine
> for just compiling the display lists (using GL_COMPILE), and only
> calling them in the
> render() function.
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> Does SourceForge.net help you be more productive? Does it
> help you create better code? SHARE THE LOVE, and help us help
> YOU! Click Here: http://sourceforge.net/donate/
> _______________________________________________
> glam-devel mailing list
> gla...@li...
> https://lists.sourceforge.net/lists/listinfo/glam-devel
|