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

Thread: Hardware blitting

  1. #1
    Intern Contributor
    Join Date
    Feb 2000
    Location
    France
    Posts
    54

    Hardware blitting

    This could be VERY useful that OpenGL support hardware BitBlt and all this stuff, because glCopyPixel() and other functions are too slow and i can see many messages on the boards deal with "how can i do fast blitting ?".

  2. #2
    Super Moderator OpenGL Guru
    Join Date
    Feb 2000
    Location
    Montreal, Canada
    Posts
    4,421

    Re: Hardware blitting

    tell your hardware vendor that.
    ------------------------------
    Sig: http://glhlib.sourceforge.net
    an open source GLU replacement library. Much more modern than GLU.
    float matrix[16], inverse_matrix[16];
    glhLoadIdentityf2(matrix);
    glhTranslatef2(matrix, 0.0, 0.0, 5.0);
    glhRotateAboutXf2(matrix, angleInRadians);
    glhScalef2(matrix, 1.0, 1.0, -1.0);
    glhQuickInvertMatrixf2(matrix, inverse_matrix);
    glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
    glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

  3. #3
    Intern Contributor
    Join Date
    Feb 2000
    Location
    France
    Posts
    54

    Re: Hardware blitting

    Many vdo cards can do this nowadays. It's really simple a very fast, and even DirectDraw drivers manage to use it instead of software blitting. So why not OpenGL ? That could be great don't you think ?

  4. #4

    Re: Hardware blitting

    I think what V-man was trying to say is that its not OpenGL, its that your video card has to support optimal usage in their OpenGL drivers. If they wanted to they could optimize many diffrent areas of OpenGL to allow for fast blits, like say detecting if a rectangle has the same width and height as the texture map and then using the fastest operation they can by just blitting it. DirectDraw does the same thing, when I was first learning DirectDraw a long time ago I accidently was sending the wrong size rectangle to it, causing it to slightly scale the image by one pixel, I knew there was something wrong because performance was terrible (my guess was that it was reverting to software blits when I accidently stretched the image), if the driver developers wanted to they could do the same thing in opengl and detect the optimal kind of raster operation to use, if your video card does not support this then maybe you should ask them to, OpenGL has a frame work for it.

  5. #5
    Intern Contributor
    Join Date
    Feb 2000
    Location
    France
    Posts
    54

    Re: Hardware blitting

    Yes, i understand. But what i wanted to say is that OpenGL should provide fonctions better than glReadPixel() or glCopyPixel() for 2d blitting, and why not with the use of hardware blitting if the video card can make it.
    Antoche

  6. #6

    Re: Hardware blitting

    Well, maybe you should not use functions like glReadPixel or glCopyPixel, try using glBegin with one of primitive types, again if your video card drivers are built for performance they should be able to tell if you are passing an orthogonal rectangle the same dimensions as the texture and use the most optimal hardware/software blit routines for it.

Posting Permissions

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