I am using pro/Toolkit to develope some code to read pixel depth of proE model from proE view window with openGL function glReadPixels(), but all I got was 1. Actually it should be different value for different pixel of the model displaying. The codes are as following,
const int width=1024;
const int height=768;
float z[width*height];
glReadPixels(0,0,width,height,GL_DEPTH_COMPONENT,GL_FLOAT,z) ;
Any comment is welcome and appreciated.
const int width=1024;
const int height=768;
float z[width*height];
glReadPixels(0,0,width,height,GL_DEPTH_COMPONENT,GL_FLOAT,z) ;
Any comment is welcome and appreciated.