Skip to content

Possible bug - trying to replicate the PullSpriteBatch example by TheSpydog #25

Description

@cyqoq2sx

Hi! I'm trying to replicate this SDL GPU example: https://github.com/TheSpydog/SDL_gpu_examples/blob/main/Examples/PullSpriteBatch.c described in this article: https://moonside.games/posts/sdl-gpu-sprite-batcher/ and I was able to get the little raviolis on screen, but - unlike the original example - they have black squares around them (it was supposed to be transparent, since the alpha is 0).

Image

This is what it looks like right now (with the raviolis changing every frame, as it should be).

Here's the original example:

Image

I compiled it myself, so I know that the original works. Furthermore, I'm using the same compiled shaders as the original.

Now that I look at them, maybe the color is a little bit different too? I'm not sure though, I think it might just be because of the difference in background around the sprites (colors can be perceived differently depending on the other colors around them).

Anyway, I've been trying to fix for some days now, without success; so I arrived at the conclusion that this could possibly be some kind of bug with cl-sdl3. Either that or I'm doing something wrong and just can't see it. I'm posting here because, if completed, this example could help other people learn the library.

It might be worth noting that I'm a beginner to lisp. Feel free to criticize my code. Also, I'm using SBCL.

My attempt at the PullSpriteBatch example: https://github.com/cyqoq2sx/Cl-sdl3-pull-sprite-batch

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions