SDL_gpu  0.11.0
A hardware-accelerated, cross-platform 2D graphics API
Data Structures | Macros | Typedefs | Enumerations
SDL_gpu.h File Reference
#include "SDL.h"
#include <stdio.h>
#include <stdarg.h>
#include "begin_code.h"
#include "close_code.h"

Go to the source code of this file.

Data Structures

struct  GPU_Rect
 
struct  GPU_RendererID
 
struct  GPU_BlendMode
 
struct  GPU_Image
 
struct  GPU_Camera
 
struct  GPU_ShaderBlock
 
struct  GPU_MatrixStack
 
struct  GPU_Context
 
struct  GPU_Target
 
struct  GPU_AttributeFormat
 
struct  GPU_Attribute
 
struct  GPU_AttributeSource
 
struct  GPU_ErrorObject
 
struct  GPU_Renderer
 

Macros

#define SDL_GPU_VERSION_MAJOR   0
 
#define SDL_GPU_VERSION_MINOR   11
 
#define SDL_GPU_VERSION_PATCH   0
 
#define SDL_GPU_USE_SDL1
 
#define GPU_HAVE_STDC   0
 
#define GPU_HAVE_C99   (GPU_HAVE_STDC && (__STDC_VERSION__ >= 199901L))
 
#define GPU_HAVE_GNUC   0
 
#define GPU_HAVE_MSVC   0
 
#define GPU_HAVE_MSVC18   (GPU_HAVE_MSVC && (_MSC_VER >= 1800))
 
#define GPU_bool   int
 
#define GPU_FALSE   0
 
#define GPU_TRUE   1
 
#define GPU_RENDERER_ORDER_MAX   10
 
#define GPU_RENDERER_CUSTOM_0   1000
 
#define GPU_MODELVIEW   0
 
#define GPU_PROJECTION   1
 
#define GPU_MATRIX_STACK_MAX   5
 
#define GPU_FEATURE_ALL_BASE   GPU_FEATURE_RENDER_TARGETS
 
#define GPU_FEATURE_ALL_BLEND_PRESETS   (GPU_FEATURE_BLEND_EQUATIONS | GPU_FEATURE_BLEND_FUNC_SEPARATE)
 
#define GPU_FEATURE_ALL_GL_FORMATS   (GPU_FEATURE_GL_BGR | GPU_FEATURE_GL_BGRA | GPU_FEATURE_GL_ABGR)
 
#define GPU_FEATURE_BASIC_SHADERS   (GPU_FEATURE_FRAGMENT_SHADER | GPU_FEATURE_VERTEX_SHADER)
 
#define GPU_FEATURE_ALL_SHADERS   (GPU_FEATURE_FRAGMENT_SHADER | GPU_FEATURE_VERTEX_SHADER | GPU_FEATURE_GEOMETRY_SHADER)
 
#define GPU_DEFAULT_INIT_FLAGS   0
 
#define GPU_BATCH_XY_ST   (GPU_BATCH_XY | GPU_BATCH_ST)
 
#define GPU_BATCH_XYZ_ST   (GPU_BATCH_XYZ | GPU_BATCH_ST)
 
#define GPU_BATCH_XY_RGB   (GPU_BATCH_XY | GPU_BATCH_RGB)
 
#define GPU_BATCH_XYZ_RGB   (GPU_BATCH_XYZ | GPU_BATCH_RGB)
 
#define GPU_BATCH_XY_RGBA   (GPU_BATCH_XY | GPU_BATCH_RGBA)
 
#define GPU_BATCH_XYZ_RGBA   (GPU_BATCH_XYZ | GPU_BATCH_RGBA)
 
#define GPU_BATCH_XY_ST_RGBA   (GPU_BATCH_XY | GPU_BATCH_ST | GPU_BATCH_RGBA)
 
#define GPU_BATCH_XYZ_ST_RGBA   (GPU_BATCH_XYZ | GPU_BATCH_ST | GPU_BATCH_RGBA)
 
#define GPU_BATCH_XY_RGB8   (GPU_BATCH_XY | GPU_BATCH_RGB8)
 
#define GPU_BATCH_XYZ_RGB8   (GPU_BATCH_XYZ | GPU_BATCH_RGB8)
 
#define GPU_BATCH_XY_RGBA8   (GPU_BATCH_XY | GPU_BATCH_RGBA8)
 
#define GPU_BATCH_XYZ_RGBA8   (GPU_BATCH_XYZ | GPU_BATCH_RGBA8)
 
#define GPU_BATCH_XY_ST_RGBA8   (GPU_BATCH_XY | GPU_BATCH_ST | GPU_BATCH_RGBA8)
 
#define GPU_BATCH_XYZ_ST_RGBA8   (GPU_BATCH_XYZ | GPU_BATCH_ST | GPU_BATCH_RGBA8)
 
#define GPU_Log   GPU_LogInfo
 

Typedefs

typedef Uint32 GPU_RendererEnum
 
typedef Uint32 GPU_FeatureEnum
 
typedef Uint32 GPU_WindowFlagEnum
 
typedef Uint32 GPU_InitFlagEnum
 
typedef Uint32 GPU_BatchFlagEnum
 
typedef Uint32 GPU_FlipEnum
 
typedef Uint32 GPU_TypeEnum
 

Enumerations

enum  GPU_BlendFuncEnum {
  GPU_FUNC_ZERO = 0, GPU_FUNC_ONE = 1, GPU_FUNC_SRC_COLOR = 0x0300, GPU_FUNC_DST_COLOR = 0x0306,
  GPU_FUNC_ONE_MINUS_SRC = 0x0301, GPU_FUNC_ONE_MINUS_DST = 0x0307, GPU_FUNC_SRC_ALPHA = 0x0302, GPU_FUNC_DST_ALPHA = 0x0304,
  GPU_FUNC_ONE_MINUS_SRC_ALPHA = 0x0303, GPU_FUNC_ONE_MINUS_DST_ALPHA = 0x0305
}
 
enum  GPU_BlendEqEnum { GPU_EQ_ADD = 0x8006, GPU_EQ_SUBTRACT = 0x800A, GPU_EQ_REVERSE_SUBTRACT = 0x800B }
 
enum  GPU_BlendPresetEnum {
  GPU_BLEND_NORMAL = 0, GPU_BLEND_PREMULTIPLIED_ALPHA = 1, GPU_BLEND_MULTIPLY = 2, GPU_BLEND_ADD = 3,
  GPU_BLEND_SUBTRACT = 4, GPU_BLEND_MOD_ALPHA = 5, GPU_BLEND_SET_ALPHA = 6, GPU_BLEND_SET = 7,
  GPU_BLEND_NORMAL_KEEP_ALPHA = 8, GPU_BLEND_NORMAL_ADD_ALPHA = 9, GPU_BLEND_NORMAL_FACTOR_ALPHA = 10
}
 
enum  GPU_FilterEnum { GPU_FILTER_NEAREST = 0, GPU_FILTER_LINEAR = 1, GPU_FILTER_LINEAR_MIPMAP = 2 }
 
enum  GPU_SnapEnum { GPU_SNAP_NONE = 0, GPU_SNAP_POSITION = 1, GPU_SNAP_DIMENSIONS = 2, GPU_SNAP_POSITION_AND_DIMENSIONS = 3 }
 
enum  GPU_WrapEnum { GPU_WRAP_NONE = 0, GPU_WRAP_REPEAT = 1, GPU_WRAP_MIRRORED = 2 }
 
enum  GPU_FormatEnum {
  GPU_FORMAT_LUMINANCE = 1, GPU_FORMAT_LUMINANCE_ALPHA = 2, GPU_FORMAT_RGB = 3, GPU_FORMAT_RGBA = 4,
  GPU_FORMAT_ALPHA = 5, GPU_FORMAT_RG = 6, GPU_FORMAT_YCbCr422 = 7, GPU_FORMAT_YCbCr420P = 8,
  GPU_FORMAT_BGR = 9, GPU_FORMAT_BGRA = 10, GPU_FORMAT_ABGR = 11
}
 
enum  GPU_FileFormatEnum { GPU_FILE_AUTO = 0, GPU_FILE_PNG, GPU_FILE_BMP, GPU_FILE_TGA }
 
enum  GPU_ShaderEnum { GPU_VERTEX_SHADER = 0, GPU_FRAGMENT_SHADER = 1, GPU_PIXEL_SHADER = 1, GPU_GEOMETRY_SHADER = 2 }
 
enum  GPU_ShaderLanguageEnum {
  GPU_LANGUAGE_NONE = 0, GPU_LANGUAGE_ARB_ASSEMBLY = 1, GPU_LANGUAGE_GLSL = 2, GPU_LANGUAGE_GLSLES = 3,
  GPU_LANGUAGE_HLSL = 4, GPU_LANGUAGE_CG = 5
}
 
enum  GPU_ErrorEnum {
  GPU_ERROR_NONE = 0, GPU_ERROR_BACKEND_ERROR = 1, GPU_ERROR_DATA_ERROR = 2, GPU_ERROR_USER_ERROR = 3,
  GPU_ERROR_UNSUPPORTED_FUNCTION = 4, GPU_ERROR_NULL_ARGUMENT = 5, GPU_ERROR_FILE_NOT_FOUND = 6
}
 
enum  GPU_DebugLevelEnum {
  GPU_DEBUG_LEVEL_0 = 0, GPU_DEBUG_LEVEL_1 = 1, GPU_DEBUG_LEVEL_2 = 2, GPU_DEBUG_LEVEL_3 = 3,
  GPU_DEBUG_LEVEL_MAX = 3
}
 
enum  GPU_LogLevelEnum { GPU_LOG_INFO = 0, GPU_LOG_WARNING, GPU_LOG_ERROR }
 

Functions

DECLSPEC SDL_version SDLCALL GPU_GetLinkedVersion (void)
 
DECLSPEC void SDLCALL GPU_SetInitWindow (Uint32 windowID)
 
DECLSPEC Uint32 SDLCALL GPU_GetInitWindow (void)
 
DECLSPEC void SDLCALL GPU_SetPreInitFlags (GPU_InitFlagEnum GPU_flags)
 
DECLSPEC GPU_InitFlagEnum SDLCALL GPU_GetPreInitFlags (void)
 
DECLSPEC void SDLCALL GPU_SetRequiredFeatures (GPU_FeatureEnum features)
 
DECLSPEC GPU_FeatureEnum SDLCALL GPU_GetRequiredFeatures (void)
 
DECLSPEC void SDLCALL GPU_GetDefaultRendererOrder (int *order_size, GPU_RendererID *order)
 
DECLSPEC void SDLCALL GPU_GetRendererOrder (int *order_size, GPU_RendererID *order)
 
DECLSPEC void SDLCALL GPU_SetRendererOrder (int order_size, GPU_RendererID *order)
 
DECLSPEC GPU_Target *SDLCALL GPU_Init (Uint16 w, Uint16 h, GPU_WindowFlagEnum SDL_flags)
 
DECLSPEC GPU_Target *SDLCALL GPU_InitRenderer (GPU_RendererEnum renderer_enum, Uint16 w, Uint16 h, GPU_WindowFlagEnum SDL_flags)
 
DECLSPEC GPU_Target *SDLCALL GPU_InitRendererByID (GPU_RendererID renderer_request, Uint16 w, Uint16 h, GPU_WindowFlagEnum SDL_flags)
 
DECLSPEC GPU_bool SDLCALL GPU_IsFeatureEnabled (GPU_FeatureEnum feature)
 
DECLSPEC void SDLCALL GPU_CloseCurrentRenderer (void)
 
DECLSPEC void SDLCALL GPU_Quit (void)
 
DECLSPEC void SDLCALL GPU_SetDebugLevel (GPU_DebugLevelEnum level)
 
DECLSPEC GPU_DebugLevelEnum SDLCALL GPU_GetDebugLevel (void)
 
DECLSPEC void SDLCALL GPU_LogInfo (const char *format,...)
 
DECLSPEC void SDLCALL GPU_LogWarning (const char *format,...)
 
DECLSPEC void SDLCALL GPU_LogError (const char *format,...)
 
DECLSPEC void SDLCALL GPU_SetLogCallback (int(*callback)(GPU_LogLevelEnum log_level, const char *format, va_list args))
 
DECLSPEC void SDLCALL GPU_PushErrorCode (const char *function, GPU_ErrorEnum error, const char *details,...)
 
DECLSPEC GPU_ErrorObject SDLCALL GPU_PopErrorCode (void)
 
DECLSPEC const char *SDLCALL GPU_GetErrorString (GPU_ErrorEnum error)
 
DECLSPEC void SDLCALL GPU_SetErrorQueueMax (unsigned int max)
 
DECLSPEC GPU_RendererID SDLCALL GPU_MakeRendererID (const char *name, GPU_RendererEnum renderer, int major_version, int minor_version)
 
DECLSPEC GPU_RendererID SDLCALL GPU_GetRendererID (GPU_RendererEnum renderer)
 
DECLSPEC int SDLCALL GPU_GetNumRegisteredRenderers (void)
 
DECLSPEC void SDLCALL GPU_GetRegisteredRendererList (GPU_RendererID *renderers_array)
 
DECLSPEC void SDLCALL GPU_RegisterRenderer (GPU_RendererID id, GPU_Renderer *(SDLCALL *create_renderer)(GPU_RendererID request), void(SDLCALL *free_renderer)(GPU_Renderer *renderer))
 
DECLSPEC GPU_RendererEnum SDLCALL GPU_ReserveNextRendererEnum (void)
 
DECLSPEC int SDLCALL GPU_GetNumActiveRenderers (void)
 
DECLSPEC void SDLCALL GPU_GetActiveRendererList (GPU_RendererID *renderers_array)
 
DECLSPEC GPU_Renderer *SDLCALL GPU_GetCurrentRenderer (void)
 
DECLSPEC void SDLCALL GPU_SetCurrentRenderer (GPU_RendererID id)
 
DECLSPEC GPU_Renderer *SDLCALL GPU_GetRenderer (GPU_RendererID id)
 
DECLSPEC void SDLCALL GPU_FreeRenderer (GPU_Renderer *renderer)
 
DECLSPEC void SDLCALL GPU_ResetRendererState (void)
 
DECLSPEC void SDLCALL GPU_SetCoordinateMode (GPU_bool use_math_coords)
 
DECLSPEC GPU_bool SDLCALL GPU_GetCoordinateMode (void)
 
DECLSPEC void SDLCALL GPU_SetDefaultAnchor (float anchor_x, float anchor_y)
 
DECLSPEC void SDLCALL GPU_GetDefaultAnchor (float *anchor_x, float *anchor_y)
 
DECLSPEC GPU_Target *SDLCALL GPU_GetContextTarget (void)
 
DECLSPEC GPU_Target *SDLCALL GPU_GetWindowTarget (Uint32 windowID)
 
DECLSPEC GPU_Target *SDLCALL GPU_CreateTargetFromWindow (Uint32 windowID)
 
DECLSPEC void SDLCALL GPU_MakeCurrent (GPU_Target *target, Uint32 windowID)
 
DECLSPEC GPU_bool SDLCALL GPU_SetWindowResolution (Uint16 w, Uint16 h)
 
DECLSPEC GPU_bool SDLCALL GPU_SetFullscreen (GPU_bool enable_fullscreen, GPU_bool use_desktop_resolution)
 
DECLSPEC GPU_bool SDLCALL GPU_GetFullscreen (void)
 
DECLSPEC void SDLCALL GPU_SetShapeBlending (GPU_bool enable)
 
DECLSPEC GPU_BlendMode SDLCALL GPU_GetBlendModeFromPreset (GPU_BlendPresetEnum preset)
 
DECLSPEC void SDLCALL GPU_SetShapeBlendFunction (GPU_BlendFuncEnum source_color, GPU_BlendFuncEnum dest_color, GPU_BlendFuncEnum source_alpha, GPU_BlendFuncEnum dest_alpha)
 
DECLSPEC void SDLCALL GPU_SetShapeBlendEquation (GPU_BlendEqEnum color_equation, GPU_BlendEqEnum alpha_equation)
 
DECLSPEC void SDLCALL GPU_SetShapeBlendMode (GPU_BlendPresetEnum mode)
 
DECLSPEC float SDLCALL GPU_SetLineThickness (float thickness)
 
DECLSPEC float SDLCALL GPU_GetLineThickness (void)
 
DECLSPEC GPU_Target *SDLCALL GPU_CreateAliasTarget (GPU_Target *target)
 
DECLSPEC GPU_Target *SDLCALL GPU_LoadTarget (GPU_Image *image)
 
DECLSPEC GPU_Target *SDLCALL GPU_GetTarget (GPU_Image *image)
 
DECLSPEC void SDLCALL GPU_FreeTarget (GPU_Target *target)
 
DECLSPEC void SDLCALL GPU_SetVirtualResolution (GPU_Target *target, Uint16 w, Uint16 h)
 
DECLSPEC void SDLCALL GPU_GetVirtualResolution (GPU_Target *target, Uint16 *w, Uint16 *h)
 
DECLSPEC void SDLCALL GPU_GetVirtualCoords (GPU_Target *target, float *x, float *y, float displayX, float displayY)
 
DECLSPEC void SDLCALL GPU_UnsetVirtualResolution (GPU_Target *target)
 
DECLSPEC GPU_Rect SDLCALL GPU_MakeRect (float x, float y, float w, float h)
 
DECLSPEC SDL_Color SDLCALL GPU_MakeColor (Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 
DECLSPEC void SDLCALL GPU_SetViewport (GPU_Target *target, GPU_Rect viewport)
 
DECLSPEC void SDLCALL GPU_UnsetViewport (GPU_Target *target)
 
DECLSPEC GPU_Camera SDLCALL GPU_GetDefaultCamera (void)
 
DECLSPEC GPU_Camera SDLCALL GPU_GetCamera (GPU_Target *target)
 
DECLSPEC GPU_Camera SDLCALL GPU_SetCamera (GPU_Target *target, GPU_Camera *cam)
 
DECLSPEC void SDLCALL GPU_EnableCamera (GPU_Target *target, GPU_bool use_camera)
 
DECLSPEC GPU_bool SDLCALL GPU_IsCameraEnabled (GPU_Target *target)
 
DECLSPEC SDL_Color SDLCALL GPU_GetPixel (GPU_Target *target, Sint16 x, Sint16 y)
 
DECLSPEC GPU_Rect SDLCALL GPU_SetClipRect (GPU_Target *target, GPU_Rect rect)
 
DECLSPEC GPU_Rect SDLCALL GPU_SetClip (GPU_Target *target, Sint16 x, Sint16 y, Uint16 w, Uint16 h)
 
DECLSPEC void SDLCALL GPU_UnsetClip (GPU_Target *target)
 
DECLSPEC GPU_bool SDLCALL GPU_IntersectRect (GPU_Rect A, GPU_Rect B, GPU_Rect *result)
 
DECLSPEC GPU_bool SDLCALL GPU_IntersectClipRect (GPU_Target *target, GPU_Rect B, GPU_Rect *result)
 
DECLSPEC void SDLCALL GPU_SetTargetColor (GPU_Target *target, SDL_Color color)
 
DECLSPEC void SDLCALL GPU_SetTargetRGB (GPU_Target *target, Uint8 r, Uint8 g, Uint8 b)
 
DECLSPEC void SDLCALL GPU_SetTargetRGBA (GPU_Target *target, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 
DECLSPEC void SDLCALL GPU_UnsetTargetColor (GPU_Target *target)
 
DECLSPEC SDL_Surface *SDLCALL GPU_LoadSurface (const char *filename)
 
DECLSPEC SDL_Surface *SDLCALL GPU_LoadSurface_RW (SDL_RWops *rwops, GPU_bool free_rwops)
 
DECLSPEC GPU_bool SDLCALL GPU_SaveSurface (SDL_Surface *surface, const char *filename, GPU_FileFormatEnum format)
 
DECLSPEC GPU_bool SDLCALL GPU_SaveSurface_RW (SDL_Surface *surface, SDL_RWops *rwops, GPU_bool free_rwops, GPU_FileFormatEnum format)
 
DECLSPEC GPU_Image *SDLCALL GPU_CreateImage (Uint16 w, Uint16 h, GPU_FormatEnum format)
 
DECLSPEC GPU_Image *SDLCALL GPU_CreateImageUsingTexture (Uint32 handle, GPU_bool take_ownership)
 
DECLSPEC GPU_Image *SDLCALL GPU_LoadImage (const char *filename)
 
DECLSPEC GPU_Image *SDLCALL GPU_LoadImage_RW (SDL_RWops *rwops, GPU_bool free_rwops)
 
DECLSPEC GPU_Image *SDLCALL GPU_CreateAliasImage (GPU_Image *image)
 
DECLSPEC GPU_Image *SDLCALL GPU_CopyImage (GPU_Image *image)
 
DECLSPEC void SDLCALL GPU_FreeImage (GPU_Image *image)
 
DECLSPEC void SDLCALL GPU_SetImageVirtualResolution (GPU_Image *image, Uint16 w, Uint16 h)
 
DECLSPEC void SDLCALL GPU_UnsetImageVirtualResolution (GPU_Image *image)
 
DECLSPEC void SDLCALL GPU_UpdateImage (GPU_Image *image, const GPU_Rect *image_rect, SDL_Surface *surface, const GPU_Rect *surface_rect)
 
DECLSPEC void SDLCALL GPU_UpdateImageBytes (GPU_Image *image, const GPU_Rect *image_rect, const unsigned char *bytes, int bytes_per_row)
 
DECLSPEC GPU_bool SDLCALL GPU_ReplaceImage (GPU_Image *image, SDL_Surface *surface, const GPU_Rect *surface_rect)
 
DECLSPEC GPU_bool SDLCALL GPU_SaveImage (GPU_Image *image, const char *filename, GPU_FileFormatEnum format)
 
DECLSPEC GPU_bool SDLCALL GPU_SaveImage_RW (GPU_Image *image, SDL_RWops *rwops, GPU_bool free_rwops, GPU_FileFormatEnum format)
 
DECLSPEC void SDLCALL GPU_GenerateMipmaps (GPU_Image *image)
 
DECLSPEC void SDLCALL GPU_SetColor (GPU_Image *image, SDL_Color color)
 
DECLSPEC void SDLCALL GPU_SetRGB (GPU_Image *image, Uint8 r, Uint8 g, Uint8 b)
 
DECLSPEC void SDLCALL GPU_SetRGBA (GPU_Image *image, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 
DECLSPEC void SDLCALL GPU_UnsetColor (GPU_Image *image)
 
DECLSPEC GPU_bool SDLCALL GPU_GetBlending (GPU_Image *image)
 
DECLSPEC void SDLCALL GPU_SetBlending (GPU_Image *image, GPU_bool enable)
 
DECLSPEC void SDLCALL GPU_SetBlendFunction (GPU_Image *image, GPU_BlendFuncEnum source_color, GPU_BlendFuncEnum dest_color, GPU_BlendFuncEnum source_alpha, GPU_BlendFuncEnum dest_alpha)
 
DECLSPEC void SDLCALL GPU_SetBlendEquation (GPU_Image *image, GPU_BlendEqEnum color_equation, GPU_BlendEqEnum alpha_equation)
 
DECLSPEC void SDLCALL GPU_SetBlendMode (GPU_Image *image, GPU_BlendPresetEnum mode)
 
DECLSPEC void SDLCALL GPU_SetImageFilter (GPU_Image *image, GPU_FilterEnum filter)
 
DECLSPEC void SDLCALL GPU_SetAnchor (GPU_Image *image, float anchor_x, float anchor_y)
 
DECLSPEC void SDLCALL GPU_GetAnchor (GPU_Image *image, float *anchor_x, float *anchor_y)
 
DECLSPEC GPU_SnapEnum SDLCALL GPU_GetSnapMode (GPU_Image *image)
 
DECLSPEC void SDLCALL GPU_SetSnapMode (GPU_Image *image, GPU_SnapEnum mode)
 
DECLSPEC void SDLCALL GPU_SetWrapMode (GPU_Image *image, GPU_WrapEnum wrap_mode_x, GPU_WrapEnum wrap_mode_y)
 
DECLSPEC GPU_Image *SDLCALL GPU_CopyImageFromSurface (SDL_Surface *surface)
 
DECLSPEC GPU_Image *SDLCALL GPU_CopyImageFromTarget (GPU_Target *target)
 
DECLSPEC SDL_Surface *SDLCALL GPU_CopySurfaceFromTarget (GPU_Target *target)
 
DECLSPEC SDL_Surface *SDLCALL GPU_CopySurfaceFromImage (GPU_Image *image)
 
DECLSPEC float SDLCALL GPU_VectorLength (float *vec3)
 
DECLSPEC void SDLCALL GPU_VectorNormalize (float *vec3)
 
DECLSPEC float SDLCALL GPU_VectorDot (float *A, float *B)
 
DECLSPEC void SDLCALL GPU_VectorCross (float *result, float *A, float *B)
 
DECLSPEC void SDLCALL GPU_VectorCopy (float *result, float *A)
 
DECLSPEC void SDLCALL GPU_VectorApplyMatrix (float *vec3, float *matrix_4x4)
 
DECLSPEC void SDLCALL GPU_MatrixCopy (float *result, const float *A)
 
DECLSPEC void SDLCALL GPU_MatrixIdentity (float *result)
 
DECLSPEC void SDLCALL GPU_MatrixOrtho (float *result, float left, float right, float bottom, float top, float near, float far)
 
DECLSPEC void SDLCALL GPU_MatrixFrustum (float *result, float left, float right, float bottom, float top, float near, float far)
 
DECLSPEC void SDLCALL GPU_MatrixPerspective (float *result, float fovy, float aspect, float zNear, float zFar)
 
DECLSPEC void SDLCALL GPU_MatrixLookAt (float *matrix, float eye_x, float eye_y, float eye_z, float target_x, float target_y, float target_z, float up_x, float up_y, float up_z)
 
DECLSPEC void SDLCALL GPU_MatrixTranslate (float *result, float x, float y, float z)
 
DECLSPEC void SDLCALL GPU_MatrixScale (float *result, float sx, float sy, float sz)
 
DECLSPEC void SDLCALL GPU_MatrixRotate (float *result, float degrees, float x, float y, float z)
 
DECLSPEC void SDLCALL GPU_Multiply4x4 (float *result, float *A, float *B)
 
DECLSPEC void SDLCALL GPU_MultiplyAndAssign (float *result, float *B)
 
DECLSPEC const char *SDLCALL GPU_GetMatrixString (float *A)
 
DECLSPEC float *SDLCALL GPU_GetCurrentMatrix (void)
 
DECLSPEC float *SDLCALL GPU_GetModelView (void)
 
DECLSPEC float *SDLCALL GPU_GetProjection (void)
 
DECLSPEC void SDLCALL GPU_GetModelViewProjection (float *result)
 
DECLSPEC void SDLCALL GPU_MatrixMode (int matrix_mode)
 
DECLSPEC void SDLCALL GPU_PushMatrix (void)
 
DECLSPEC void SDLCALL GPU_PopMatrix (void)
 
DECLSPEC void SDLCALL GPU_LoadIdentity (void)
 
DECLSPEC void SDLCALL GPU_Ortho (float left, float right, float bottom, float top, float near, float far)
 
DECLSPEC void SDLCALL GPU_Frustum (float left, float right, float bottom, float top, float near, float far)
 
DECLSPEC void SDLCALL GPU_Translate (float x, float y, float z)
 
DECLSPEC void SDLCALL GPU_Scale (float sx, float sy, float sz)
 
DECLSPEC void SDLCALL GPU_Rotate (float degrees, float x, float y, float z)
 
DECLSPEC void SDLCALL GPU_MultMatrix (float *matrix4x4)
 
DECLSPEC void SDLCALL GPU_Clear (GPU_Target *target)
 
DECLSPEC void SDLCALL GPU_ClearColor (GPU_Target *target, SDL_Color color)
 
DECLSPEC void SDLCALL GPU_ClearRGB (GPU_Target *target, Uint8 r, Uint8 g, Uint8 b)
 
DECLSPEC void SDLCALL GPU_ClearRGBA (GPU_Target *target, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 
DECLSPEC void SDLCALL GPU_Blit (GPU_Image *image, GPU_Rect *src_rect, GPU_Target *target, float x, float y)
 
DECLSPEC void SDLCALL GPU_BlitRotate (GPU_Image *image, GPU_Rect *src_rect, GPU_Target *target, float x, float y, float degrees)
 
DECLSPEC void SDLCALL GPU_BlitScale (GPU_Image *image, GPU_Rect *src_rect, GPU_Target *target, float x, float y, float scaleX, float scaleY)
 
DECLSPEC void SDLCALL GPU_BlitTransform (GPU_Image *image, GPU_Rect *src_rect, GPU_Target *target, float x, float y, float degrees, float scaleX, float scaleY)
 
DECLSPEC void SDLCALL GPU_BlitTransformX (GPU_Image *image, GPU_Rect *src_rect, GPU_Target *target, float x, float y, float pivot_x, float pivot_y, float degrees, float scaleX, float scaleY)
 
DECLSPEC void SDLCALL GPU_BlitRect (GPU_Image *image, GPU_Rect *src_rect, GPU_Target *target, GPU_Rect *dest_rect)
 
DECLSPEC void SDLCALL GPU_BlitRectX (GPU_Image *image, GPU_Rect *src_rect, GPU_Target *target, GPU_Rect *dest_rect, float degrees, float pivot_x, float pivot_y, GPU_FlipEnum flip_direction)
 
DECLSPEC void SDLCALL GPU_TriangleBatch (GPU_Image *image, GPU_Target *target, unsigned short num_vertices, float *values, unsigned int num_indices, unsigned short *indices, GPU_BatchFlagEnum flags)
 
DECLSPEC void SDLCALL GPU_TriangleBatchX (GPU_Image *image, GPU_Target *target, unsigned short num_vertices, void *values, unsigned int num_indices, unsigned short *indices, GPU_BatchFlagEnum flags)
 
DECLSPEC void SDLCALL GPU_FlushBlitBuffer (void)
 
DECLSPEC void SDLCALL GPU_Flip (GPU_Target *target)
 
DECLSPEC void SDLCALL GPU_Pixel (GPU_Target *target, float x, float y, SDL_Color color)
 
DECLSPEC void SDLCALL GPU_Line (GPU_Target *target, float x1, float y1, float x2, float y2, SDL_Color color)
 
DECLSPEC void SDLCALL GPU_Arc (GPU_Target *target, float x, float y, float radius, float start_angle, float end_angle, SDL_Color color)
 
DECLSPEC void SDLCALL GPU_ArcFilled (GPU_Target *target, float x, float y, float radius, float start_angle, float end_angle, SDL_Color color)
 
DECLSPEC void SDLCALL GPU_Circle (GPU_Target *target, float x, float y, float radius, SDL_Color color)
 
DECLSPEC void SDLCALL GPU_CircleFilled (GPU_Target *target, float x, float y, float radius, SDL_Color color)
 
DECLSPEC void SDLCALL GPU_Ellipse (GPU_Target *target, float x, float y, float rx, float ry, float degrees, SDL_Color color)
 
DECLSPEC void SDLCALL GPU_EllipseFilled (GPU_Target *target, float x, float y, float rx, float ry, float degrees, SDL_Color color)
 
DECLSPEC void SDLCALL GPU_Sector (GPU_Target *target, float x, float y, float inner_radius, float outer_radius, float start_angle, float end_angle, SDL_Color color)
 
DECLSPEC void SDLCALL GPU_SectorFilled (GPU_Target *target, float x, float y, float inner_radius, float outer_radius, float start_angle, float end_angle, SDL_Color color)
 
DECLSPEC void SDLCALL GPU_Tri (GPU_Target *target, float x1, float y1, float x2, float y2, float x3, float y3, SDL_Color color)
 
DECLSPEC void SDLCALL GPU_TriFilled (GPU_Target *target, float x1, float y1, float x2, float y2, float x3, float y3, SDL_Color color)
 
DECLSPEC void SDLCALL GPU_Rectangle (GPU_Target *target, float x1, float y1, float x2, float y2, SDL_Color color)
 
DECLSPEC void SDLCALL GPU_Rectangle2 (GPU_Target *target, GPU_Rect rect, SDL_Color color)
 
DECLSPEC void SDLCALL GPU_RectangleFilled (GPU_Target *target, float x1, float y1, float x2, float y2, SDL_Color color)
 
DECLSPEC void SDLCALL GPU_RectangleFilled2 (GPU_Target *target, GPU_Rect rect, SDL_Color color)
 
DECLSPEC void SDLCALL GPU_RectangleRound (GPU_Target *target, float x1, float y1, float x2, float y2, float radius, SDL_Color color)
 
DECLSPEC void SDLCALL GPU_RectangleRound2 (GPU_Target *target, GPU_Rect rect, float radius, SDL_Color color)
 
DECLSPEC void SDLCALL GPU_RectangleRoundFilled (GPU_Target *target, float x1, float y1, float x2, float y2, float radius, SDL_Color color)
 
DECLSPEC void SDLCALL GPU_RectangleRoundFilled2 (GPU_Target *target, GPU_Rect rect, float radius, SDL_Color color)
 
DECLSPEC void SDLCALL GPU_Polygon (GPU_Target *target, unsigned int num_vertices, float *vertices, SDL_Color color)
 
DECLSPEC void SDLCALL GPU_PolygonFilled (GPU_Target *target, unsigned int num_vertices, float *vertices, SDL_Color color)
 
DECLSPEC Uint32 SDLCALL GPU_CreateShaderProgram (void)
 
DECLSPEC void SDLCALL GPU_FreeShaderProgram (Uint32 program_object)
 
DECLSPEC Uint32 SDLCALL GPU_CompileShader_RW (GPU_ShaderEnum shader_type, SDL_RWops *shader_source, GPU_bool free_rwops)
 
DECLSPEC Uint32 SDLCALL GPU_CompileShader (GPU_ShaderEnum shader_type, const char *shader_source)
 
DECLSPEC Uint32 SDLCALL GPU_LoadShader (GPU_ShaderEnum shader_type, const char *filename)
 
DECLSPEC Uint32 SDLCALL GPU_LinkShaders (Uint32 shader_object1, Uint32 shader_object2)
 
DECLSPEC Uint32 SDLCALL GPU_LinkManyShaders (Uint32 *shader_objects, int count)
 
DECLSPEC void SDLCALL GPU_FreeShader (Uint32 shader_object)
 
DECLSPEC void SDLCALL GPU_AttachShader (Uint32 program_object, Uint32 shader_object)
 
DECLSPEC void SDLCALL GPU_DetachShader (Uint32 program_object, Uint32 shader_object)
 
DECLSPEC GPU_bool SDLCALL GPU_LinkShaderProgram (Uint32 program_object)
 
DECLSPEC Uint32 SDLCALL GPU_GetCurrentShaderProgram (void)
 
DECLSPEC GPU_bool SDLCALL GPU_IsDefaultShaderProgram (Uint32 program_object)
 
DECLSPEC void SDLCALL GPU_ActivateShaderProgram (Uint32 program_object, GPU_ShaderBlock *block)
 
DECLSPEC void SDLCALL GPU_DeactivateShaderProgram (void)
 
DECLSPEC const char *SDLCALL GPU_GetShaderMessage (void)
 
DECLSPEC int SDLCALL GPU_GetAttributeLocation (Uint32 program_object, const char *attrib_name)
 
DECLSPEC GPU_AttributeFormat SDLCALL GPU_MakeAttributeFormat (int num_elems_per_vertex, GPU_TypeEnum type, GPU_bool normalize, int stride_bytes, int offset_bytes)
 
DECLSPEC GPU_Attribute SDLCALL GPU_MakeAttribute (int location, void *values, GPU_AttributeFormat format)
 
DECLSPEC int SDLCALL GPU_GetUniformLocation (Uint32 program_object, const char *uniform_name)
 
DECLSPEC GPU_ShaderBlock SDLCALL GPU_LoadShaderBlock (Uint32 program_object, const char *position_name, const char *texcoord_name, const char *color_name, const char *modelViewMatrix_name)
 
DECLSPEC void SDLCALL GPU_SetShaderBlock (GPU_ShaderBlock block)
 
DECLSPEC GPU_ShaderBlock SDLCALL GPU_GetShaderBlock (void)
 
DECLSPEC void SDLCALL GPU_SetShaderImage (GPU_Image *image, int location, int image_unit)
 
DECLSPEC void SDLCALL GPU_GetUniformiv (Uint32 program_object, int location, int *values)
 
DECLSPEC void SDLCALL GPU_SetUniformi (int location, int value)
 
DECLSPEC void SDLCALL GPU_SetUniformiv (int location, int num_elements_per_value, int num_values, int *values)
 
DECLSPEC void SDLCALL GPU_GetUniformuiv (Uint32 program_object, int location, unsigned int *values)
 
DECLSPEC void SDLCALL GPU_SetUniformui (int location, unsigned int value)
 
DECLSPEC void SDLCALL GPU_SetUniformuiv (int location, int num_elements_per_value, int num_values, unsigned int *values)
 
DECLSPEC void SDLCALL GPU_GetUniformfv (Uint32 program_object, int location, float *values)
 
DECLSPEC void SDLCALL GPU_SetUniformf (int location, float value)
 
DECLSPEC void SDLCALL GPU_SetUniformfv (int location, int num_elements_per_value, int num_values, float *values)
 
DECLSPEC void SDLCALL GPU_GetUniformMatrixfv (Uint32 program_object, int location, float *values)
 
DECLSPEC void SDLCALL GPU_SetUniformMatrixfv (int location, int num_matrices, int num_rows, int num_columns, GPU_bool transpose, float *values)
 
DECLSPEC void SDLCALL GPU_SetAttributef (int location, float value)
 
DECLSPEC void SDLCALL GPU_SetAttributei (int location, int value)
 
DECLSPEC void SDLCALL GPU_SetAttributeui (int location, unsigned int value)
 
DECLSPEC void SDLCALL GPU_SetAttributefv (int location, int num_elements, float *value)
 
DECLSPEC void SDLCALL GPU_SetAttributeiv (int location, int num_elements, int *value)
 
DECLSPEC void SDLCALL GPU_SetAttributeuiv (int location, int num_elements, unsigned int *value)
 
DECLSPEC void SDLCALL GPU_SetAttributeSource (int num_values, GPU_Attribute source)
 

Macro Definition Documentation

◆ GPU_BATCH_XY_RGB

#define GPU_BATCH_XY_RGB   (GPU_BATCH_XY | GPU_BATCH_RGB)

Definition at line 496 of file SDL_gpu.h.

◆ GPU_BATCH_XY_RGB8

#define GPU_BATCH_XY_RGB8   (GPU_BATCH_XY | GPU_BATCH_RGB8)

Definition at line 502 of file SDL_gpu.h.

◆ GPU_BATCH_XY_RGBA

#define GPU_BATCH_XY_RGBA   (GPU_BATCH_XY | GPU_BATCH_RGBA)

Definition at line 498 of file SDL_gpu.h.

◆ GPU_BATCH_XY_RGBA8

#define GPU_BATCH_XY_RGBA8   (GPU_BATCH_XY | GPU_BATCH_RGBA8)

Definition at line 504 of file SDL_gpu.h.

◆ GPU_BATCH_XY_ST

#define GPU_BATCH_XY_ST   (GPU_BATCH_XY | GPU_BATCH_ST)

Definition at line 494 of file SDL_gpu.h.

◆ GPU_BATCH_XY_ST_RGBA

#define GPU_BATCH_XY_ST_RGBA   (GPU_BATCH_XY | GPU_BATCH_ST | GPU_BATCH_RGBA)

Definition at line 500 of file SDL_gpu.h.

◆ GPU_BATCH_XY_ST_RGBA8

#define GPU_BATCH_XY_ST_RGBA8   (GPU_BATCH_XY | GPU_BATCH_ST | GPU_BATCH_RGBA8)

Definition at line 506 of file SDL_gpu.h.

◆ GPU_BATCH_XYZ_RGB

#define GPU_BATCH_XYZ_RGB   (GPU_BATCH_XYZ | GPU_BATCH_RGB)

Definition at line 497 of file SDL_gpu.h.

◆ GPU_BATCH_XYZ_RGB8

#define GPU_BATCH_XYZ_RGB8   (GPU_BATCH_XYZ | GPU_BATCH_RGB8)

Definition at line 503 of file SDL_gpu.h.

◆ GPU_BATCH_XYZ_RGBA

#define GPU_BATCH_XYZ_RGBA   (GPU_BATCH_XYZ | GPU_BATCH_RGBA)

Definition at line 499 of file SDL_gpu.h.

◆ GPU_BATCH_XYZ_RGBA8

#define GPU_BATCH_XYZ_RGBA8   (GPU_BATCH_XYZ | GPU_BATCH_RGBA8)

Definition at line 505 of file SDL_gpu.h.

◆ GPU_BATCH_XYZ_ST

#define GPU_BATCH_XYZ_ST   (GPU_BATCH_XYZ | GPU_BATCH_ST)

Definition at line 495 of file SDL_gpu.h.

◆ GPU_BATCH_XYZ_ST_RGBA

#define GPU_BATCH_XYZ_ST_RGBA   (GPU_BATCH_XYZ | GPU_BATCH_ST | GPU_BATCH_RGBA)

Definition at line 501 of file SDL_gpu.h.

◆ GPU_BATCH_XYZ_ST_RGBA8

#define GPU_BATCH_XYZ_ST_RGBA8   (GPU_BATCH_XYZ | GPU_BATCH_ST | GPU_BATCH_RGBA8)

Definition at line 507 of file SDL_gpu.h.

◆ GPU_bool

#define GPU_bool   int

Definition at line 59 of file SDL_gpu.h.

◆ GPU_DEFAULT_INIT_FLAGS

#define GPU_DEFAULT_INIT_FLAGS   0

Definition at line 475 of file SDL_gpu.h.

◆ GPU_FALSE

#define GPU_FALSE   0

Definition at line 62 of file SDL_gpu.h.

◆ GPU_FEATURE_ALL_BASE

#define GPU_FEATURE_ALL_BASE   GPU_FEATURE_RENDER_TARGETS

Combined feature flags

Definition at line 451 of file SDL_gpu.h.

◆ GPU_FEATURE_ALL_BLEND_PRESETS

#define GPU_FEATURE_ALL_BLEND_PRESETS   (GPU_FEATURE_BLEND_EQUATIONS | GPU_FEATURE_BLEND_FUNC_SEPARATE)

Definition at line 452 of file SDL_gpu.h.

◆ GPU_FEATURE_ALL_GL_FORMATS

#define GPU_FEATURE_ALL_GL_FORMATS   (GPU_FEATURE_GL_BGR | GPU_FEATURE_GL_BGRA | GPU_FEATURE_GL_ABGR)

Definition at line 453 of file SDL_gpu.h.

◆ GPU_FEATURE_ALL_SHADERS

#define GPU_FEATURE_ALL_SHADERS   (GPU_FEATURE_FRAGMENT_SHADER | GPU_FEATURE_VERTEX_SHADER | GPU_FEATURE_GEOMETRY_SHADER)

Definition at line 455 of file SDL_gpu.h.

◆ GPU_FEATURE_BASIC_SHADERS

#define GPU_FEATURE_BASIC_SHADERS   (GPU_FEATURE_FRAGMENT_SHADER | GPU_FEATURE_VERTEX_SHADER)

Definition at line 454 of file SDL_gpu.h.

◆ GPU_HAVE_C99

#define GPU_HAVE_C99   (GPU_HAVE_STDC && (__STDC_VERSION__ >= 199901L))

Definition at line 35 of file SDL_gpu.h.

◆ GPU_HAVE_GNUC

#define GPU_HAVE_GNUC   0

Definition at line 40 of file SDL_gpu.h.

◆ GPU_HAVE_MSVC

#define GPU_HAVE_MSVC   0

Definition at line 46 of file SDL_gpu.h.

◆ GPU_HAVE_MSVC18

#define GPU_HAVE_MSVC18   (GPU_HAVE_MSVC && (_MSC_VER >= 1800))

Definition at line 49 of file SDL_gpu.h.

◆ GPU_HAVE_STDC

#define GPU_HAVE_STDC   0

Definition at line 32 of file SDL_gpu.h.

◆ GPU_Log

#define GPU_Log   GPU_LogInfo

Definition at line 782 of file SDL_gpu.h.

◆ GPU_MATRIX_STACK_MAX

#define GPU_MATRIX_STACK_MAX   5

Definition at line 334 of file SDL_gpu.h.

◆ GPU_MODELVIEW

#define GPU_MODELVIEW   0

Definition at line 330 of file SDL_gpu.h.

◆ GPU_PROJECTION

#define GPU_PROJECTION   1

Definition at line 331 of file SDL_gpu.h.

◆ GPU_RENDERER_CUSTOM_0

#define GPU_RENDERER_CUSTOM_0   1000

Definition at line 110 of file SDL_gpu.h.

◆ GPU_RENDERER_ORDER_MAX

#define GPU_RENDERER_ORDER_MAX   10

Definition at line 95 of file SDL_gpu.h.

◆ GPU_TRUE

#define GPU_TRUE   1

Definition at line 63 of file SDL_gpu.h.

◆ SDL_GPU_USE_SDL1

#define SDL_GPU_USE_SDL1

Definition at line 24 of file SDL_gpu.h.

◆ SDL_GPU_VERSION_MAJOR

#define SDL_GPU_VERSION_MAJOR   0

Definition at line 16 of file SDL_gpu.h.

◆ SDL_GPU_VERSION_MINOR

#define SDL_GPU_VERSION_MINOR   11

Definition at line 17 of file SDL_gpu.h.

◆ SDL_GPU_VERSION_PATCH

#define SDL_GPU_VERSION_PATCH   0

Definition at line 18 of file SDL_gpu.h.

Typedef Documentation

◆ GPU_FlipEnum

typedef Uint32 GPU_FlipEnum

Bit flags for blitting into a rectangular region.

See also
GPU_BlitRect
GPU_BlitRectX

Definition at line 514 of file SDL_gpu.h.

◆ GPU_RendererEnum

typedef Uint32 GPU_RendererEnum

Definition at line 97 of file SDL_gpu.h.

◆ GPU_WindowFlagEnum

typedef Uint32 GPU_WindowFlagEnum

Definition at line 458 of file SDL_gpu.h.