Hi Michael,

On 2 March 2012 02:41, Michael Schanne <michael.scha...@gmail.com> wrote:
> Using a PixelBufferObject did not appear to make any difference in 
> performance for me.  My video hardware only supports OpenGL 1.5, so that is 
> probably the reason.

What hardware is this?  It must be off towards a decade old, or a
decade out of date.

> I suspect the power of two issue is the cause of my performance problem.  
> When I create a 640x480 image I get a console message that it is being scaled 
> to 512x512.  However, when I try to create a 512x512 image instead, I get an 
> error message "Detected OpenGL error 'invalid enumerant' at After 
> Renderer::compile".  This is before I even attempt to load any video data 
> into the image.  What does this error mean?

There is too little to go on to know what caused the OpenGL error
report.  There are two routes you could take avoid the resize issue -
use TextureRectangle if supported by your hardware or set the size to
1020x512 and only use a portion of the image.

> Using 640x480 (which gets scaled to 512x512) I get a white quad, as I expect.

If it rescales for you you should still get a valid image, not a white
quad, so something is wrong here.  What I can't say, but the OSG has
been doing the automatic rescale since it's earliest days without any
problems being reported like this so the fact you are getting a white
quad suggests something else is going wrong on your system to cause
this problem.  I would suspect a OpenGL driver bug.

>  However, if I use 512x512 image, I see distorted green lines with a black 
> background on the quad, along with the error.  If I try to load any video 
> data at this point, the program crashes.

I would suspect a memory corruption issue with a crash, or just a
downright buggy OpenGL driver.  Is there a chance that your video is
being read at 640x480 and you are writing this to the 512x512 image
without cropping it?

> I also have the option of using a video frame of 8 bits per pixel (for a 
> greyscale image) but I have not been able to see the image at all in that 
> case.  I tried using the GL_LUMINANCE pixel format and GL_UNSIGNED_BYTE data 
> type, along with a few other combinations, but nothing has worked so far.

I think perhaps you need to take a step back and doing some more
general tests on your system to see what it's capable of.   Please
could you tell what OS, dev tools, OSG version, CPU + graphics
hardware you are working with.

Robert.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to