c++ - Change OpenGL coordinates to window coordinates using gluProject method -
i want alter opengl coordinates window coordinates using gluproject method. here part of code:
{ float test = m_nusha.getextremeleftpicturepoint(); float test1 = m_nusha.getextremerightpicturepoint(); float test2 = m_nusha.getextremetoppicturepoint(); float test3 = m_nusha.getextremebottompicturepoint(); gluproject(test, holey, holez, mvm, projm, viewport, &leftpictureside, &holey1, &holez1); gluproject(test1, holey, holez, mvm, projm, viewport, &rightpictureside, &holey1, &holez1); gluproject(holex, test2, holez, mvm, projm, viewport, &holex1, &toppictureside, &holez1); gluproject(holex, test3, holez, mvm, projm, viewport, &holex1, &bottompictureside, &holez1); }
but why leftpictureside , rightpictureside equal(543) if test , test1 have differends signs? because gluproject-method accepts first argument gldouble type(is gldouble unsigned type?).and why toppictureside , bottompictureside equal(142) if test2 , test3 variables quite different? how prepare it?
c++ opengl glut
No comments:
Post a Comment