Objects not appearing on the screen [SOLVED]

Started by
5 comments, last by Braden 18 years, 2 months ago
My code is below. It used to work, but now it doesn't.



[Edited by - Braden on January 20, 2006 7:54:27 AM]
Regards,Braden
Advertisement
Quote:Original post by Braden
My code is below. It used to work, but now it doesn't.

*** Source Snippet Removed ***
That sucks.

In other less cynical words, we need more information.
What isn't it doing that it should be now that it's not working?
What changed to make it stop working?
Tell us as much as you can.
Well, I changed a lot of things. Too many to list. It is supposed to draw the objects stored in memory to the screen. Its not doing that =P

The objects themselves are fine. Its the code which draws it to the screen that is flawed.

I am not sure how I can be any more detailed.
Regards,Braden
Quote:Original post by Braden
Well, I changed a lot of things. Too many to list. It is supposed to draw the objects stored in memory to the screen. Its not doing that =P

The objects themselves are fine. Its the code which draws it to the screen that is flawed.

I am not sure how I can be any more detailed.
What have you done already in trying to debug it?

Are you sure it isn't being rendered? It could be that it's being rendered all black and you just can't see it if your background is black (this is surprisingly common). This is probably a normals or materials problem. But that's probably not it since you say the objects are fine (how do you know they're fine?).

Take out the lighting and texturing and try just rendering the geometry. Does that work?

In the future don't make such a large amount of changes at once. Test incrementally. It would be better if you had a good design and didn't have to make any changes to begin with, but that usually doesn't happen. It can certainly decrease the amount of changes needed though.
Yea, I agree with you. I made way too many changes.

I know that the objects are correct because I changed nothing in the object import code, and they worked before.

I just disabled all the textures and the objects still aren't appearing on the screen. I have the color set to 1,1,1 so I should be seeing something.

I also have it set to where I can pan around the scene (360 on the x axis and 180 degrees on the y axis) so if there were appearing behind the camera I would be able to see them too.
Regards,Braden
Here is some updated code. The objects now appear on the screen, but they appear in the upper lefthand corner of the screen almost completly out of view and when I move my mouse to pan the camera around it causes the objects to spiral in the upper lefthand corner.



[Edited by - Braden on January 20, 2006 7:37:55 AM]
Regards,Braden
I solved the problem. I wasn't pushing and then popping the matrix when using the projection matrix to print my 2d stuff to the screen.

Thank you for the help! =)
Regards,Braden

This topic is closed to new replies.

Advertisement