
OTK for viewing camera pictures frequently?
Posted Tuesday, 24 November, 2009 - 07:15 by fred inGood morning everyone,
i was wondering about the abilities and advantages
in viewing camera pictures at high framerates of the OTK.
I'm currently viewing pictures on the PictureBox and
sometimes by blitting them on my form.
This is well done while that program has nothing else
to do.
With BitBlt it is necessary resizing bitmaps in before
and the speed advantage is gone.
So my question is, would it be possible at all with OGL
to only view pictures frequently and do a little drawing like lines
faster than .Net stuff and P/Invoke does?
ps. I was fiddeling around a bit and what I'm not succeeded in
was creating textures fast and viewing them just like pictures
on the screen.
Thanks in advance.
fred


Comments
Re: OTK for viewing camera pictures frequently?
OpenGL will help you maintain high framerates when resizing, zooming or panning a picture. However, It will not help you load a picture faster from disk.
I have written a book page explaining how to load a texture: http://www.opentk.com/doc/graphics/textures/loading
To learn how to render the texture, use the code from the texturing sample (included in OpenTK under Source/Examples/OpenGL/1.1/Textures.cs). This snippet in your Paint handler should do the trick:
Re: OTK for viewing camera pictures frequently?
Thank you very much for your fast response.
I will have a look at it .
Re: OTK for viewing camera pictures frequently?
To speed up texture loading you may have a look at PBO.
whole process at 8bppxlIndexed?
Hi,
at first I had to disable the TransparencyKey of the main Window.
But then I got it to work.
Thanks again...
But one question remains.
The pictures from the camera are in 8bppxlIndexed color format.
Would it probably be better setting the whole process to 8bit?
I haven't found a way by setting "PixelInternalFormat" aso. to another
value but unfortunately got a lot of blue screens thereby...
Re: OTK for viewing camera pictures frequently?
For best compatibility and speed, I'd recommend always using 32bit textures nowadays. 8bit palleted textures stopped being supported natively many years ago (around the Geforce FX era) and they might even cause problems on less robust OpenGL drivers like Intel's.
Re: OTK for viewing camera pictures frequently?
You're great...