Skip to content

sdl2.Texture.update() broken with transparent surfaces #2451

Open
@NALStudio

Description

@NALStudio

Environment:

You can get some of this info from the text that pops up in the console when you run a pygame program.

  • Operating system: Windows
  • Python version: 3.11.5
  • SDL version: 2.26.5
  • PyGame version: 2.3.2

Current behavior:
When passing a transparent surface into sdl2.Texture.update(), the resulting texture becomes a blank white texture.

Expected behavior:
Load the image correctly, simple as that. Results should be same as images without transparency (except for the transparency of course) and sdl2.Texture.from_surface() which handles transparency correctly.

Screenshots

Image WITHOUT transparency

image

Image WITH transparency

image

Steps to reproduce:

  1. Unzip the demo provided below
  2. Install pygame-ce
  3. Run _main.py

Demo:
doesn't work.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    _sdl2pygame._sdl2bugNot working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions