1
C / Re: Backbuffer capture or multiple sprite copy to texture, CSFML 2.5.0
« on: October 18, 2022, 08:39:52 pm »
Ooh ok, awesome... because sfRenderTexture_getTexture returns a sfTexture pointer... that should work nicely. Thank you!
EDIT: Excellent! After a bit more hair-pulling and cursing at invisible demons, I did eventually get the desired result.
sfSprite_setTexture(transition.sprite, sfRenderTexture_getTexture(transitionrendtex), sfFalse);
That was the part I was a bit unsure of, even with your advice, but I eventually figured out just how to use the getTexture bit. Everything else seemed to be in working order... all of the sprites were being drawn to the RenderTexture just fine, as all I had to do was basically copy the original code and change the destination, then I could just draw that RenderTexture'd sprite to the main window with an alpha value at the end of the scene draw function... and I got the nice fade effect I was looking for. Dang, what a process... but it works now, and that's the important thing. I'm going to add your name to the special thanks list of our game if you'd like.
EDIT: Excellent! After a bit more hair-pulling and cursing at invisible demons, I did eventually get the desired result.
sfSprite_setTexture(transition.sprite, sfRenderTexture_getTexture(transitionrendtex), sfFalse);
That was the part I was a bit unsure of, even with your advice, but I eventually figured out just how to use the getTexture bit. Everything else seemed to be in working order... all of the sprites were being drawn to the RenderTexture just fine, as all I had to do was basically copy the original code and change the destination, then I could just draw that RenderTexture'd sprite to the main window with an alpha value at the end of the scene draw function... and I got the nice fade effect I was looking for. Dang, what a process... but it works now, and that's the important thing. I'm going to add your name to the special thanks list of our game if you'd like.