Jump to content
  • Advertisement
Sign in to follow this  

gluProject Problems

This topic is 2845 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all,

I have been using gluProject in my 3D scene with the following code:

y_position, z_position, model_view_matrix, projection_matrix, viewport, &label_position_x, &label_position_y, &label_position_z);

print("Marker" ,label_position_x,label_position_y);

glGetDoublev(GL_MODELVIEW_MATRIX, model_view_matrix);
glGetDoublev(GL_PROJECTION_MATRIX, projection_matrix);
glGetIntegerv(GL_VIEWPORT, viewport);

The problem is that the label 'Marker' is being drawn twice, once where it is supposed to be at (3D Object) and then again when the user is facing away from the object, but in the right position. That is, when I face the real marker, then turn exactly 180 degrees around there is another fake marker.

I think this may have something to do with a Z coordinate from gluProject, but I tried only drawing the marker when label_position_z was less than 0 and then only when more than 0; no results, still two markers.

Any help is greatly appreciated,


Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!