[SDL] help with SDL_SetVideoMode
Ryan C. Gordon
icculus at clutteredmind.org
Sun Jan 13 11:12:01 PST 2002
> printf("1\n");
> SDL_Rect rect;
> rect.x=0;
> rect.y=24;
> rect.w=22;
> rect.h=24;
> SDL_FillRect(screen, &rect, SDL_MapRGB(screen->format,255,0,0));
Don't use SDL_FillRect() on an OpenGL surface. Use gl* functions to
define the contents of the surface.
> printf("2\n");
> SDL_UpdateRect(screen, 0,24, 22, 24);
Use SDL_GL_SwapBuffers() instead of SDL_UpdateRect on an OpenGL surface.
--ryan.
More information about the SDL
mailing list