nestal
January 2, 2001, 7:04pm
1
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.
system
January 2, 2001, 7:24pm
2
Use glOrtho() and just draw textured quads.
glOrtho() guarantees 1:1 between pixels and
your coordinates if called right.
nestal
January 3, 2001, 5:17am
3
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?
system
January 3, 2001, 12:27pm
4
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.
system
January 3, 2001, 2:02pm
5
Try
glTexSubImage2D()
to update your texture.
it may be faster than glDrawPixels()
V-man
nestal
January 3, 2001, 3:25pm
6
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.