Please test my app!
whoa puh!!! that did it! you are the man!! thnx for the comments and the help. The map runs smoothly now!!
@mm765: thnx! I lost the link to the irc channe. could someone please post it to be used with chatzilla?
ps. has anyone tried the other features? (changing cameras, wireframe rendering , etc). I'm sure my errors are very basic things, like the one Puh detected in y particles.
thanks guys!
I appreciate it!
@mm765: thnx! I lost the link to the irc channe. could someone please post it to be used with chatzilla?
ps. has anyone tried the other features? (changing cameras, wireframe rendering , etc). I'm sure my errors are very basic things, like the one Puh detected in y particles.
thanks guys!
I appreciate it!
Hm, you're having this in your while loop:
seems you're addin one camera each frame... thats no good.
Add 2 cameras before the while(device->run())
MayaCam = smgr->addCamerraSceneNodeMaya(...)
NormalCam = smgr->addCamerraSceneNode(...)
these need to be global like the camera array
// before main()
ICameraSceneNode *MayaCam, *NormalCam;
you could also expand your camera array: camera[6] and use camera[4] and camera[5] instead...
then initialize
camera[3] = NormalCam;
in the eventReceiver say:
just quickly made this up, might contain error or two. But you get the idea...
Btw, would help a lot making your code more readably if you'd use some identation:
instead of:
Code: Select all
if (Maya) {
//maya cam
camera[3] = smgr->addCameraSceneNodeMaya(); <---------------------
//Draw scene
smgr->drawAll();
}
//-----------------------------------------------------------------------------------------------//
//If Normalcam is used
if (Normalcam) {
//Normalcam
camera[3] = smgr->addCameraSceneNodeFPS(); <---------------------
camera[3]->setPosition(core::vector3df(-2000,200,0));
camera[3]->setRotation(core::vector3df(0,90,0));
camera[3]->setFarValue (50000.0f) ;
camera[3]->setFOV(1.1);
camera[3]->setTarget(core::vector3df(-2000,200,0));
//Draw scene
smgr->drawAll();
}
Add 2 cameras before the while(device->run())
MayaCam = smgr->addCamerraSceneNodeMaya(...)
NormalCam = smgr->addCamerraSceneNode(...)
these need to be global like the camera array
// before main()
ICameraSceneNode *MayaCam, *NormalCam;
you could also expand your camera array: camera[6] and use camera[4] and camera[5] instead...
then initialize
camera[3] = NormalCam;
in the eventReceiver say:
Code: Select all
//Key M enables Maya camera
if (event.KeyInput.Key == KEY_KEY_M && event.KeyInput.PressedDown)
{
camera[3] = MayaCam;
return true;
}
//Key N enables fps cam
if (event.KeyInput.Key == KEY_KEY_N && event.KeyInput.PressedDown)
{
camera[3] = NormalCam;
return true;
}
Btw, would help a lot making your code more readably if you'd use some identation:
Code: Select all
main() {
while(true) {
if (false) {
}
}
}
Code: Select all
main() {
while(true) {
if (false) {
}
}
}
mh, the wireframe thing is not that critical. But you could do this:
instead of this:
to be able to switch back!
Also you could kick out some of your smgr->drawAll() calls...
Code: Select all
meshnode->setMaterialFlag(video::EMF_WIREFRAME,WireFrame);
sydneynode->setMaterialFlag(video::EMF_WIREFRAME,WireFrame);
Code: Select all
if (WireFrame) {
//render in wireframe
meshnode->setMaterialFlag(video::EMF_WIREFRAME,true);
sydneynode->setMaterialFlag(video::EMF_WIREFRAME,true);
}
Also you could kick out some of your smgr->drawAll() calls...
great Jox! It seems like someone will be having fun this afternoon!!!
BTW, what ever happened with the DX mipmapping bug we were tracking? did it get solved? If you compile my test app with DX8-9 you'll se some weird things (jaggies) occur in the shadows. I guess it has to do with the same thing.
many many many thnx!
BTW, what ever happened with the DX mipmapping bug we were tracking? did it get solved? If you compile my test app with DX8-9 you'll se some weird things (jaggies) occur in the shadows. I guess it has to do with the same thing.
many many many thnx!
-
- Posts: 20
- Joined: Tue Sep 21, 2004 9:08 pm