THIS REVISION WILL NOT WORK! Compiled and linked SDL_renderer_gles.c into SDL 1.2 lib, no code was added to actually use it. ifdef overkill, yay!

This commit is contained in:
pelya
2010-07-26 18:24:57 +03:00
parent 90b09cd587
commit eda66c6d45
31 changed files with 137 additions and 15 deletions

View File

@@ -29,6 +29,14 @@
#ifndef _SDL_pixels_h
#define _SDL_pixels_h
#include "SDL_version.h"
#if SDL_VERSION_ATLEAST(1,3,0)
#include "SDL_video.h"
#else
#include "SDL_video-1.3.h"
#endif
#include "begin_code.h"
/* Set up for C function definitions, even when using C++ */
#ifdef __cplusplus
@@ -219,6 +227,7 @@ enum
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ARGB,
SDL_PACKEDLAYOUT_2101010, 32, 4),
#if SDL_VERSION_ATLEAST(1,3,0)
SDL_PIXELFORMAT_YV12 = /**< Planar mode: Y + V + U (3 planes) */
SDL_DEFINE_PIXELFOURCC('Y', 'V', '1', '2'),
SDL_PIXELFORMAT_IYUV = /**< Planar mode: Y + U + V (3 planes) */
@@ -229,8 +238,10 @@ enum
SDL_DEFINE_PIXELFOURCC('U', 'Y', 'V', 'Y'),
SDL_PIXELFORMAT_YVYU = /**< Packed mode: Y0+V0+Y1+U0 (1 plane) */
SDL_DEFINE_PIXELFOURCC('Y', 'V', 'Y', 'U')
#endif
};
#if SDL_VERSION_ATLEAST(1,3,0)
typedef struct SDL_Color
{
Uint8 r;
@@ -274,6 +285,7 @@ typedef struct SDL_PixelFormat
Uint32 Bmask;
Uint32 Amask;
} SDL_PixelFormat;
#endif
/**
* \brief Convert one of the enumerated pixel formats to a bpp and RGBA masks.
@@ -320,6 +332,7 @@ extern DECLSPEC SDL_Palette *SDLCALL SDL_AllocPalette(int ncolors);
*
* \sa SDL_DelPaletteWatch()
*/
#if SDL_VERSION_ATLEAST(1,3,0)
extern DECLSPEC int SDLCALL SDL_AddPaletteWatch(SDL_Palette * palette,
SDL_PaletteChangedFunc
callback, void *userdata);
@@ -333,7 +346,7 @@ extern DECLSPEC int SDLCALL SDL_AddPaletteWatch(SDL_Palette * palette,
extern DECLSPEC void SDLCALL SDL_DelPaletteWatch(SDL_Palette * palette,
SDL_PaletteChangedFunc
callback, void *userdata);
#endif
/**
* \brief Set a range of colors in a palette.
*

View File

@@ -31,8 +31,11 @@
#include "SDL_stdinc.h"
#include "SDL_error.h"
#include "SDL_pixels.h"
#include "SDL_rwops.h"
#include "SDL_version.h"
#if ! SDL_VERSION_ATLEAST(1,3,0)
#include "SDL_video.h"
#endif
#include "begin_code.h"
/* Set up for C function definitions, even when using C++ */
@@ -63,11 +66,13 @@ typedef struct
* \sa SDL_UnionRect
* \sa SDL_EnclosePoints
*/
#if SDL_VERSION_ATLEAST(1,3,0)
typedef struct SDL_Rect
{
int x, y;
int w, h;
} SDL_Rect;
#endif
/**
* \brief Returns true if the rectangle has no area.

View File

@@ -26,13 +26,17 @@
* Header file for SDL video functions.
*/
#ifndef _SDL_video_h
#define _SDL_video_h
#ifndef _SDL_video_1_3_h
#define _SDL_video_1_3_h
#include "SDL_stdinc.h"
#include "SDL_pixels.h"
#include "SDL_rect.h"
#include "SDL_pixels.h"
#include "SDL_surface.h"
#include "SDL_version.h"
#if ! SDL_VERSION_ATLEAST(1,3,0)
#include "SDL_video.h"
#endif
#include "begin_code.h"
/* Set up for C function definitions, even when using C++ */
@@ -256,6 +260,7 @@ typedef struct SDL_Texture SDL_Texture;
*/
typedef void *SDL_GLContext;
#if SDL_VERSION_ATLEAST(1,3,0)
/**
* \brief OpenGL configuration attributes
*/
@@ -281,7 +286,7 @@ typedef enum
SDL_GL_CONTEXT_MAJOR_VERSION,
SDL_GL_CONTEXT_MINOR_VERSION
} SDL_GLattr;
#endif
/* Function prototypes */