Fastest way to draw images

gui
opengl
windows

#1

Hello.

NEWBIE alert on OpenGL/drawing… :slight_smile:

I am using a lib that supplies me with video frames, as either YUV or RGB buffers (always the same size). The buffers are allocated by the lib. I have no choice over their memory location. My problem is I’d like to find a way to render them as efficiently as possible (wrt CPU) at a well-defined rate.

I am really sorry. There are multiple forum posts on this topic, but after reading and studying them, I still cannot find an answer I am sure of.

Before choosing the solution, I have created a test app that loads several JPGs and stores them in Image instances in memory.

I am using an OpenGLComponent, but I am not sure if I need to draw the image in the render() method or in the regular Paint( ) method. Also, I am unsure whether using the OpenGLImageType could make a difference here. Or should I maybe use an OpenGL texture ?

Regarding the timing, would it be more efficient to ask for continuous OpenGL rendering, and measure elapsed time to check if I need to draw the next image, or should I use the regular event loop with a timer (in Paint( ) )?

And, last question, how is it possible to know what are the supported pixel formats and if YUV drawing is possible ? (maybe I need to use OpenGL textures if I wish to use YUV ?). YUV could be more efficient if the main bottleneck is upload speed to GPU…

Thank you very much in advance for your help