renpy / pygame_sdl2

Reimplementation of portions of the pygame API using SDL2.
GNU Lesser General Public License v2.1
325 stars 63 forks source link

Texture->texture render possible? #106

Closed Remusforte closed 1 month ago

Remusforte commented 6 years ago

SDL2 has the following commands that allow texture->texture rendering:

I see some reference to Render Target Texture ("rtt") in render.pyx:

cdef rinfo_to_dict(SDL_RendererInfo *rinfo):

Ignore texture_formats for now.

return {
        "name" : rinfo.name,
        "software" : rinfo.flags & SDL_RENDERER_SOFTWARE != 0,
        "accelerated" : rinfo.flags & SDL_RENDERER_ACCELERATED != 0,
        "vsync" : rinfo.flags & SDL_RENDERER_PRESENTVSYNC != 0,
        "rtt" : rinfo.flags & SDL_RENDERER_TARGETTEXTURE != 0,     #<---- HERE ---
        "max_texture_width" : rinfo.max_texture_width,
        "max_texture_height" : rinfo.max_texture_height,
}

But I am not clear if it has actually been implemented in the module. Is there a way to do texture->texture renders via pygame_sdl2.render?

Thanks!