glSDL update

???,

We’ve fixed this bug, see new version of glSDL 0.71 here:

http://www.activekitten.com/pbc_download/glsdl071.zip

then we added sprite rotation/uv scaling/alpha changing.

it’s possible now to make some cool portable gfx with help of glSDL.> Hmm, that makes sense. With that change, it no longer crashes when I

do a blit, but it still doesn’t do the blit properly; it seems to only
copy a black square. I get the same result when I specify rectangles,
too. Here’s a small sample file I put together:
http://speed.sakabatou.net/test.cpp

It creates a 800x600 SDL_Surface named screen, then loads a 800x600
image named “shodan.png” and blits it to screen (feel free to use your
own 800x600 image); it blits a 60x60 square from near the middle of
screen to another surface, then blits that surface back to the
upper-left corner of screen. It works properly without SDL_GLSDL set,
but with it set, I just get a black square in the corner.

Rather weird that it doesn’t crash on OS X, actually. Are you sure
you’re actually compiling and/or using the glSDL layer?

Yes, I’m pretty sure; the frame rate jumps very noticeably from 40 fps
to about 460 fps. :wink: I also get messages from glSDL to stdout and
stderr. It seems like stdout just prints out the size of the main
surface, but stderr prints out a “Leaked TexInfo” message every time I
load an image, followed by the image’s resolution.

Please try this snapshot and see if that works better - or rather, if
it works at all: :wink:

Well, it compiles, but doesn’t quite work; it runs fine under OS X, but
the blitting behaves like I said above. Also, under WinXP it crashes
on startup. VS.NET’s debugger offers the following call stack trace:

experiment.exe!UnloadTexture(glSDL_TexInfo * txi=0x003e5e98) Line 2077

  • 0x21 C
    experiment.exe!FreeTexInfo(unsigned int handle=1) Line 338 + 0x12
    C


Best regards,
Dmitry Yakimov, ISDEF member
http://ActiveKitten.com

Great work. By the way, is the SDL’s official GL backend available now ?

“Dmitry Yakimov” ???> We’ve fixed this bug, see new version of glSDL 0.71 here:

http://www.activekitten.com/pbc_download/glsdl071.zip
then we added sprite rotation/uv scaling/alpha changing.
it’s possible now to make some cool portable gfx with help of glSDL.

nice work !