Advertisement

2d image, text and a 3d-cube....ARRRGHHHH!!!

Started by May 05, 2001 09:22 AM
0 comments, last by Roquqkie 23 years, 9 months ago
Hi I wont to draw a 2d-image, some 2d-text and a rotating 3d-cube... When I''m drawing the 2d image and 2d text I''m using gluOrtho2D so that I can use screen-coordinates (e.g. 320, 240)...Now when my app is running only the image and the text is drawed...Weird...Then if I try to render only the cube it works perfect...Why!? Please help me...I have to complete this BEFORE tomorrow morning! Best regards Roquqkie
Hi,
Well, if you''re using gluOrtho2D, your near and far clip planes are 1 and -1, so if your cube is larger than that then it will be clipped...
My advice: Use glOrtho( 0, whatever, 0, whatever, znear, zfar ) ( I think those are the proper parameters, but I may have switched znear and zfar )... that way you can still define the rotating cube in screen space and it can be larger than 1*1*1.

--Nairb

This topic is closed to new replies.

Advertisement