comparison src/video/SDL_sysvideo.h @ 1676:e136f3ffdc1b SDL-1.3

Adding software renderer implementation
author Sam Lantinga <slouken@libsdl.org>
date Mon, 12 Jun 2006 09:10:06 +0000
parents d33dcfc3fde7
children 5e4c5e095925
comparison
equal deleted inserted replaced
1675:d33dcfc3fde7 1676:e136f3ffdc1b
64 }; 64 };
65 65
66 /* Define the SDL renderer structure */ 66 /* Define the SDL renderer structure */
67 struct SDL_Renderer 67 struct SDL_Renderer
68 { 68 {
69 int (*CreateTexture) (SDL_Texture * texture); 69 int (*CreateTexture) (SDL_Renderer * renderer, SDL_Texture * texture);
70 int (*UpdateTexture) (SDL_Texture * texture, SDL_Rect * rect, 70 int (*UpdateTexture) (SDL_Renderer * renderer, SDL_Texture * texture,
71 const void *pixels, int pitch); 71 SDL_Rect * rect, const void *pixels, int pitch);
72 int (*LockTexture) (SDL_Texture * texture, SDL_Rect * rect, int markDirty, 72 int (*LockTexture) (SDL_Renderer * renderer, SDL_Texture * texture,
73 void **pixels, int *pitch); 73 SDL_Rect * rect, int markDirty, void **pixels,
74 void (*UnlockTexture) (SDL_Texture * texture); 74 int *pitch);
75 void (*DirtyTexture) (SDL_Texture * texture, int numrects, 75 void (*UnlockTexture) (SDL_Renderer * renderer, SDL_Texture * texture);
76 SDL_Rect * rects); 76 void (*DirtyTexture) (SDL_Renderer * renderer, SDL_Texture * texture,
77 void (*SelectRenderTexture) (SDL_Texture * texture); 77 int numrects, SDL_Rect * rects);
78 void (*RenderFill) (SDL_Rect * rect, Uint32 color); 78 void (*SelectRenderTexture) (SDL_Renderer * renderer,
79 int (*RenderCopy) (SDL_Texture * texture, SDL_Rect * srcrect, 79 SDL_Texture * texture);
80 SDL_Rect * dstrect, int blendMode, int scaleMode); 80 void (*RenderFill) (SDL_Renderer * renderer, SDL_Rect * rect,
81 int (*RenderReadPixels) (SDL_Rect * rect, void *pixels, int pitch); 81 Uint32 color);
82 int (*RenderWritePixels) (SDL_Rect * rect, const void *pixels, int pitch); 82 int (*RenderCopy) (SDL_Renderer * renderer, SDL_Texture * texture,
83 void (*RenderPresent) (void); 83 SDL_Rect * srcrect, SDL_Rect * dstrect, int blendMode,
84 void (*DestroyTexture) (SDL_Texture * texture); 84 int scaleMode);
85 int (*RenderReadPixels) (SDL_Renderer * renderer, SDL_Rect * rect,
86 void *pixels, int pitch);
87 int (*RenderWritePixels) (SDL_Renderer * renderer, SDL_Rect * rect,
88 const void *pixels, int pitch);
89 void (*RenderPresent) (SDL_Renderer * renderer);
90 void (*DestroyTexture) (SDL_Renderer * renderer, SDL_Texture * texture);
85 91
86 void (*DestroyRenderer) (SDL_Renderer * renderer); 92 void (*DestroyRenderer) (SDL_Renderer * renderer);
87 93
88 /* The current renderer info */ 94 /* The current renderer info */
89 SDL_RendererInfo info; 95 SDL_RendererInfo info;
113 int w, h; 119 int w, h;
114 Uint32 flags; 120 Uint32 flags;
115 121
116 Uint16 *gamma; 122 Uint16 *gamma;
117 123
124 SDL_VideoDisplay *display;
118 SDL_Renderer *renderer; 125 SDL_Renderer *renderer;
119 126
120 void *userdata; 127 void *userdata;
121 void *driverdata; 128 void *driverdata;
122 }; 129 };