Copy Part Of OpenGL Texture to Another OpenGL Texture?

Hi,

I am using SDL 1.2 with OpenGL.

How would I copy part of one OpenGL texture
to another OpenGL texture?

Interested in using dirty rectangle system of drawing
to improve drawing performance
on old systems using OpenGL software rendering.

Thanks!

Jesse

…you can create a surface from the texture, blit the desired portion to another surface, then create a texture from that.

but why don’t you just use the second parameter to SDL_RenderCopy (srcrect or w/e) to render the dirty portion of the texture?------------------------
EM3 Nathaniel Fries, U.S. Navy

http://natefries.net/

Hi,

I am using SDL 1.2,
and I think SDL_RenderCopy
is only in SDL 1.3 version.

JesseOn Sun, 2010-06-13 at 05:44 -0700, Nathaniel J Fries wrote:

…you can create a surface from the texture, blit the desired portion
to another surface, then create a texture from that.

but why don’t you just use the second parameter to SDL_RenderCopy
(srcrect or w/e) to render the dirty portion of the texture?


EM3 Nathaniel Fries, U.S. Navy

http://natefries.net/


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

JeZ-l-Lee wrote:

Hi,

I am using SDL 1.2,
and I think SDL_RenderCopy
is only in SDL 1.3 version.

Jesse

…you can create a surface from the texture, blit the desired portion
to another surface, then create a texture from that.

but why don’t you just use the second parameter to SDL_RenderCopy
(srcrect or w/e) to render the dirty portion of the texture?


EM3 Nathaniel Fries, U.S. Navy

http://natefries.net/


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

fair enough.
the function you’re looking for to get the same type of implementation as I said for SDL 1.3 is glTexCoord() or something along those lines.> On Sun, 2010-06-13 at 05:44 -0700, Nathaniel J Fries wrote:


EM3 Nathaniel Fries, U.S. Navy

http://natefries.net/