float -> GLdouble for better compliance...
This commit is contained in:
parent
88c8bcb293
commit
94540d3ca6
|
@ -137,13 +137,13 @@ int Pick( const int & x, const int &y,
|
||||||
// (and therefore nothing was picked)
|
// (and therefore nothing was picked)
|
||||||
template <class PointType>
|
template <class PointType>
|
||||||
bool Pick(const int & x, const int &y, PointType &pp){
|
bool Pick(const int & x, const int &y, PointType &pp){
|
||||||
double res[3];
|
GLdouble res[3];
|
||||||
GLdouble mm[16],pm[16]; GLint vp[4];
|
GLdouble mm[16],pm[16]; GLint vp[4];
|
||||||
glGetDoublev(GL_MODELVIEW_MATRIX,mm);
|
glGetDoublev(GL_MODELVIEW_MATRIX,mm);
|
||||||
glGetDoublev(GL_PROJECTION_MATRIX,pm);
|
glGetDoublev(GL_PROJECTION_MATRIX,pm);
|
||||||
glGetIntegerv(GL_VIEWPORT,vp);
|
glGetIntegerv(GL_VIEWPORT,vp);
|
||||||
|
|
||||||
float pix;
|
GLfloat pix;
|
||||||
glReadPixels(x,y,1,1,GL_DEPTH_COMPONENT,GL_FLOAT,&pix);
|
glReadPixels(x,y,1,1,GL_DEPTH_COMPONENT,GL_FLOAT,&pix);
|
||||||
GLfloat depthrange[2]={0,0};
|
GLfloat depthrange[2]={0,0};
|
||||||
glGetFloatv(GL_DEPTH_RANGE,depthrange);
|
glGetFloatv(GL_DEPTH_RANGE,depthrange);
|
||||||
|
|
Loading…
Reference in New Issue