From: Brian P. <br...@vm...> - 2009-07-31 14:49:04
|
Srimal Jayawardena wrote: > Hi all > > > I'm working on a Image recognition project where I need to do > calculations on different views (more than 100 frames) > of a 3d model within an order of less than 1 sec, in order to > calculate a particular optimization function. > > I am hoping to use OpenGL to obtain 2D pixel values from different 3D > view points, in the hope that the 3d h/w processing will do things a > lot faster for me. > > I need to render 100frames of 20,000 triangles > in less than 1sec. > > At the moment I am using glReadPixels() to read transformed pixel > values into memory. > > This is a bit slow and it takes around 10sec to grab 100 frames . > > Is there a faster way? Or would you recommend a > better approach? > > I've heard of buffer object ? but am not quite sure how they can > be used to grab pixel data into memory. > > Rendering the pixels into some virtual buffer is fine with my application > as long as reading the pixel values happens in less than 1 sec. > > > Any pointers would be much appreciated. > > Thanks in advance Which hardware/driver are you using? The only thing I can suggest is trying different format/type parameters to glReadPixels(). A combo such as GL_BGRA/GL_UNSIGNED_INT_8_8_8_8 might be a better match for the hardware layout and allow the driver to avoid swizzling. But this can vary from one gpu/driver to another. -Brian |