comparison include/SDL_video.h @ 5141:da10636e5eca

Making the API simpler, scaling is always defined as linear interpolation and should be supported as much as possible on all renderers.
author Sam Lantinga <slouken@libsdl.org>
date Mon, 31 Jan 2011 22:44:43 -0800
parents dc0dfdd58f27
children e743b9c3f6d6
comparison
equal deleted inserted replaced
5140:e594f07297a9 5141:da10636e5eca
31 31
32 #include "SDL_stdinc.h" 32 #include "SDL_stdinc.h"
33 #include "SDL_pixels.h" 33 #include "SDL_pixels.h"
34 #include "SDL_rect.h" 34 #include "SDL_rect.h"
35 #include "SDL_blendmode.h" 35 #include "SDL_blendmode.h"
36 #include "SDL_scalemode.h"
37 #include "SDL_surface.h" 36 #include "SDL_surface.h"
38 37
39 #include "begin_code.h" 38 #include "begin_code.h"
40 /* Set up for C function definitions, even when using C++ */ 39 /* Set up for C function definitions, even when using C++ */
41 #ifdef __cplusplus 40 #ifdef __cplusplus
187 { 186 {
188 const char *name; /**< The name of the renderer */ 187 const char *name; /**< The name of the renderer */
189 Uint32 flags; /**< Supported ::SDL_RendererFlags */ 188 Uint32 flags; /**< Supported ::SDL_RendererFlags */
190 Uint32 mod_modes; /**< A mask of supported channel modulation */ 189 Uint32 mod_modes; /**< A mask of supported channel modulation */
191 Uint32 blend_modes; /**< A mask of supported blend modes */ 190 Uint32 blend_modes; /**< A mask of supported blend modes */
192 Uint32 scale_modes; /**< A mask of supported scale modes */
193 Uint32 num_texture_formats; /**< The number of available texture formats */ 191 Uint32 num_texture_formats; /**< The number of available texture formats */
194 Uint32 texture_formats[50]; /**< The available texture formats */ 192 Uint32 texture_formats[50]; /**< The available texture formats */
195 int max_texture_width; /**< The maximimum texture width */ 193 int max_texture_width; /**< The maximimum texture width */
196 int max_texture_height; /**< The maximimum texture height */ 194 int max_texture_height; /**< The maximimum texture height */
197 } SDL_RendererInfo; 195 } SDL_RendererInfo;
967 */ 965 */
968 extern DECLSPEC int SDLCALL SDL_GetTextureBlendMode(SDL_Texture * texture, 966 extern DECLSPEC int SDLCALL SDL_GetTextureBlendMode(SDL_Texture * texture,
969 SDL_BlendMode *blendMode); 967 SDL_BlendMode *blendMode);
970 968
971 /** 969 /**
972 * \brief Set the scale mode used for texture copy operations.
973 *
974 * \param texture The texture to update.
975 * \param scaleMode ::SDL_ScaleMode to use for texture scaling.
976 *
977 * \return 0 on success, or -1 if the texture is not valid or the scale mode is
978 * not supported.
979 *
980 * \note If the scale mode is not supported, the closest supported mode is
981 * chosen.
982 *
983 * \sa SDL_GetTextureScaleMode()
984 */
985 extern DECLSPEC int SDLCALL SDL_SetTextureScaleMode(SDL_Texture * texture,
986 SDL_ScaleMode scaleMode);
987
988 /**
989 * \brief Get the scale mode used for texture copy operations.
990 *
991 * \param texture The texture to query.
992 * \param scaleMode A pointer filled in with the current scale mode.
993 *
994 * \return 0 on success, or -1 if the texture is not valid.
995 *
996 * \sa SDL_SetTextureScaleMode()
997 */
998 extern DECLSPEC int SDLCALL SDL_GetTextureScaleMode(SDL_Texture * texture,
999 SDL_ScaleMode *scaleMode);
1000
1001 /**
1002 * \brief Update the given texture rectangle with new pixel data. 970 * \brief Update the given texture rectangle with new pixel data.
1003 * 971 *
1004 * \param texture The texture to update 972 * \param texture The texture to update
1005 * \param rect A pointer to the rectangle of pixels to update, or NULL to 973 * \param rect A pointer to the rectangle of pixels to update, or NULL to
1006 * update the entire texture. 974 * update the entire texture.