comparison include/SDL_video.h @ 1907:06c27a737b7a

Streamlined the API a bit and optimized the software renderer.
author Sam Lantinga <slouken@libsdl.org>
date Sat, 15 Jul 2006 09:46:36 +0000
parents c2a27da60b18
children 8d384b647307
comparison
equal deleted inserted replaced
1906:0c49855a7a3e 1907:06c27a737b7a
174 SDL_Renderer_PresentCopy = 0x00000002, /**< Present uses a copy from back buffer to the front buffer */ 174 SDL_Renderer_PresentCopy = 0x00000002, /**< Present uses a copy from back buffer to the front buffer */
175 SDL_Renderer_PresentFlip2 = 0x00000004, /**< Present uses a flip, swapping back buffer and front buffer */ 175 SDL_Renderer_PresentFlip2 = 0x00000004, /**< Present uses a flip, swapping back buffer and front buffer */
176 SDL_Renderer_PresentFlip3 = 0x00000008, /**< Present uses a flip, rotating between two back buffers and a front buffer */ 176 SDL_Renderer_PresentFlip3 = 0x00000008, /**< Present uses a flip, rotating between two back buffers and a front buffer */
177 SDL_Renderer_PresentDiscard = 0x00000010, /**< Present leaves the contents of the backbuffer undefined */ 177 SDL_Renderer_PresentDiscard = 0x00000010, /**< Present leaves the contents of the backbuffer undefined */
178 SDL_Renderer_PresentVSync = 0x00000020, /**< Present is synchronized with the refresh rate */ 178 SDL_Renderer_PresentVSync = 0x00000020, /**< Present is synchronized with the refresh rate */
179 SDL_Renderer_RenderTarget = 0x00000040, /**< The renderer can create texture render targets */ 179 SDL_Renderer_Accelerated = 0x00000040, /**< The renderer uses hardware acceleration */
180 SDL_Renderer_Accelerated = 0x00000080, /**< The renderer uses hardware acceleration */
181 SDL_Renderer_Minimal = 0x00000100, /**< The renderer only supports the read/write pixel and present functions */
182 } SDL_RendererFlags; 180 } SDL_RendererFlags;
183 181
184 /** 182 /**
185 * \struct SDL_RendererInfo 183 * \struct SDL_RendererInfo
186 * 184 *
191 const char *name; /**< The name of the renderer */ 189 const char *name; /**< The name of the renderer */
192 Uint32 flags; /**< Supported SDL_RendererFlags */ 190 Uint32 flags; /**< Supported SDL_RendererFlags */
193 Uint32 blend_modes; /**< A mask of supported blend modes */ 191 Uint32 blend_modes; /**< A mask of supported blend modes */
194 Uint32 scale_modes; /**< A mask of supported scale modes */ 192 Uint32 scale_modes; /**< A mask of supported scale modes */
195 Uint32 num_texture_formats; /**< The number of available texture formats */ 193 Uint32 num_texture_formats; /**< The number of available texture formats */
196 Uint32 texture_formats[32]; /**< The available texture formats */ 194 Uint32 texture_formats[16]; /**< The available texture formats */
197 int max_texture_width; /**< The maximimum texture width */ 195 int max_texture_width; /**< The maximimum texture width */
198 int max_texture_height; /**< The maximimum texture height */ 196 int max_texture_height; /**< The maximimum texture height */
199 } SDL_RendererInfo; 197 } SDL_RendererInfo;
200 198
201 /** 199 /**
203 * 201 *
204 * \brief The access pattern allowed for a texture 202 * \brief The access pattern allowed for a texture
205 */ 203 */
206 typedef enum 204 typedef enum
207 { 205 {
208 SDL_TextureAccess_Render, /**< Unlockable video memory, rendering allowed */ 206 SDL_TextureAccess_Local, /**< Lockable system memory */
209 SDL_TextureAccess_Remote, /**< Unlockable video memory */ 207 SDL_TextureAccess_Remote, /**< Unlockable video memory */
210 SDL_TextureAccess_Local, /**< Lockable system memory */
211 } SDL_TextureAccess; 208 } SDL_TextureAccess;
212 209
213 /** 210 /**
214 * \enum SDL_TextureBlendMode 211 * \enum SDL_TextureBlendMode
215 * 212 *
834 * \sa SDL_CreateRenderer() 831 * \sa SDL_CreateRenderer()
835 */ 832 */
836 extern DECLSPEC int SDLCALL SDL_GetNumRenderers(void); 833 extern DECLSPEC int SDLCALL SDL_GetNumRenderers(void);
837 834
838 /** 835 /**
839 * \fn SDL_RendererInfo *SDL_GetRendererInfo(int index) 836 * \fn int SDL_GetRendererInfo(int index, SDL_RendererInfo *info)
840 * 837 *
841 * \brief Get information about a specific render manager on the current 838 * \brief Get information about a specific render manager on the current
842 * display. 839 * display.
840 *
841 * \param index The index to query information about, or -1 to query the currently renderer
842 * \param info A pointer to an SDL_RendererInfo struct to be filled with information on the renderer
843 *
844 * \return 0 on success, -1 if the index was out of range
843 * 845 *
844 * \sa SDL_CreateRenderer() 846 * \sa SDL_CreateRenderer()
845 */ 847 */
846 extern DECLSPEC int SDLCALL SDL_GetRendererInfo(int index, 848 extern DECLSPEC int SDLCALL SDL_GetRendererInfo(int index,
847 SDL_RendererInfo * info); 849 SDL_RendererInfo * info);