[SDL] SDL 2.0 Surface to OpenGL Texture
Alex Barry
alex.barry at gmail.com
Thu May 17 20:24:15 PDT 2012
Thanks gents, I got this working, and it turns out most of my issue was
that I wasn't using proper coordinates for aligning the texture on my gl
quad vertices. Anyway, I fixed that up, and it's pretty awesome.
Anyone interested in the code can peek at it here:
https://github.com/mrozbarry/bitfighter-experiments/blob/master/bitfighter1.0/sdlutil.cpp
SDL::Surface is the class you'll want to prod at, and the openglBindTexture
method would be the exacting place to look.
Thanks for all the help gents, you were super.
-Alex
On Tue, May 15, 2012 at 12:04 PM, Jonathan Dearborn <grimfang4 at gmail.com>wrote:
> Well, I adapted that for SDL_gpu (http://code.google.com/p/sdl-gpu/) and
> got it to work. Maybe you can look through the SDL_gpu source? Check
> out OpenGL/SDL_gpu_OpenGL.c, specifically Init(), CopyImageFromSurface(),
> and Blit(), though Blit() is a little obfuscated by features. I'm also
> assuming NPOT texture support.
>
> Jonny D
>
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20120517/caa7a41f/attachment.htm>
More information about the SDL
mailing list