c++ - OpenGL, gluUnProject gives -1.#IND -


I tried to do almost everything, but copied a lot of code from different forums but nothing works. What's the problem? I have a loop where I draw the object from the vector. I want to create that object where the user clicked in the 3D space. This code is where I am trying to do this:

  if (glfwGetKey (window, GLFW_KEY_F) == GLFW_PRESS & amp; glfwGetMouseButton (window, GLFW_MOUSE_BUTTON_LEFT) == GLFW_PRESS & amp; check == incorrect) {Double X, Y; GlfwGetCursorPos (window, & amp; x, & amp; y); Double MV Metrix [16]; Double progmatics [16]; Int viewport [4]; Double DX, DY, DZ, Dedlblicke; // glUnProject uses doubles, but I am using these 3D vectors for floating glGetIntegerv (GL_VIEWPORT, viewport); Glaggad WP (GLIMDLIUUUUUTIIIIRIIX, MVMatrix); Glagetable (GL_PROJECTION_MATRIX, Proogamatics); DClickY = Double (1080 - y); Mouse report with dX, & amp;, sub, & amp; // open below, gluUnProject (0,0) above (0,0) on x, dClickY, 0.0, mvmatrix, projmatrix, viewport, & amp; (0,0) ) Renders with; dz); Bricks.push_back (new cube (0,0,0,1110)); Bricks [bricks.size () - 1] - & gt; Translation (DX, DY, DZ); Check = true}  

After that operation dX, there is sub and dZ-1. # Ind. What am i doing


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -