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 5 of 5

Thread: quickly drawing images - movie like

  1. #1
    Junior Member Newbie
    Join Date
    Sep 2008
    Posts
    3

    quickly drawing images - movie like

    hi,

    im quite(absolutely) new to opengl programming and am searching for a fast way to draw computed pixel values.

    the situation is as follows: i hava an array in system memory(eg. at least 256*256*4 - in my case 4 grey level cooccurrence matrices or some other statistics extracted from some movie data), it changes every frame - and i want to bring it as fast to the monitor as possible (realtime).

    The pixelbufferobjects extension doesnt seem to exist according to ozone3ds caps viewer) on my graphics card - its an ati hd2400xt.

    im using a qt qglwidget to get a opengl context - and use glDrawPixels. howewer its pretty (incredibly) slow even on 512*512.

    glTexImage seems to be even slower.

    Does anyone know a way to draw (large eg 1024*1024*4) pixel arrays in a fast way (maybe a webpage with an simple explanation)? or even better knows a place where i can get some (hopefully simple) example source?

    Im searching for 2 weeks already and my code became such crap - i dont even dare to post it here.

    my development environment currently is windows xp and visualstudio 2005 - but it also has to work with linux.

    Thanks in Advance,
    hants

  2. #2
    Member Regular Contributor trinitrotoluene's Avatar
    Join Date
    Sep 2008
    Location
    Montérégie,Québec
    Posts
    354

    Re: quickly drawing images - movie like

    glTexImage seems to be even slower
    Do you try with glTexSubImage? NeHe have a tutorial to build an avi player which use glTexSubImage.

    Edit:
    The pixelbufferobjects extension doesnt seem to exist according to ozone3ds caps viewer) on my graphics card - its an ati hd2400xt.
    Do you fetch the latest drivers from ati? My video card is a TnT2 (1999) and I have GL_EXT_pixel_buffer_object extension supported!

  3. #3
    Senior Member OpenGL Pro Zengar's Avatar
    Join Date
    Sep 2001
    Location
    Germany
    Posts
    1,979

    Re: quickly drawing images - movie like

    Use SDL instead of OpenGL

  4. #4
    Junior Member Newbie
    Join Date
    Sep 2008
    Posts
    3

    Re: quickly drawing images - movie like

    thanks!

    the nehe site solves my problem pretty well

  5. #5
    Junior Member Newbie
    Join Date
    Sep 2008
    Posts
    3

    Re: quickly drawing images - movie like

    Well trinitrotoluene - you were right.

    My Card has the Pixel Buffer Objects extension available - using windows opengl headers probably wasnt such a good idea

    doing it the way its described in the tutorial resulted in bad performance when drawing 1024*1024 pixels.

    i solved it that way: http://videogameprogramming.blogspot...g-locking.html

    quite simple in the end - just a few lines more.
    now there are no performance problems anymore no matter how often i want to draw pixel arrays in any resolution i want

    Thanks again!

Posting Permissions

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