Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: What to use instead of glDrawPixels

  1. #1
    Junior Member Newbie
    Join Date
    Dec 2007
    Posts
    17

    What to use instead of glDrawPixels

    Hi All,

    Currently I use glDrawPixels to display some live data from a camera.
    I am aware that this is not the right way to do this because glDrawPixels is deprecated.

    Any idea how to display a databuffer of 640 * 640 pixels @ 60Hz without using glDrawPixels?

    The full capacity of the camera is 2560 * 2048 pixels @ 120 frames/sec.
    Can Opengl handle such large block of data at once?

    Thanks in advance.

    Peter

  2. #2
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    3,126
    Quote Originally Posted by PeterHer View Post
    Any idea how to display a databuffer of 640 * 640 pixels @ 60Hz without using glDrawPixels?

    The full capacity of the camera is 2560 * 2048 pixels @ 120 frames/sec.
    Can Opengl handle such large block of data at once?
    I would check what format your camera is generating as output. I would suspect its compressed in some form (e.g. MPEG4-AVC, etc.) . If so, you want to be talking to your GPU in terms of APIs that support feeding in compressed video data for GPU-based decompression and playback. For instance, for GeForce 8+ GPUs, NVidia has VDPAU which works very well.

    If it's not compressed, then that's a fair amount of bandwidth. Imagine 2560*2048 at 24-bit color. That's 15MB/frame * 120 fps = 1.8 GB/sec. Now that should easily fit down a PCIe x16 v2 interface (8 GB/s theoretical, prob more like 6.4 GB/sec in practice), if your GPU is fast enough to hack it. But you'll want to be careful how you subload the data to the card via PBOs to maximize performance. There's an article in Opengl Insights on this IIRC. In fact, looks like it's linked to that very web page.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •