Mercurial > sdl-ios-xcode
comparison src/video/win32/SDL_gdirender.c @ 2222:926294b2bb4e
Emphasized the separation between SDL_Surface and SDL_Texture
- SDL_Surface is a system memory representation of pixel data
- SDL_Texture is a video memory representation of pixel data
The concept of SDL_Surface with SDL_HWSURFACE is no longer used.
Separated SDL_Texture types by usage rather than memory type
- SDL_TEXTUREACCESS_STATIC is for rarely changed pixel data,
can be placed in video memory.
- SDL_TEXTUREACCESS_STREAMING is for frequently changing pixel
data, usually placed in system memory or AGP memory.
Optimized the SDL_compat usage of the OpenGL renderer by only
using one copy of the framebuffer instead of two.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 11 Aug 2007 20:54:31 +0000 |
parents | 8055185ae4ed |
children | e1da92da346c |
comparison
equal
deleted
inserted
replaced
2221:1d75c38e1e5c | 2222:926294b2bb4e |
---|---|
302 } else { | 302 } else { |
303 data->format = texture->format; | 303 data->format = texture->format; |
304 } | 304 } |
305 data->pitch = (texture->w * SDL_BYTESPERPIXEL(data->format)); | 305 data->pitch = (texture->w * SDL_BYTESPERPIXEL(data->format)); |
306 | 306 |
307 if (data->yuv || texture->access == SDL_TEXTUREACCESS_LOCAL | 307 if (data->yuv || texture->access == SDL_TEXTUREACCESS_STREAMING |
308 || texture->format != display->current_mode.format) { | 308 || texture->format != display->current_mode.format) { |
309 int bmi_size; | 309 int bmi_size; |
310 LPBITMAPINFO bmi; | 310 LPBITMAPINFO bmi; |
311 | 311 |
312 bmi_size = sizeof(BITMAPINFOHEADER) + 256 * sizeof(RGBQUAD); | 312 bmi_size = sizeof(BITMAPINFOHEADER) + 256 * sizeof(RGBQUAD); |