The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
SDL_shader
vlag


Joined: 02 Feb 2012
Posts: 27
Hi

First, I apologize for my english again Wink
With you help, I wrote a GLSL shader class for SDL2 some month ago for the Solarus Engine which will render a SDL_Texture with an arbitrary shader (still WIP).
Issue and Sources

With the 1.2 release which coming soon, I'll continue this little project, planning to support GLES and DX shaders (if possible) in addition to GL ones, by using some additional libraries like MojoShader and Angle to be able to use a shader written with any of the 3 main shader languages on any driver context.

Before I start the remaining work, I wonder if someone could be interested by such a project, in which case I'll separate the code in a library like "SDL_shader" and change some implementation details.
The code is written in C++ and currently uses Lua5.1 to read and parse shader scripts, but if I'll separate the code from the engine, I think using an XML parser can be better.

For now, I "just" plan to add a little shader abstraction (especially with samplers type), and support GLSL ES and HLSL shaders, but it will surely change if an external library is considered.

Please let me know if this can interest someone, and/or if you have any advice to make me do the proper work possible or if you see a useful features which I didn't think about Wink

Thank you !
Best regards.