Having problems with twSurfaceReference
by JC · in Torque Game Engine · 01/01/2003 (2:46 pm) · 4 replies
I downloaded the release of fxGrassReplicator that has twSurfaceReference already integrated with it. I have gone thru the install 3 times trying to get it working. I've tried with HEAD (from 12/26/02) and 1.1.2.
fxGrassReplicator works just fine, but when I try to use twSurfaceReference I get this fatal error:
"Error, object of class twSurfaceReference either unbalanced the xform stacks, or didn't reset the viewport! mv(2 2) proj(1 2) t0(1 1), t1(1 1) (0 22 1024 746: 0 22 1024 746)"
The title of the error window is "Fatal: (d:\torque\engine\scenegraph\scenestate.cc @ 117)"
This happens when I try to place the object. Right after I type in the name and click ok (or create or whatever the button says) this error pops up and everything takes a crap.
I'm clueless about 3d programming, so any help is appreciated.
fxGrassReplicator works just fine, but when I try to use twSurfaceReference I get this fatal error:
"Error, object of class twSurfaceReference either unbalanced the xform stacks, or didn't reset the viewport! mv(2 2) proj(1 2) t0(1 1), t1(1 1) (0 22 1024 746: 0 22 1024 746)"
The title of the error window is "Fatal: (d:\torque\engine\scenegraph\scenestate.cc @ 117)"
This happens when I try to place the object. Right after I type in the name and click ok (or create or whatever the button says) this error pops up and everything takes a crap.
I'm clueless about 3d programming, so any help is appreciated.
#3
Here it is:
Works great now. Thanks for posting the resource :D
01/02/2003 (10:27 am)
No sweat. The fix to the problem was posted in a comment for the fxGrassReplicator.Here it is:
Quote:Adam "OnO" Strzelecki (Dec 10, 2002 at 08:59 EST) Resource Rating: 5
Bendik, Paul, Ken:
Thanks a lot... I even didn't managed to sit in front of my computer and you have done some much. You rock...
BTW. I found a little bug (is it a bug.. or a debug feature). It's about rendering in twSurfaceReference.cc - I got error about restoring viewport. I fixed it by:
(As it is in Bendik's code)
Line 402 is:
glMatrixMode(GL_MODELVIEW);
dglSetViewport(viewport);
Line 402 should be (??):
//Restore out nice and friendly canonical state.
glMatrixMode(GL_PROJECTION);
glPopMatrix();
glMatrixMode(GL_MODELVIEW);
dglSetViewport(viewport);
Thanks,
Works great now. Thanks for posting the resource :D
#4
01/02/2003 (11:39 am)
Roger that. I guess I should amend that resource to add the fix.
Torque Owner JC