Blitting like DirectDraw

Did OpenGL has a buffer management system like direct draw so that I can blitting pixels between textures and the frame buffer?

I heard that glDrawPixels() is very slow because it copy from the main memory the video memory, and it didn’t work for textures.

Use glOrtho() and just draw textured quads.
glOrtho() guarantees 1:1 between pixels and
your coordinates if called right.

but I want to modify the texture in run time by copying some pixels from another texture to it. how can I do it?

I am plotting a direct draw/direct 3d application to opengl. that program often blit between off screen surfaces. how should I do this in opengl?

You have to copy the pixels manually and
re-upload the texture. OpenGL does not treat
textures as “surfaces” like DirectDraw does,
which is annoying in the case you mention,
but allows more performance optimizations in
other cases.

Try
glTexSubImage2D()
to update your texture.
it may be faster than glDrawPixels()

V-man

thanks a lot for the replies.

when I am drawing images like blitting in direct draw, should I use glDrawPixel() or draw a texture mapped rectangle?

I heard that glDrawPixel() is slow but texture mapping required its dimension to be a power-of-two.

thanks.