opengl鼠标交互(屏幕二维坐标到三维世界坐标的转换)
void CMFCopenglView::WindowsToGL(CPoint pt, GLdouble &posX, GLdouble &posY, GLdouble &posZ) {
GLint viewport[4];
GLdouble modelview[16];
GLdouble projection[16];
GLfloat winX, winY, winZ;
//GLdouble posX, posY, posZ;
glPushMatrix()...
原创
2021-06-27 13:02:22 ·
1017 阅读 ·
0 评论