Game Development Community

Canonical state

by Kevin Johnson · in Torque Game Engine · 04/21/2004 (2:58 pm) · 4 replies

Can someone point me to a good example of what all i need to check Im having problems getting back to a canonical state?

#1
04/22/2004 (7:34 am)
DglIsInCanonicalState() and dglSetCanonicalState()* are the best places to start

* if you are using multi-texturing dglSetCanonicalState() doesn't get everything
#2
04/22/2004 (7:48 am)
That can be a real trap. Set a breakpoint in dglIsCanonicalState and step through it to see where it fails. That should tell you what you're missing.

Clark Fagot wrote a .plan a bit back that talks about removing any and all references to setCanonicalState because it kills off framerate. You can make small optimizing speed gains by doing this.

- Brett
#3
04/22/2004 (8:53 am)
Yeah.. i was using dglSetCanonicalState() and it was during multi texuring..i'll debug a little more tonight
#4
04/22/2004 (9:16 am)
I followed Clark's lead and removed all those calls and the framerate improved by about 3%. Just make sure you set the state back to what ever you change it to manually.