Shaders

Is there a way to use pixel and vertex shaders in SDL 1.2.* or 1.3?

If you use OpenGL, sure. Otherwise, there is no guarantee what kind of
video backend you are using, so no.On Fri, Sep 18, 2009 at 10:55 AM, Cleber Tavares Jr. wrote:

Is there a way to use pixel and vertex shaders in SDL 1.2.* or 1.3?


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

2009/9/18 Brian <brian.ripoff at gmail.com>:

If you use OpenGL, sure. Otherwise, there is no guarantee what kind of
video backend you are using, so no.

You can pick the video driver by using SDL_VideoInit() and SDL_VideoQuit().
Like so:

int main(int, char**) {
SDL_Init(0);
SDL_VideoInit(“opengl”, 0);

/* … */

SDL_VideoQuit();
SDL_Quit();
}

You can find a more complete example here:
http://www.libsdl.org/cgi/docwiki.cgi/SDL-1.3/SDL_VideoInit> On Fri, Sep 18, 2009 at 10:55 AM, Cleber Tavares Jr. wrote:

Is there a way to use pixel and vertex shaders in SDL 1.2.* or 1.3?

use SDL_OPENGL with SDL_SetVideoMode() in 1.2.
look around on http://nehe.gamedev.net/ to figure out how.
also, here:
http://www.libsdl.org/cgi/docwiki.cgi/Examples#head-5e437742f42b1ed9ca6324a037736ef0da7b3c45

Thank you all!On Fri, Sep 18, 2009 at 7:58 PM, Kenneth Bull wrote:

2009/9/18 Brian <brian.ripoff at gmail.com>:

If you use OpenGL, sure. Otherwise, there is no guarantee what kind of
video backend you are using, so no.

You can pick the video driver by using SDL_VideoInit() and SDL_VideoQuit().
Like so:

int main(int, char**) {
SDL_Init(0);
SDL_VideoInit(“opengl”, 0);

/* … */

SDL_VideoQuit();
SDL_Quit();
}

You can find a more complete example here:
http://www.libsdl.org/cgi/docwiki.cgi/SDL-1.3/SDL_VideoInit

On Fri, Sep 18, 2009 at 10:55 AM, Cleber Tavares Jr. <@Cleber_Tavares_Jr> wrote:

Is there a way to use pixel and vertex shaders in SDL 1.2.* or 1.3?

use SDL_OPENGL with SDL_SetVideoMode() in 1.2.
look around on http://nehe.gamedev.net/ to figure out how.
also, here:

http://www.libsdl.org/cgi/docwiki.cgi/Examples#head-5e437742f42b1ed9ca6324a037736ef0da7b3c45


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Cleber Tavares Jr.
Diretor de Game Design

Iterum Game Studio
www.iterum.com.br

\//-