mmcmatthew / ssl-vision

Automatically exported from code.google.com/p/ssl-vision
GNU General Public License v3.0
0 stars 0 forks source link

Preview window does not render an image #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The preview window does not render an image unless it is flipped 
vertically XOR horizontally. This is because backface culling is enabled. 
Backface culling is totally pointless when the only thing OpenGL is being 
used for is to draw a single 2D image into a viewport (for that matter, 
why is OpenGL even used here?)

Also, again since the only thing being rendered is a single 2D image, 
there is no point enabling alpha testing, blending, or stencil testing. 
These are just an utter waste of potential performance.

The attached patch disables everything except multisampling (multisampling 
could potentially improve graphical quality), thus fixing the bug and also 
potentially improving performance, especially for people using lower-end 
graphics hardware.

Original issue reported on code.google.com by hea...@gmail.com on 5 May 2009 at 6:40

Attachments:

GoogleCodeExporter commented 9 years ago
It seems strange that culling breaks your rendering, given that it only uses
glDrawPixels which should have nothing to do with face orientations (no normals 
are
applied to glDrawPixels as far as I know?). I have tested flipping on both 
current
ATI and Nvidia machines, and it works fine... Out of curiosity, which
card/driver/distribution are you using?

The CULL_FACE item exists because it is used for the qpainter overlay feature. 
I will
add a patch which checks for whether this feature is used.

Similarly, Alpha testing + blending are intended to be used for rendering of
transparent overlays on top of the video stream. I will comment them out until
actually used.

Original comment by zick...@gmail.com on 5 May 2009 at 7:35

GoogleCodeExporter commented 9 years ago
Intel video card. It's not immediately obvious from looking at the OpenGL specs 
whether drawpixels should or should not be affected by backface culling; in any 
case, as I said, the render is only inhibited when hflip XOR vflip is true, 
suggesting that drawpixels is being implemented in the driver with a quad, 
which is 
a backface when the coordinates are inverted. Anyway, thanks for taking the 
time to 
look at this!

Original comment by hea...@gmail.com on 5 May 2009 at 7:58