checking opengl calls state

For code related discussions and questions
Post Reply
User avatar
Ezio
Trained
Trained
Posts: 306
Joined: 24 Apr 2010, 16:42

checking opengl calls state

Post 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
Attachments
compare.png
0001-testing-opengl-state-checker.patch
(6.17 KiB) Downloaded 220 times
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: checking opengl calls state

Post 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...
User avatar
Ezio
Trained
Trained
Posts: 306
Joined: 24 Apr 2010, 16:42

Re: checking opengl calls state

Post 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 :)
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: checking opengl calls state

Post 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.
Post Reply