# gluProject Problems

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

## Recommended Posts

Hi all,

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

gluProject(x_position, 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,

mikey

1. 1
2. 2
Rutin
16
3. 3
4. 4
5. 5

• 26
• 11
• 9
• 9
• 11
• ### Forum Statistics

• Total Topics
633709
• Total Posts
3013477
×