Results 1 to 6 of 6

Thread: glDrawPixels

  1. #1
    Senior Member Regular Contributor
    Join Date
    Sep 2005
    Location
    Dayton
    Posts
    148

    glDrawPixels

    I am helping work on a project that draws an image to the screen using glDrawPixels(). This is being drawn inside a xMotif scroll window (I believe anyways). When we click on the scrollbar, it takes 3-4 seconds to draw the new image and move the scroll bar. I thought about storing the glDrawPixels in a display list to try to make the moving more efficient. We applied the display list concept, but upon moving the scroll bars, the image still takes 3-4 seconds to redraw. Should a display list cause glDrawPixels to be more efficient? I don't know much else about the program other than the little bit I have told you. These are very BIG files being displayed and drawn. But the project looks very bad when the scrolling doesn't even keep up with the mouse. If display lists are not a viable way to go, is there anything else out there that can make glDrawPixmap() more efficient? I have been searching the site and google but have yet to come up with anything. Thanks for your help once again!

  2. #2
    Senior Member Regular Contributor
    Join Date
    Aug 2004
    Location
    Palo Alto, CA
    Posts
    111

    Re: glDrawPixels

    Can you mention what GPU are you using and also what is the size of the image that you are trying to display ?

  3. #3
    Senior Member Regular Contributor
    Join Date
    Sep 2005
    Location
    Dayton
    Posts
    148

    Re: glDrawPixels

    I honestly do not know the size of the file but that it is just rather very large and the only thing I know about the machine is it is a Sun. Sorry I don't know much else.

  4. #4
    Senior Member OpenGL Pro
    Join Date
    Jul 2001
    Location
    France
    Posts
    1,662

    Re: glDrawPixels

    Then can you say more about what you are trying to do exactly ?

  5. #5
    Senior Member Regular Contributor
    Join Date
    Sep 2005
    Location
    Dayton
    Posts
    148

    Re: glDrawPixels

    They read in a BIG image like I said before and only show a portion of it on the screen. Then they include scroll bars to navigate to different areas of the image. The problem is each time they move the scroll bar, they have to redrawe the image which takes 3-5 seconds which means the scrolling is not smooth but rather very rigid. They are drawing the image using glDrawPixels but thought maybe throwing it in a display list could make it draw more efficiently. My question is, can glDrawPixels or something like this be put into a display list to become more efficient and if so how? Or is glDrawPixels as efficient as one can get when drawing an image in this manner? Thanks and hope I said more about what I am trying to do.

  6. #6
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: glDrawPixels

    Use a Texture about the size of screen, on a quad.
    When scrolling, change the texture coordinates accordingly, and use glTexSubImage to update the new part.

Similar Threads

  1. Using glDrawPixels
    By Mukund in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 10-27-2010, 02:51 PM
  2. glDrawPixels
    By in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 06-10-2003, 07:43 AM
  3. glDrawPixels
    By sgiuser in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 08-07-2001, 12:10 PM
  4. glDrawPixels help; glDrawPixels vs. Texture Mapping for bitmaps
    By vorbisus in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 06-11-2001, 10:07 AM
  5. glDrawPixels
    By JBrooks in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 08-16-2000, 10:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean