Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Texture->texture render possible? #106

Open
Remusforte opened this issue Jul 20, 2018 · 0 comments
Open

Texture->texture render possible? #106

Remusforte opened this issue Jul 20, 2018 · 0 comments

Comments

@Remusforte
Copy link

Remusforte commented Jul 20, 2018

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

  • SDL_RENDERER_TARGETTEXTURE (renderer flag allowing it to target textures also)
  • SDL_TEXTUREACCESS_TARGET (texture flag allowing it to become a target)
  • SDL_SetRenderTarget (SDL2 command to change renderer target)

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant