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

Thread: glDrawPixels on Matrox Millenium G450.

  1. #1
    Junior Member Newbie
    Join Date
    Jul 2002
    Location
    Israel
    Posts
    18

    glDrawPixels on Matrox Millenium G450.

    I made a simple function with the following code:

    glPushAttrib(GL_COLOR_BUFFER_BIT);
    glDisable(GL_BLEND);
    glDisable(GL_LINE_STIPPLE);
    glPixelStorei(GL_UNPACK_ALIGNMENT,4);
    glRasterPos2i(10, 10);
    glDrawPixels( (GLsizei)320, (GLsizei)240,GL_RGBA, GL_UNSIGNED_BYTE, rgbData);
    glPopAttrib();

    It runs on Windows XP Pentium IV 1.8GHz.
    With Matrox Millenium G450 graphic card.
    The dual screen is off.

    I take about 50 milliseconds to run this code with hardware acceleration, and about 7 milliseconds without hardware acceleration or Microsoft default driver which both of these scores are bad results.

    Any idea why?
    How can I improve it to a reasonable score?

    Thanks.

  2. #2
    Senior Member OpenGL Guru Relic's Avatar
    Join Date
    Apr 2000
    Posts
    2,527

    Re: glDrawPixels on Matrox Millenium G450.

    If it should be a pure color 2D drawing you need to switch off more:
    DEPTH_TEST(!)
    LIGHTING
    LOGIC_OP
    POLYGON_STIPPLE
    DITHER

    Try different formats like GL_BGRA_EXT.
    If that all doesn't help, maybe the Matrix (edit: Hehe, bon mot typo, I meant Matrox) implementation is just not HW accelerated.

    Try downloading as Texture and drawing a textured quad. (Switch off everything you don't need too here.)

  3. #3
    Junior Member Newbie
    Join Date
    Jul 2002
    Location
    Israel
    Posts
    18

    Re: glDrawPixels on Matrox Millenium G450.

    I tried to disable every flag, it doesn't improve anything.
    Even though, isn't it too big diffrence between hardware and software? 50ms(hardware) against 7ms(software). Shouldn't it be contrary?

    Any idea?

  4. #4
    Senior Member OpenGL Guru Relic's Avatar
    Join Date
    Apr 2000
    Posts
    2,527

    Re: glDrawPixels on Matrox Millenium G450.

    No, that's explainable. The software implementation uses drawing buffers in system memory. The addressing of video memory can be much slower.
    G450 is not very new nor highend, and Matrox OpenGL support is not famous.
    If glDrawPixels is still too slow try the other hints. This topic has been dicussed often before, search the forum.

Posting Permissions

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