14 #define SDL_GPU_VERSION_MAJOR 0
15 #define SDL_GPU_VERSION_MINOR 9
16 #define SDL_GPU_VERSION_PATCH 0
19 #define SDL_GPU_USE_SDL2
33 #define GPU_RENDERER_ORDER_MAX 10
229 #ifndef GPU_MATRIX_STACK_MAX
230 #define GPU_MATRIX_STACK_MAX 5
329 #define GPU_FEATURE_ALL_BASE GPU_FEATURE_RENDER_TARGETS
330 #define GPU_FEATURE_ALL_BLEND_PRESETS (GPU_FEATURE_BLEND_EQUATIONS | GPU_FEATURE_BLEND_FUNC_SEPARATE)
331 #define GPU_FEATURE_ALL_GL_FORMATS (GPU_FEATURE_GL_BGR | GPU_FEATURE_GL_BGRA | GPU_FEATURE_GL_ABGR)
332 #define GPU_FEATURE_BASIC_SHADERS (GPU_FEATURE_FRAGMENT_SHADER | GPU_FEATURE_PIXEL_SHADER)
333 #define GPU_FEATURE_ALL_SHADERS (GPU_FEATURE_FRAGMENT_SHADER | GPU_FEATURE_PIXEL_SHADER | GPU_FEATURE_GEOMETRY_SHADER)
336 #define GPU_FEATURE_MASK 0x00FFFF
337 #define GPU_INIT_MASK 0xFF0000
351 #define GPU_DEFAULT_INIT_FLAGS 0
368 #define GPU_PASSTHROUGH_ALL (GPU_PASSTHROUGH_VERTICES | GPU_PASSTHROUGH_TEXCOORDS | GPU_PASSTHROUGH_COLORS)
595 void (*
BlitTransformX)(
GPU_Renderer* renderer,
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);
891 #define GPU_Log GPU_LogInfo
1518 GPU_ShaderBlock GPU_LoadShaderBlock(Uint32 program_object,
const char* position_name,
const char* texcoord_name,
const char* color_name,
const char* modelViewMatrix_name);
void GPU_RectangleFilled(GPU_Target *target, float x1, float y1, float x2, float y2, SDL_Color color)
static const GPU_TypeEnum GPU_TYPE_INT
void GPU_GetUniformMatrixfv(Uint32 program_object, int location, float *values)
void GPU_Rectangle(GPU_Target *target, float x1, float y1, float x2, float y2, SDL_Color color)
void(* Tri)(GPU_Renderer *renderer, GPU_Target *target, float x1, float y1, float x2, float y2, float x3, float y3, SDL_Color color)
int(* GetAttributeLocation)(GPU_Renderer *renderer, Uint32 program_object, const char *attrib_name)
void(* RectangleFilled)(GPU_Renderer *renderer, GPU_Target *target, float x1, float y1, float x2, float y2, SDL_Color color)
void GPU_SetViewport(GPU_Target *target, GPU_Rect viewport)
void GPU_SetBlendFunction(GPU_Image *image, GPU_BlendFuncEnum source_color, GPU_BlendFuncEnum dest_color, GPU_BlendFuncEnum source_alpha, GPU_BlendFuncEnum dest_alpha)
void(* SetShaderImage)(GPU_Renderer *renderer, GPU_Image *image, int location, int image_unit)
GLsizei GLboolean transpose
struct GPU_MatrixStack GPU_MatrixStack
GPU_SnapEnum GPU_GetSnapMode(GPU_Image *image)
void(* FreeShaderProgram)(GPU_Renderer *renderer, Uint32 program_object)
GPU_Target * GPU_Init(Uint16 w, Uint16 h, GPU_WindowFlagEnum SDL_flags)
Uint32 GPU_CompileShader(GPU_ShaderEnum shader_type, const char *shader_source)
void GPU_UnsetClip(GPU_Target *target)
GPU_Camera GPU_GetCamera(GPU_Target *target)
void GPU_SetInitWindow(Uint32 windowID)
static const GPU_RendererEnum GPU_RENDERER_OPENGL_2
void(* SetAttributef)(GPU_Renderer *renderer, int location, float value)
GLuint GLdouble GLdouble GLint GLint order
GLvoid **typedef void(GLAPIENTRY *PFNGLGETVERTEXATTRIBDVPROC)(GLuint
static const GPU_InitFlagEnum GPU_INIT_DISABLE_DOUBLE_BUFFER
void GPU_FreeTarget(GPU_Target *target)
Uint32 default_untextured_shader_program
const char * GPU_GetErrorString(GPU_ErrorEnum error)
const char * GPU_GetShaderMessage(void)
static const GPU_RendererEnum GPU_RENDERER_D3D9
struct GPU_Attribute GPU_Attribute
static const GPU_BlitFlagEnum GPU_PASSTHROUGH_VERTICES
int modelViewProjection_loc
static const GPU_TypeEnum GPU_TYPE_DOUBLE
void(* SetShaderBlock)(GPU_Renderer *renderer, GPU_ShaderBlock block)
GPU_BlendMode GPU_GetBlendModeFromPreset(GPU_BlendPresetEnum preset)
void(* BlitTransformMatrix)(GPU_Renderer *renderer, GPU_Image *image, GPU_Rect *src_rect, GPU_Target *target, float x, float y, float *matrix3x3)
void GPU_SetShaderBlock(GPU_ShaderBlock block)
GPU_ErrorObject GPU_PopErrorCode(void)
void GPU_Arc(GPU_Target *target, float x, float y, float radius, float start_angle, float end_angle, SDL_Color color)
static const GPU_BlitFlagEnum GPU_PASSTHROUGH_COLORS
#define SDL_GPU_VERSION_PATCH
void(* BlitRotate)(GPU_Renderer *renderer, GPU_Image *image, GPU_Rect *src_rect, GPU_Target *target, float x, float y, float degrees)
GLuint GLuint GLsizei GLenum type
Uint32 GPU_LoadShader(GPU_ShaderEnum shader_type, const char *filename)
void(* FreeImage)(GPU_Renderer *renderer, GPU_Image *image)
static l_noret error(LoadState *S, const char *why)
void GPU_FreeShader(Uint32 shader_object)
GPU_Rect GPU_SetClip(GPU_Target *target, Sint16 x, Sint16 y, Uint16 w, Uint16 h)
void GPU_SetUniformui(int location, unsigned int value)
void GPU_MakeCurrent(GPU_Target *target, Uint32 windowID)
void(* TriangleBatch)(GPU_Renderer *renderer, GPU_Image *image, GPU_Target *target, unsigned short num_vertices, float *values, unsigned int num_indices, unsigned short *indices, GPU_BlitFlagEnum flags)
Uint32 GPU_WindowFlagEnum
struct GPU_AttributeSource GPU_AttributeSource
GPU_MatrixStack projection_matrix
GPU_DebugLevelEnum GPU_GetDebugLevel(void)
GPU_Renderer * GPU_GetRenderer(unsigned int index)
void(* BlitScale)(GPU_Renderer *renderer, GPU_Image *image, GPU_Rect *src_rect, GPU_Target *target, float x, float y, float scaleX, float scaleY)
void GPU_SetBlending(GPU_Image *image, Uint8 enable)
GPU_Renderer * GPU_GetCurrentRenderer(void)
void GPU_SetBlendEquation(GPU_Image *image, GPU_BlendEqEnum color_equation, GPU_BlendEqEnum alpha_equation)
GPU_RendererID GPU_MakeRendererID(GPU_RendererEnum id, int major_version, int minor_version)
GPU_Target * GPU_CreateAliasTarget(GPU_Target *target)
GPU_ShaderBlock(* LoadShaderBlock)(GPU_Renderer *renderer, Uint32 program_object, const char *position_name, const char *texcoord_name, const char *color_name, const char *modelViewMatrix_name)
SDL_version GPU_GetLinkedVersion(void)
void GPU_GetActiveRendererList(GPU_RendererID *renderers_array)
struct GPU_Context GPU_Context
void(* AttachShader)(GPU_Renderer *renderer, Uint32 program_object, Uint32 shader_object)
GLenum GLsizei GLenum GLenum const GLvoid * image
static const GPU_FeatureEnum GPU_FEATURE_RENDER_TARGETS
void 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)
static const GPU_FeatureEnum GPU_FEATURE_BLEND_FUNC_SEPARATE
struct GPU_ShaderBlock GPU_ShaderBlock
void GPU_PolygonFilled(GPU_Target *target, unsigned int num_vertices, float *vertices, SDL_Color color)
void(* SetUniformi)(GPU_Renderer *renderer, int location, int value)
static const GPU_RendererEnum GPU_RENDERER_D3D11
void(* MakeCurrent)(GPU_Renderer *renderer, GPU_Target *target, Uint32 windowID)
void(* ActivateShaderProgram)(GPU_Renderer *renderer, Uint32 program_object, GPU_ShaderBlock *block)
static const GPU_BlitFlagEnum GPU_USE_DEFAULT_COLORS
void(* BlitBatch)(GPU_Renderer *renderer, GPU_Image *image, GPU_Target *target, unsigned int num_sprites, float *values, GPU_BlitFlagEnum flags)
void(* BlitTransform)(GPU_Renderer *renderer, GPU_Image *image, GPU_Rect *src_rect, GPU_Target *target, float x, float y, float degrees, float scaleX, float scaleY)
int(* GetUniformLocation)(GPU_Renderer *renderer, Uint32 program_object, const char *uniform_name)
void(* UnsetClip)(GPU_Renderer *renderer, GPU_Target *target)
GLint GLint GLint GLint GLint GLint y
void(* SectorFilled)(GPU_Renderer *renderer, GPU_Target *target, float x, float y, float inner_radius, float outer_radius, float start_angle, float end_angle, SDL_Color color)
GPU_Image * GPU_LoadImage(const char *filename)
void GPU_SetUniformMatrixfv(int location, int num_matrices, int num_rows, int num_columns, Uint8 transpose, float *values)
void GPU_GetUniformiv(Uint32 program_object, int location, int *values)
static const GPU_FeatureEnum GPU_FEATURE_GL_BGR
GPU_Rect(* SetClip)(GPU_Renderer *renderer, GPU_Target *target, Sint16 x, Sint16 y, Uint16 w, Uint16 h)
float GPU_GetLineThickness(void)
void GPU_BlitTransformMatrix(GPU_Image *image, GPU_Rect *src_rect, GPU_Target *target, float x, float y, float *matrix3x3)
void GPU_Sector(GPU_Target *target, float x, float y, float inner_radius, float outer_radius, float start_angle, float end_angle, SDL_Color color)
void(* FlushBlitBuffer)(GPU_Renderer *renderer)
void GPU_SetAttributefv(int location, int num_elements, float *value)
Uint32 GPU_LinkShaderProgram(Uint32 program_object)
void(* SetAttributeSource)(GPU_Renderer *renderer, int num_values, GPU_Attribute source)
GPU_Camera GPU_SetCamera(GPU_Target *target, GPU_Camera *cam)
SDL_Color GPU_GetPixel(GPU_Target *target, Sint16 x, Sint16 y)
Uint32 GPU_GetInitWindow(void)
GPU_Target * GPU_LoadTarget(GPU_Image *image)
static const GPU_FeatureEnum GPU_FEATURE_BLEND_EQUATIONS_SEPARATE
GPU_Rect GPU_SetClipRect(GPU_Target *target, GPU_Rect rect)
void GPU_ActivateShaderProgram(Uint32 program_object, GPU_ShaderBlock *block)
Uint8(* SetWindowResolution)(GPU_Renderer *renderer, Uint16 w, Uint16 h)
void GPU_FreeShaderProgram(Uint32 program_object)
void(* SetAsCurrent)(GPU_Renderer *renderer)
void GPU_SetWrapMode(GPU_Image *image, GPU_WrapEnum wrap_mode_x, GPU_WrapEnum wrap_mode_y)
void GPU_SetColor(GPU_Image *image, SDL_Color *color)
void(* Quit)(GPU_Renderer *renderer)
int per_vertex_storage_size
GPU_Target * GPU_InitRendererByID(GPU_RendererID renderer_request, Uint16 w, Uint16 h, GPU_WindowFlagEnum SDL_flags)
GLboolean GLenum GLenum GLvoid * values
const char * GPU_GetRendererEnumString(GPU_RendererEnum id)
void(* FreeShader)(GPU_Renderer *renderer, Uint32 shader_object)
static const GPU_FeatureEnum GPU_FEATURE_FRAGMENT_SHADER
Uint32(* LinkShaders)(GPU_Renderer *renderer, Uint32 shader_object1, Uint32 shader_object2)
void(* Blit)(GPU_Renderer *renderer, GPU_Image *image, GPU_Rect *src_rect, GPU_Target *target, float x, float y)
float GPU_SetLineThickness(float thickness)
GLdouble GLdouble GLdouble b
void(* Flip)(GPU_Renderer *renderer, GPU_Target *target)
static const GPU_InitFlagEnum GPU_INIT_DISABLE_VSYNC
static const GPU_FeatureEnum GPU_FEATURE_VERTEX_SHADER
void GPU_TriFilled(GPU_Target *target, float x1, float y1, float x2, float y2, float x3, float y3, SDL_Color color)
void GPU_SetRendererOrder(int order_size, GPU_RendererID *order)
SDL_Color GPU_MakeColor(Uint8 r, Uint8 g, Uint8 b, Uint8 a)
static const GPU_BlitFlagEnum GPU_PASSTHROUGH_TEXCOORDS
GPU_BlendEqEnum alpha_equation
void GPU_CircleFilled(GPU_Target *target, float x, float y, float radius, SDL_Color color)
GPU_Renderer * GPU_GetRendererByID(GPU_RendererID id)
static const GPU_FeatureEnum GPU_FEATURE_WRAP_REPEAT_MIRRORED
static const GPU_TypeEnum GPU_TYPE_UNSIGNED_INT
void GPU_FlushBlitBuffer(void)
void GPU_UpdateImageBytes(GPU_Image *image, const GPU_Rect *image_rect, const unsigned char *bytes, int bytes_per_row)
GPU_Renderer * GPU_AddRenderer(GPU_RendererID id)
void GPU_SetImageFilter(GPU_Image *image, GPU_FilterEnum filter)
void(* ClearRGBA)(GPU_Renderer *renderer, GPU_Target *target, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
void GPU_GetRendererOrder(int *order_size, GPU_RendererID *order)
void(* SetAttributeuiv)(GPU_Renderer *renderer, int location, int num_elements, unsigned int *value)
static const GPU_FeatureEnum GPU_FEATURE_GEOMETRY_SHADER
struct GPU_Renderer * renderer
void GPU_RectangleRound(GPU_Target *target, float x1, float y1, float x2, float y2, float radius, SDL_Color color)
void GPU_SetVirtualResolution(GPU_Target *target, Uint16 w, Uint16 h)
void(* BlitTransformX)(GPU_Renderer *renderer, 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)
GPU_Target * current_context_target
Uint8 GPU_IsDefaultShaderProgram(Uint32 program_object)
void GPU_SetTargetColor(GPU_Target *target, SDL_Color *color)
void GPU_SetUniformi(int location, int value)
int GPU_GetUniformLocation(Uint32 program_object, const char *uniform_name)
GPU_BlendEqEnum color_equation
GLubyte GLubyte GLubyte GLubyte w
GLsizei const GLfloat * value
void GPU_GetVirtualCoords(GPU_Target *target, float *x, float *y, float displayX, float displayY)
static const GPU_TypeEnum GPU_TYPE_UNSIGNED_SHORT
static const GPU_RendererEnum GPU_RENDERER_GLES_3
GPU_BlendMode shapes_blend_mode
GPU_BlendFuncEnum dest_alpha
GPU_InitFlagEnum GPU_GetPreInitFlags(void)
static const GPU_FeatureEnum GPU_FEATURE_BLEND_EQUATIONS
GLboolean GLboolean GLboolean GLboolean a
GPU_Image * GPU_CreateImage(Uint16 w, Uint16 h, GPU_FormatEnum format)
Uint8 GPU_ToggleFullscreen(Uint8 use_desktop_resolution)
void(* SetVirtualResolution)(GPU_Renderer *renderer, GPU_Target *target, Uint16 w, Uint16 h)
static const GPU_RendererEnum GPU_RENDERER_GLES_1
void GPU_UpdateImage(GPU_Image *image, SDL_Surface *surface, const GPU_Rect *surface_rect)
void(* SetUniformMatrixfv)(GPU_Renderer *renderer, int location, int num_matrices, int num_rows, int num_columns, Uint8 transpose, float *values)
Uint32 GPU_CompileShader_RW(GPU_ShaderEnum shader_type, SDL_RWops *shader_source)
void(* SetAttributefv)(GPU_Renderer *renderer, int location, int num_elements, float *value)
int per_vertex_storage_offset_bytes
Uint8(* ToggleFullscreen)(GPU_Renderer *renderer, Uint8 use_desktop_resolution)
static const GPU_BlitFlagEnum GPU_USE_DEFAULT_SRC_RECTS
static const GPU_RendererEnum GPU_RENDERER_OPENGL_4
void GPU_BlitBatchSeparate(GPU_Image *image, GPU_Target *target, unsigned int num_sprites, float *positions, float *src_rects, float *colors, GPU_BlitFlagEnum flags)
GPU_BlendFuncEnum source_color
void(* ArcFilled)(GPU_Renderer *renderer, GPU_Target *target, float x, float y, float radius, float start_angle, float end_angle, SDL_Color color)
void(* SetUniformui)(GPU_Renderer *renderer, int location, unsigned int value)
void GPU_DetachShader(Uint32 program_object, Uint32 shader_object)
Uint32 GPU_GetCurrentShaderProgram(void)
void(* SetAttributei)(GPU_Renderer *renderer, int location, int value)
struct GPU_Renderer * renderer
static const GPU_TypeEnum GPU_TYPE_SHORT
void(* GetUniformuiv)(GPU_Renderer *renderer, Uint32 program_object, int location, unsigned int *values)
void GPU_AttachShader(Uint32 program_object, Uint32 shader_object)
void GPU_SetUniformfv(int location, int num_elements_per_value, int num_values, float *values)
#define SDL_GPU_VERSION_MINOR
Uint8 GPU_IsFeatureEnabled(GPU_FeatureEnum feature)
int GPU_GetNumRegisteredRenderers(void)
typedef int(WINAPI *PFNWGLRELEASEPBUFFERDCARBPROC)(HPBUFFERARB hPbuffer
SDL_Surface * GPU_LoadSurface(const char *filename)
static const GPU_FeatureEnum GPU_FEATURE_PIXEL_SHADER
Uint8 shapes_use_blending
float(* SetLineThickness)(GPU_Renderer *renderer, float thickness)
cl_event GLbitfield flags
void GPU_GetDefaultRendererOrder(int *order_size, GPU_RendererID *order)
GPU_RendererID requested_id
void GPU_SetAttributef(int location, float value)
SDL_Surface * GPU_CopySurfaceFromImage(GPU_Image *image)
Uint32 GPU_LinkShaders(Uint32 shader_object1, Uint32 shader_object2)
SDL_Color(* GetPixel)(GPU_Renderer *renderer, GPU_Target *target, Sint16 x, Sint16 y)
void(* Pixel)(GPU_Renderer *renderer, GPU_Target *target, float x, float y, SDL_Color color)
void GPU_BlitRotate(GPU_Image *image, GPU_Rect *src_rect, GPU_Target *target, float x, float y, float degrees)
static const GPU_TypeEnum GPU_TYPE_BYTE
GPU_FilterEnum filter_mode
Encapsulates the map of the game.
Uint8(* IsFeatureEnabled)(GPU_Renderer *renderer, GPU_FeatureEnum feature)
void GPU_Line(GPU_Target *target, float x1, float y1, float x2, float y2, SDL_Color color)
SDL_Surface * GPU_CopySurfaceFromTarget(GPU_Target *target)
static const GPU_BlitFlagEnum GPU_USE_DEFAULT_POSITIONS
void(* PolygonFilled)(GPU_Renderer *renderer, GPU_Target *target, unsigned int num_vertices, float *vertices, SDL_Color color)
struct GPU_ErrorObject GPU_ErrorObject
void(* Line)(GPU_Renderer *renderer, GPU_Target *target, float x1, float y1, float x2, float y2, SDL_Color color)
static void block(LexState *ls)
void GPU_Tri(GPU_Target *target, float x1, float y1, float x2, float y2, float x3, float y3, SDL_Color color)
void GPU_SetBlendMode(GPU_Image *image, GPU_BlendPresetEnum mode)
void(* RectangleRound)(GPU_Renderer *renderer, GPU_Target *target, float x1, float y1, float x2, float y2, float radius, SDL_Color color)
GPU_Target * GPU_GetContextTarget(void)
GPU_MatrixStack modelview_matrix
static const GPU_RendererEnum GPU_RENDERER_OPENGL_3
void(* SetAttributeui)(GPU_Renderer *renderer, int location, unsigned int value)
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
void GPU_ArcFilled(GPU_Target *target, float x, float y, float radius, float start_angle, float end_angle, SDL_Color color)
static const GPU_FeatureEnum GPU_FEATURE_NON_POWER_OF_TWO
GPU_RendererID GPU_GetRendererID(unsigned int index)
static const GPU_RendererEnum GPU_RENDERER_OPENGL_1
GPU_ShaderBlock GPU_LoadShaderBlock(Uint32 program_object, const char *position_name, const char *texcoord_name, const char *color_name, const char *modelViewMatrix_name)
void GPU_UpdateSubImage(GPU_Image *image, const GPU_Rect *image_rect, SDL_Surface *surface, const GPU_Rect *surface_rect)
void GPU_Flip(GPU_Target *target)
void(* GetUniformiv)(GPU_Renderer *renderer, Uint32 program_object, int location, int *values)
void GPU_SetAttributeSource(int num_values, GPU_Attribute source)
GPU_Rect GPU_MakeRect(float x, float y, float w, float h)
void GPU_BlitTransform(GPU_Image *image, GPU_Rect *src_rect, GPU_Target *target, float x, float y, float degrees, float scaleX, float scaleY)
void GPU_FreeImage(GPU_Image *image)
static const GPU_RendererEnum GPU_RENDERER_UNKNOWN
GPU_FeatureEnum enabled_features
void GPU_SetDebugLevel(GPU_DebugLevelEnum level)
void GPU_SetCurrentRenderer(GPU_RendererID id)
void(* UpdateSubImage)(GPU_Renderer *renderer, GPU_Image *image, const GPU_Rect *image_rect, SDL_Surface *surface, const GPU_Rect *surface_rect)
void GPU_SetAttributeuiv(int location, int num_elements, unsigned int *value)
GLfloat GLfloat GLfloat GLfloat h
#define GPU_MATRIX_STACK_MAX
int GPU_GetNumActiveRenderers(void)
void GPU_SetShapeBlendEquation(GPU_BlendEqEnum color_equation, GPU_BlendEqEnum alpha_equation)
void(* SetImageFilter)(GPU_Renderer *renderer, GPU_Image *image, GPU_FilterEnum filter)
GLint GLint GLint GLint GLint x
static const GPU_RendererEnum GPU_RENDERER_D3D10
struct GPU_AttributeFormat GPU_AttributeFormat
#define SDL_GPU_VERSION_MAJOR
GPU_ShaderLanguageEnum shader_language
GPU_Target * GPU_CreateTargetFromWindow(Uint32 windowID)
void GPU_SetAttributeiv(int location, int num_elements, int *value)
void GPU_GetUniformfv(Uint32 program_object, int location, float *values)
GLdouble GLdouble GLdouble r
Uint32(* CompileShader)(GPU_Renderer *renderer, GPU_ShaderEnum shader_type, const char *shader_source)
int per_vertex_storage_stride_bytes
void GPU_SetShapeBlendFunction(GPU_BlendFuncEnum source_color, GPU_BlendFuncEnum dest_color, GPU_BlendFuncEnum source_alpha, GPU_BlendFuncEnum dest_alpha)
Uint8 GPU_SetWindowResolution(Uint16 w, Uint16 h)
Uint8 GPU_GetBlending(GPU_Image *image)
void(* Sector)(GPU_Renderer *renderer, GPU_Target *target, float x, float y, float inner_radius, float outer_radius, float start_angle, float end_angle, SDL_Color color)
void GPU_Blit(GPU_Image *image, GPU_Rect *src_rect, GPU_Target *target, float x, float y)
void(* UpdateImage)(GPU_Renderer *renderer, GPU_Image *image, SDL_Surface *surface, const GPU_Rect *surface_rect)
void GPU_Circle(GPU_Target *target, float x, float y, float radius, SDL_Color color)
Uint32(* CompileShader_RW)(GPU_Renderer *renderer, GPU_ShaderEnum shader_type, SDL_RWops *shader_source)
GPU_Attribute GPU_MakeAttribute(int location, void *values, GPU_AttributeFormat format)
GPU_BlendFuncEnum dest_color
void GPU_GetUniformuiv(Uint32 program_object, int location, unsigned int *values)
void(* TriFilled)(GPU_Renderer *renderer, GPU_Target *target, float x1, float y1, float x2, float y2, float x3, float y3, SDL_Color color)
GPU_AttributeFormat GPU_MakeAttributeFormat(int num_elems_per_vertex, GPU_TypeEnum type, Uint8 normalize, int stride_bytes, int offset_bytes)
static const GPU_RendererEnum GPU_RENDERER_GLES_2
static const GPU_RendererEnum GPU_RENDERER_OPENGL_1_BASE
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
static SDL_version GPU_GetCompiledVersion(void)
GPU_InitFlagEnum GPU_init_flags
GPU_AttributeFormat format
void GPU_SetUniformuiv(int location, int num_elements_per_value, int num_values, unsigned int *values)
void GPU_SetShapeBlendMode(GPU_BlendPresetEnum mode)
static const GPU_FeatureEnum GPU_FEATURE_GL_ABGR
void GPU_BlitScale(GPU_Image *image, GPU_Rect *src_rect, GPU_Target *target, float x, float y, float scaleX, float scaleY)
void(* SetUniformfv)(GPU_Renderer *renderer, int location, int num_elements_per_value, int num_values, float *values)
int GPU_GetAttributeLocation(Uint32 program_object, const char *attrib_name)
void(* GetUniformfv)(GPU_Renderer *renderer, Uint32 program_object, int location, float *values)
GPU_Image * GPU_CreateAliasImage(GPU_Image *image)
static const Uint32 GPU_NONE
void(* Circle)(GPU_Renderer *renderer, GPU_Target *target, float x, float y, float radius, SDL_Color color)
static const GPU_FeatureEnum GPU_FEATURE_GL_BGRA
static const GPU_TypeEnum GPU_TYPE_FLOAT
void GPU_SetShaderImage(GPU_Image *image, int location, int image_unit)
static const GPU_TypeEnum GPU_TYPE_UNSIGNED_BYTE
void GPU_SetTargetRGBA(GPU_Target *target, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
void GPU_Pixel(GPU_Target *target, float x, float y, SDL_Color color)
void GPU_SetAttributei(int location, int value)
void * per_vertex_storage
void(* DetachShader)(GPU_Renderer *renderer, Uint32 program_object, Uint32 shader_object)
struct GPU_Camera GPU_Camera
void(* UpdateImageBytes)(GPU_Renderer *renderer, GPU_Image *image, const GPU_Rect *image_rect, const unsigned char *bytes, int bytes_per_row)
void(* Polygon)(GPU_Renderer *renderer, GPU_Target *target, unsigned int num_vertices, float *vertices, SDL_Color color)
void(* GenerateMipmaps)(GPU_Renderer *renderer, GPU_Image *image)
Uint8(* IsDefaultShaderProgram)(GPU_Renderer *renderer, Uint32 program_object)
void GPU_TriangleBatch(GPU_Image *image, GPU_Target *target, unsigned short num_vertices, float *values, unsigned int num_indices, unsigned short *indices, GPU_BlitFlagEnum flags)
void(* SetUniformiv)(GPU_Renderer *renderer, int location, int num_elements_per_value, int num_values, int *values)
struct GPU_BlendMode GPU_BlendMode
this module manages the cache of images.
GPU_WindowFlagEnum SDL_init_flags
Uint8(* SaveImage)(GPU_Renderer *renderer, GPU_Image *image, const char *filename)
void GPU_CloseCurrentRenderer(void)
GLuint GLuint GLsizei GLenum const GLvoid * indices
void GPU_GenerateMipmaps(GPU_Image *image)
void GPU_Polygon(GPU_Target *target, unsigned int num_vertices, float *vertices, SDL_Color color)
void(* Arc)(GPU_Renderer *renderer, GPU_Target *target, float x, float y, float radius, float start_angle, float end_angle, SDL_Color color)
void GPU_BlitBatch(GPU_Image *image, GPU_Target *target, unsigned int num_sprites, float *values, GPU_BlitFlagEnum flags)
Uint32 current_shader_program
Uint32(* LinkShaderProgram)(GPU_Renderer *renderer, Uint32 program_object)
void GPU_SetAttributeui(int location, unsigned int value)
void(* UnsetVirtualResolution)(GPU_Renderer *renderer, GPU_Target *target)
GPU_Target * GPU_InitRenderer(GPU_RendererEnum renderer_enum, Uint16 w, Uint16 h, GPU_WindowFlagEnum SDL_flags)
void(* SetUniformf)(GPU_Renderer *renderer, int location, float value)
void GPU_DeactivateShaderProgram(void)
static const GPU_InitFlagEnum GPU_INIT_ENABLE_VSYNC
void GPU_LogInfo(const char *format,...)
GPU_Target * GPU_GetWindowTarget(Uint32 windowID)
void(* DeactivateShaderProgram)(GPU_Renderer *renderer)
void GPU_UnsetVirtualResolution(GPU_Target *target)
void GPU_PushErrorCode(const char *function, GPU_ErrorEnum error, const char *details,...)
void(* SetAttributeiv)(GPU_Renderer *renderer, int location, int num_elements, int *value)
void GPU_SetRGBA(GPU_Image *image, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
void GPU_RemoveRenderer(GPU_RendererID id)
void GPU_SetSnapMode(GPU_Image *image, GPU_SnapEnum mode)
void GPU_RectangleRoundFilled(GPU_Target *target, float x1, float y1, float x2, float y2, float radius, SDL_Color color)
Uint8 GPU_SaveImage(GPU_Image *image, const char *filename)
void GPU_LogError(const char *format,...)
void(* Clear)(GPU_Renderer *renderer, GPU_Target *target)
GPU_Image * GPU_CopyImageFromTarget(GPU_Target *target)
void GPU_SetRGB(GPU_Image *image, Uint8 r, Uint8 g, Uint8 b)
void GPU_LogWarning(const char *format,...)
void(* SetWrapMode)(GPU_Renderer *renderer, GPU_Image *image, GPU_WrapEnum wrap_mode_x, GPU_WrapEnum wrap_mode_y)
void(* RectangleRoundFilled)(GPU_Renderer *renderer, GPU_Target *target, float x1, float y1, float x2, float y2, float radius, SDL_Color color)
void(* FreeTarget)(GPU_Renderer *renderer, GPU_Target *target)
struct GPU_RendererID GPU_RendererID
void GPU_GetRegisteredRendererList(GPU_RendererID *renderers_array)
void GPU_SetShapeBlending(Uint8 enable)
void GPU_SetTargetRGB(GPU_Target *target, Uint8 r, Uint8 g, Uint8 b)
struct GPU_Image GPU_Image
GPU_Camera(* SetCamera)(GPU_Renderer *renderer, GPU_Target *target, GPU_Camera *cam)
Uint8 GPU_SaveSurface(SDL_Surface *surface, const char *filename)
void(* Rectangle)(GPU_Renderer *renderer, GPU_Target *target, float x1, float y1, float x2, float y2, SDL_Color color)
void GPU_Clear(GPU_Target *target)
Uint32 default_textured_shader_program
GLsizei GLsizei GLchar * source
void(* CircleFilled)(GPU_Renderer *renderer, GPU_Target *target, float x, float y, float radius, SDL_Color color)
void(* SetUniformuiv)(GPU_Renderer *renderer, int location, int num_elements_per_value, int num_values, unsigned int *values)
void GPU_SetUniformf(int location, float value)
void GPU_ClearColor(GPU_Target *target, SDL_Color *color)
GPU_Camera GPU_GetDefaultCamera(void)
GPU_Image * GPU_CopyImageFromSurface(SDL_Surface *surface)
void GPU_SectorFilled(GPU_Target *target, float x, float y, float inner_radius, float outer_radius, float start_angle, float end_angle, SDL_Color color)
float(* GetLineThickness)(GPU_Renderer *renderer)
GPU_BlendFuncEnum source_alpha
void GPU_ClearRGBA(GPU_Target *target, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
void GPU_SetPreInitFlags(GPU_InitFlagEnum GPU_flags)
void GPU_SetUniformiv(int location, int num_elements_per_value, int num_values, int *values)
GPU_Image * GPU_CopyImage(GPU_Image *image)