So, I'm writing my game engine - and i was working with adding an eventhandler and suddenly my graphics quit displaying. I know its running through my draw and update functions, but its not displaying.
Can you guys help me figure out what the problem is?
Here is the source code to my engine:
http://filebeam.com/08e51ed85e006c7ec3f8f1faa576b1de
Graphics Not Displaying
Looking into your 3DModel.cpp:
in Model3D::Load() you do loading a model like:
then in Model3D::Unload() you do unloading like:
How can you write 0 "create" methods and 2 "drop" method ?
in Model3D::Load() you do loading a model like:
Code: Select all
mesh = smgr->getMesh(file);
node = smgr->addAnimatedMeshSceneNode(mesh);Code: Select all
mesh->drop();
node->drop();it seems the problem is with your camera's target... 
if you (eg.) set the camera's position a bit behind the target it seems to work:
and greenya is right, you should not drop node and mesh !!! 
if you (eg.) set the camera's position a bit behind the target it seems to work:
Code: Select all
void Player::UpdateVariables(ICameraSceneNode * cam){
Model3D::GetMeshNode()->setPosition(Position);
cam->setTarget(Position);
cam->setPosition(Position - vector3df(0,0,1));
}while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:

http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
node->remove(); and MeshCache->removeMesh(mesh);mager wrote:Whats the proper way to delete a mesh or node?
if the camera's target is equal to it's position it can do strange things with the visualisation...mager wrote:And whats the cameras position have to do with even my skybox not displaying?
mybe you could say then it looks into itself tho...
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:

http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java