Page 1 of 1

checking opengl calls state

Posted: 15 Feb 2013, 13:08
by Ezio
it's basically a simple class / struct that saving opengl state, if state changed then we redraw it, it might be improves performance a bit. the problem is i want to make a class to check all state (glnormals, glmaterials ..), but it could make a fps drops while rotating (not sure about roaming around).

i attached a patch, it's only track lightning since it comes out first in gdebugger, i think it's sun

Re: checking opengl calls state

Posted: 15 Feb 2013, 14:39
by Per
It is a good idea, and we already have code that does similar things in lib/ivis_opengl/piestate.cpp, so it should go in there. Also, please make sure your patch does not contain spurious changes, such as randomly changing the indentation of unrelated comments...

Re: checking opengl calls state

Posted: 16 Feb 2013, 10:10
by Ezio
Per wrote: such as randomly changing the indentation of unrelated comments...
i think it's because LF CLRF thing, not sure how to ignores it.and do we have enum / struct that saving coordinates / location in x,y,z using glfloat before i made a new one :)

Re: checking opengl calls state

Posted: 16 Feb 2013, 17:28
by Per
Ezio wrote:do we have enum / struct that saving coordinates / location in x,y,z using glfloat before i made a new one :)
lib/ivis_opengl/piematrix.cpp ?

Also see #3935.