Mercurial > sdl-ios-xcode
comparison src/video/SDL_renderer_sw.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 | 3ee59c43d784 |
children | b252359547ed |
comparison
equal
deleted
inserted
replaced
2221:1d75c38e1e5c | 2222:926294b2bb4e |
---|---|
123 SDL_OutOfMemory(); | 123 SDL_OutOfMemory(); |
124 return NULL; | 124 return NULL; |
125 } | 125 } |
126 | 126 |
127 texture->format = format; | 127 texture->format = format; |
128 texture->access = SDL_TEXTUREACCESS_LOCAL; | 128 texture->access = SDL_TEXTUREACCESS_STREAMING; |
129 texture->w = w; | 129 texture->w = w; |
130 texture->h = h; | 130 texture->h = h; |
131 texture->renderer = renderer; | 131 texture->renderer = renderer; |
132 | 132 |
133 if (renderer->CreateTexture(renderer, texture) < 0) { | 133 if (renderer->CreateTexture(renderer, texture) < 0) { |