[SDL 1.3] Bug with opengl renderer?

Hello,

I’m using SDL 1.3 and when I use the ‘opengl’ renderer, the following
instructions paint ALL the window in blue:

{
SDL_Rect rect = {10, 10, 10, 10};
SDL_RenderFill(0, 0, 255, SDL_ALPHA_OPAQUE, &rect);
SDL_RenderPresent();
}

but the SDL_Rect pointer is not null !
And this happens on Windows and on Linux.
When I use the ‘d3d’ or ‘gdi’ renderer on Windows or the 'software’
renderer on Linux, only the correct rectangle is paint in blue.

Is it a bug in the ‘opengl’ renderer ??
Or did I miss something (like specific flags to give somewhere) ?

Thank you for your answers.

Yannick Bersier

I would guess that it’s doing a glClear without first setting glScissor.

But it could just as easily do a glDrawRangeElements(GL_TRIANGLES, …) with the appropriate arrays set up.

Puzzling - but I have no experience with the SDL GL blitting code though.

Yannick Bersier wrote:> Hello,

I’m using SDL 1.3 and when I use the ‘opengl’ renderer, the following
instructions paint ALL the window in blue:

{
SDL_Rect rect = {10, 10, 10, 10};
SDL_RenderFill(0, 0, 255, SDL_ALPHA_OPAQUE, &rect);
SDL_RenderPresent();
}

but the SDL_Rect pointer is not null !
And this happens on Windows and on Linux.
When I use the ‘d3d’ or ‘gdi’ renderer on Windows or the 'software’
renderer on Linux, only the correct rectangle is paint in blue.

Is it a bug in the ‘opengl’ renderer ??
Or did I miss something (like specific flags to give somewhere) ?

Thank you for your answers.

Yannick Bersier


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


Forest ‘LordHavoc’ Hale
Author of DarkPlaces Quake1 engine and mod
http://icculus.org/twilight/darkplaces/
Address: 94340 Horton Road Blachly OR 97412
Phone/Fax: 541-925-4130