My Project
Loading...
Searching...
No Matches
SDL_gpu.h
1#ifndef _SDL_GPU_H__
2#define _SDL_GPU_H__
3
4#ifndef _USE_MATH_DEFINES
5#define _USE_MATH_DEFINES // So M_PI and company get defined on MSVC when we include math.h
6#endif
7#include <math.h> // Must be included before SDL.h, otherwise both try to define M_PI and we get a warning
8
9#include "SDL.h"
10#include <stdio.h>
11#include <stdarg.h>
12
13// Use SDL's DLL defines
14#include "begin_code.h"
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20// Compile-time version info
21#include "SDL_gpu_version.h"
22
23/* Auto-detect if we're using the SDL2 API by the headers available. */
24#if SDL_VERSION_ATLEAST(2,0,0)
25 #define SDL_GPU_USE_SDL2
26#else
27 #define SDL_GPU_USE_SDL1
28#endif
29
30
31// Check for bool support
32#ifdef __STDC_VERSION__
33 #define GPU_HAVE_STDC 1
34#else
35 #define GPU_HAVE_STDC 0
36#endif
37
38#define GPU_HAVE_C99 (GPU_HAVE_STDC && (__STDC_VERSION__ >= 199901L))
39
40#ifdef __GNUC__ // catches both gcc and clang I believe
41 #define GPU_HAVE_GNUC 1
42#else
43 #define GPU_HAVE_GNUC 0
44#endif
45
46#ifdef _MSC_VER
47 #define GPU_HAVE_MSVC 1
48#else
49 #define GPU_HAVE_MSVC 0
50#endif
51
52#define GPU_HAVE_MSVC18 (GPU_HAVE_MSVC && (_MSC_VER >= 1800)) // VS2013+
53
54#if defined(GPU_USE_REAL_BOOL) && GPU_USE_REAL_BOOL // allow user to specify
55 #define GPU_bool bool
56#elif defined(GPU_USE_INT_BOOL) && GPU_USE_INT_BOOL
57 #define GPU_bool int
58#elif GPU_HAVE_C99 || GPU_HAVE_GNUC || GPU_HAVE_MSVC18 || (defined(GPU_HAVE_STDBOOL) && GPU_HAVE_STDBOOL)
59 #include <stdbool.h>
60 #define GPU_bool bool
61#else
62 #define GPU_bool int
63#endif
64
65#if defined(_MSC_VER) || (defined(__INTEL_COMPILER) && defined(_WIN32))
66 #if defined(_M_X64)
67 #define SDL_GPU_BITNESS 64
68 #else
69 #define SDL_GPU_BITNESS 32
70 #endif
71 #define SDL_GPU_LONG_SIZE 4
72#elif defined(__clang__) || defined(__INTEL_COMPILER) || defined(__GNUC__)
73 #if defined(__x86_64)
74 #define SDL_GPU_BITNESS 64
75 #else
76 #define SDL_GPU_BITNESS 32
77 #endif
78 #if __LONG_MAX__ == 2147483647L
79 #define SDL_GPU_LONG_SIZE 4
80 #else
81 #define SDL_GPU_LONG_SIZE 8
82 #endif
83#endif
84
85// Struct padding for 32 or 64 bit alignment
86#if SDL_GPU_BITNESS == 32
87#define GPU_PAD_1_TO_32 char _padding[1];
88#define GPU_PAD_2_TO_32 char _padding[2];
89#define GPU_PAD_3_TO_32 char _padding[3];
90#define GPU_PAD_1_TO_64 char _padding[1];
91#define GPU_PAD_2_TO_64 char _padding[2];
92#define GPU_PAD_3_TO_64 char _padding[3];
93#define GPU_PAD_4_TO_64
94#define GPU_PAD_5_TO_64 char _padding[1];
95#define GPU_PAD_6_TO_64 char _padding[2];
96#define GPU_PAD_7_TO_64 char _padding[3];
97#elif SDL_GPU_BITNESS == 64
98#define GPU_PAD_1_TO_32 char _padding[1];
99#define GPU_PAD_2_TO_32 char _padding[2];
100#define GPU_PAD_3_TO_32 char _padding[3];
101#define GPU_PAD_1_TO_64 char _padding[1];
102#define GPU_PAD_2_TO_64 char _padding[2];
103#define GPU_PAD_3_TO_64 char _padding[3];
104#define GPU_PAD_4_TO_64 char _padding[4];
105#define GPU_PAD_5_TO_64 char _padding[5];
106#define GPU_PAD_6_TO_64 char _padding[6];
107#define GPU_PAD_7_TO_64 char _padding[7];
108#endif
109
110#define GPU_FALSE 0
111#define GPU_TRUE 1
112
113
114typedef struct GPU_Renderer GPU_Renderer;
115typedef struct GPU_Target GPU_Target;
116
137typedef struct GPU_Rect
138{
139 float x, y;
140 float w, h;
142
143#define GPU_RENDERER_ORDER_MAX 10
144
145typedef Uint32 GPU_RendererEnum;
146static const GPU_RendererEnum GPU_RENDERER_UNKNOWN = 0; // invalid value
147static const GPU_RendererEnum GPU_RENDERER_OPENGL_1_BASE = 1;
148static const GPU_RendererEnum GPU_RENDERER_OPENGL_1 = 2;
149static const GPU_RendererEnum GPU_RENDERER_OPENGL_2 = 3;
150static const GPU_RendererEnum GPU_RENDERER_OPENGL_3 = 4;
151static const GPU_RendererEnum GPU_RENDERER_OPENGL_4 = 5;
152static const GPU_RendererEnum GPU_RENDERER_GLES_1 = 11;
153static const GPU_RendererEnum GPU_RENDERER_GLES_2 = 12;
154static const GPU_RendererEnum GPU_RENDERER_GLES_3 = 13;
155static const GPU_RendererEnum GPU_RENDERER_D3D9 = 21;
156static const GPU_RendererEnum GPU_RENDERER_D3D10 = 22;
157static const GPU_RendererEnum GPU_RENDERER_D3D11 = 23;
158#define GPU_RENDERER_CUSTOM_0 1000
159
167typedef struct GPU_RendererID
168{
169 const char* name;
170 GPU_RendererEnum renderer;
171 int major_version;
172 int minor_version;
173
174 GPU_PAD_4_TO_64
176
177
183typedef enum {
184 GPU_NEVER = 0x0200,
185 GPU_LESS = 0x0201,
186 GPU_EQUAL = 0x0202,
187 GPU_LEQUAL = 0x0203,
188 GPU_GREATER = 0x0204,
189 GPU_NOTEQUAL = 0x0205,
190 GPU_GEQUAL = 0x0206,
191 GPU_ALWAYS = 0x0207
193
194
200typedef enum {
201 GPU_FUNC_ZERO = 0,
202 GPU_FUNC_ONE = 1,
203 GPU_FUNC_SRC_COLOR = 0x0300,
204 GPU_FUNC_DST_COLOR = 0x0306,
205 GPU_FUNC_ONE_MINUS_SRC = 0x0301,
206 GPU_FUNC_ONE_MINUS_DST = 0x0307,
207 GPU_FUNC_SRC_ALPHA = 0x0302,
208 GPU_FUNC_DST_ALPHA = 0x0304,
209 GPU_FUNC_ONE_MINUS_SRC_ALPHA = 0x0303,
210 GPU_FUNC_ONE_MINUS_DST_ALPHA = 0x0305
212
218typedef enum {
219 GPU_EQ_ADD = 0x8006,
220 GPU_EQ_SUBTRACT = 0x800A,
221 GPU_EQ_REVERSE_SUBTRACT = 0x800B
223
226typedef struct GPU_BlendMode
227{
228 GPU_BlendFuncEnum source_color;
229 GPU_BlendFuncEnum dest_color;
230 GPU_BlendFuncEnum source_alpha;
231 GPU_BlendFuncEnum dest_alpha;
232
233 GPU_BlendEqEnum color_equation;
234 GPU_BlendEqEnum alpha_equation;
236
242typedef enum {
243 GPU_BLEND_NORMAL = 0,
244 GPU_BLEND_PREMULTIPLIED_ALPHA = 1,
245 GPU_BLEND_MULTIPLY = 2,
246 GPU_BLEND_ADD = 3,
247 GPU_BLEND_SUBTRACT = 4,
248 GPU_BLEND_MOD_ALPHA = 5,
249 GPU_BLEND_SET_ALPHA = 6,
250 GPU_BLEND_SET = 7,
251 GPU_BLEND_NORMAL_KEEP_ALPHA = 8,
252 GPU_BLEND_NORMAL_ADD_ALPHA = 9,
253 GPU_BLEND_NORMAL_FACTOR_ALPHA = 10
255
260typedef enum {
261 GPU_FILTER_NEAREST = 0,
262 GPU_FILTER_LINEAR = 1,
263 GPU_FILTER_LINEAR_MIPMAP = 2
265
271typedef enum {
272 GPU_SNAP_NONE = 0,
273 GPU_SNAP_POSITION = 1,
274 GPU_SNAP_DIMENSIONS = 2,
275 GPU_SNAP_POSITION_AND_DIMENSIONS = 3
277
278
283typedef enum {
284 GPU_WRAP_NONE = 0,
285 GPU_WRAP_REPEAT = 1,
286 GPU_WRAP_MIRRORED = 2
288
293typedef enum {
294 GPU_FORMAT_LUMINANCE = 1,
295 GPU_FORMAT_LUMINANCE_ALPHA = 2,
296 GPU_FORMAT_RGB = 3,
297 GPU_FORMAT_RGBA = 4,
298 GPU_FORMAT_ALPHA = 5,
299 GPU_FORMAT_RG = 6,
300 GPU_FORMAT_YCbCr422 = 7,
301 GPU_FORMAT_YCbCr420P = 8,
302 GPU_FORMAT_BGR = 9,
303 GPU_FORMAT_BGRA = 10,
304 GPU_FORMAT_ABGR = 11
306
314typedef enum {
315 GPU_FILE_AUTO = 0,
316 GPU_FILE_PNG,
317 GPU_FILE_BMP,
318 GPU_FILE_TGA
320
321
322
333typedef struct GPU_Image
334{
335 struct GPU_Renderer* renderer;
336 GPU_Target* context_target;
337 GPU_Target* target;
338 void* data;
339
340 Uint16 w, h;
341 GPU_FormatEnum format;
342 int num_layers;
343 int bytes_per_pixel;
344 Uint16 base_w, base_h; // Original image dimensions
345 Uint16 texture_w, texture_h; // Underlying texture dimensions
346
347 float anchor_x; // Normalized coords for the point at which the image is blitted. Default is (0.5, 0.5), that is, the image is drawn centered.
348 float anchor_y; // These are interpreted according to GPU_SetCoordinateMode() and range from (0.0 - 1.0) normally.
349
350 SDL_Color color;
351 GPU_BlendMode blend_mode;
352 GPU_FilterEnum filter_mode;
353 GPU_SnapEnum snap_mode;
354 GPU_WrapEnum wrap_mode_x;
355 GPU_WrapEnum wrap_mode_y;
356
357 int refcount;
358
359 GPU_bool using_virtual_resolution;
360 GPU_bool has_mipmaps;
361 GPU_bool use_blending;
362 GPU_bool is_alias;
364
370typedef uintptr_t GPU_TextureHandle;
371
372
379typedef struct GPU_Camera
380{
381 float x, y, z;
382 float angle;
383 float zoom_x, zoom_y;
384 float z_near, z_far; // z clipping planes
385 GPU_bool use_centered_origin; // move rotation/scaling origin to the center of the camera's view
386
387 GPU_PAD_7_TO_64
389
390
396typedef struct GPU_ShaderBlock
397{
398 // Attributes
399 int position_loc;
400 int texcoord_loc;
401 int color_loc;
402 // Uniforms
403 int modelViewProjection_loc;
405
406
407
408
409
410#define GPU_MODEL 0
411#define GPU_VIEW 1
412#define GPU_PROJECTION 2
413
416typedef struct GPU_MatrixStack
417{
418 unsigned int storage_size;
419 unsigned int size;
420 float** matrix;
422
423
426typedef struct GPU_Context
427{
429 void* context;
430
433
434 GPU_ShaderBlock current_shader_block;
435 GPU_ShaderBlock default_textured_shader_block;
436 GPU_ShaderBlock default_untextured_shader_block;
437
438
440 Uint32 windowID;
441
444 int window_h;
445
448 int drawable_h;
449
452 int stored_window_h;
453
456 Uint32 default_textured_fragment_shader_id;
457 Uint32 default_untextured_vertex_shader_id;
458 Uint32 default_untextured_fragment_shader_id;
459
460
461
464 Uint32 default_textured_shader_program;
465 Uint32 default_untextured_shader_program;
466
467 GPU_BlendMode shapes_blend_mode;
468 float line_thickness;
469
470 int refcount;
471
472 void* data;
473
474 GPU_bool failed;
475 GPU_bool use_texturing;
476 GPU_bool shapes_use_blending;
477
478 GPU_PAD_5_TO_64
480
481
493{
494 struct GPU_Renderer* renderer;
495 GPU_Target* context_target;
496 GPU_Image* image;
497 void* data;
498 Uint16 w, h;
499 Uint16 base_w, base_h; // The true dimensions of the underlying image or window
500 GPU_Rect clip_rect;
501 SDL_Color color;
502
503 GPU_Rect viewport;
504
507 GPU_MatrixStack projection_matrix;
508 GPU_MatrixStack view_matrix;
509 GPU_MatrixStack model_matrix;
510
511 GPU_Camera camera;
512
513 GPU_bool using_virtual_resolution;
514 GPU_bool use_clip_rect;
515 GPU_bool use_color;
516 GPU_bool use_camera;
517
518
519 GPU_ComparisonEnum depth_function;
520
523 int refcount;
524
525 GPU_bool use_depth_test;
526 GPU_bool use_depth_write;
527 GPU_bool is_alias;
528
529 GPU_PAD_1_TO_64
530};
531
537typedef Uint32 GPU_FeatureEnum;
538static const GPU_FeatureEnum GPU_FEATURE_NON_POWER_OF_TWO = 0x1;
539static const GPU_FeatureEnum GPU_FEATURE_RENDER_TARGETS = 0x2;
540static const GPU_FeatureEnum GPU_FEATURE_BLEND_EQUATIONS = 0x4;
541static const GPU_FeatureEnum GPU_FEATURE_BLEND_FUNC_SEPARATE = 0x8;
542static const GPU_FeatureEnum GPU_FEATURE_BLEND_EQUATIONS_SEPARATE = 0x10;
543static const GPU_FeatureEnum GPU_FEATURE_GL_BGR = 0x20;
544static const GPU_FeatureEnum GPU_FEATURE_GL_BGRA = 0x40;
545static const GPU_FeatureEnum GPU_FEATURE_GL_ABGR = 0x80;
546static const GPU_FeatureEnum GPU_FEATURE_VERTEX_SHADER = 0x100;
547static const GPU_FeatureEnum GPU_FEATURE_FRAGMENT_SHADER = 0x200;
548static const GPU_FeatureEnum GPU_FEATURE_PIXEL_SHADER = 0x200;
549static const GPU_FeatureEnum GPU_FEATURE_GEOMETRY_SHADER = 0x400;
550static const GPU_FeatureEnum GPU_FEATURE_WRAP_REPEAT_MIRRORED = 0x800;
551static const GPU_FeatureEnum GPU_FEATURE_CORE_FRAMEBUFFER_OBJECTS = 0x1000;
552
554#define GPU_FEATURE_ALL_BASE GPU_FEATURE_RENDER_TARGETS
555#define GPU_FEATURE_ALL_BLEND_PRESETS (GPU_FEATURE_BLEND_EQUATIONS | GPU_FEATURE_BLEND_FUNC_SEPARATE)
556#define GPU_FEATURE_ALL_GL_FORMATS (GPU_FEATURE_GL_BGR | GPU_FEATURE_GL_BGRA | GPU_FEATURE_GL_ABGR)
557#define GPU_FEATURE_BASIC_SHADERS (GPU_FEATURE_FRAGMENT_SHADER | GPU_FEATURE_VERTEX_SHADER)
558#define GPU_FEATURE_ALL_SHADERS (GPU_FEATURE_FRAGMENT_SHADER | GPU_FEATURE_VERTEX_SHADER | GPU_FEATURE_GEOMETRY_SHADER)
559
560
561typedef Uint32 GPU_WindowFlagEnum;
562
569typedef Uint32 GPU_InitFlagEnum;
570static const GPU_InitFlagEnum GPU_INIT_ENABLE_VSYNC = 0x1;
571static const GPU_InitFlagEnum GPU_INIT_DISABLE_VSYNC = 0x2;
572static const GPU_InitFlagEnum GPU_INIT_DISABLE_DOUBLE_BUFFER = 0x4;
573static const GPU_InitFlagEnum GPU_INIT_DISABLE_AUTO_VIRTUAL_RESOLUTION = 0x8;
574static const GPU_InitFlagEnum GPU_INIT_REQUEST_COMPATIBILITY_PROFILE = 0x10;
575static const GPU_InitFlagEnum GPU_INIT_USE_ROW_BY_ROW_TEXTURE_UPLOAD_FALLBACK = 0x20;
576static const GPU_InitFlagEnum GPU_INIT_USE_COPY_TEXTURE_UPLOAD_FALLBACK = 0x40;
577
578#define GPU_DEFAULT_INIT_FLAGS 0
579
580
581static const Uint32 GPU_NONE = 0x0;
582
588typedef Uint32 GPU_PrimitiveEnum;
589static const GPU_PrimitiveEnum GPU_POINTS = 0x0;
590static const GPU_PrimitiveEnum GPU_LINES = 0x1;
591static const GPU_PrimitiveEnum GPU_LINE_LOOP = 0x2;
592static const GPU_PrimitiveEnum GPU_LINE_STRIP = 0x3;
593static const GPU_PrimitiveEnum GPU_TRIANGLES = 0x4;
594static const GPU_PrimitiveEnum GPU_TRIANGLE_STRIP = 0x5;
595static const GPU_PrimitiveEnum GPU_TRIANGLE_FAN = 0x6;
596
597
604typedef Uint32 GPU_BatchFlagEnum;
605static const GPU_BatchFlagEnum GPU_BATCH_XY = 0x1;
606static const GPU_BatchFlagEnum GPU_BATCH_XYZ = 0x2;
607static const GPU_BatchFlagEnum GPU_BATCH_ST = 0x4;
608static const GPU_BatchFlagEnum GPU_BATCH_RGB = 0x8;
609static const GPU_BatchFlagEnum GPU_BATCH_RGBA = 0x10;
610static const GPU_BatchFlagEnum GPU_BATCH_RGB8 = 0x20;
611static const GPU_BatchFlagEnum GPU_BATCH_RGBA8 = 0x40;
612
613#define GPU_BATCH_XY_ST (GPU_BATCH_XY | GPU_BATCH_ST)
614#define GPU_BATCH_XYZ_ST (GPU_BATCH_XYZ | GPU_BATCH_ST)
615#define GPU_BATCH_XY_RGB (GPU_BATCH_XY | GPU_BATCH_RGB)
616#define GPU_BATCH_XYZ_RGB (GPU_BATCH_XYZ | GPU_BATCH_RGB)
617#define GPU_BATCH_XY_RGBA (GPU_BATCH_XY | GPU_BATCH_RGBA)
618#define GPU_BATCH_XYZ_RGBA (GPU_BATCH_XYZ | GPU_BATCH_RGBA)
619#define GPU_BATCH_XY_ST_RGBA (GPU_BATCH_XY | GPU_BATCH_ST | GPU_BATCH_RGBA)
620#define GPU_BATCH_XYZ_ST_RGBA (GPU_BATCH_XYZ | GPU_BATCH_ST | GPU_BATCH_RGBA)
621#define GPU_BATCH_XY_RGB8 (GPU_BATCH_XY | GPU_BATCH_RGB8)
622#define GPU_BATCH_XYZ_RGB8 (GPU_BATCH_XYZ | GPU_BATCH_RGB8)
623#define GPU_BATCH_XY_RGBA8 (GPU_BATCH_XY | GPU_BATCH_RGBA8)
624#define GPU_BATCH_XYZ_RGBA8 (GPU_BATCH_XYZ | GPU_BATCH_RGBA8)
625#define GPU_BATCH_XY_ST_RGBA8 (GPU_BATCH_XY | GPU_BATCH_ST | GPU_BATCH_RGBA8)
626#define GPU_BATCH_XYZ_ST_RGBA8 (GPU_BATCH_XYZ | GPU_BATCH_ST | GPU_BATCH_RGBA8)
627
628
633typedef Uint32 GPU_FlipEnum;
634static const GPU_FlipEnum GPU_FLIP_NONE = 0x0;
635static const GPU_FlipEnum GPU_FLIP_HORIZONTAL = 0x1;
636static const GPU_FlipEnum GPU_FLIP_VERTICAL = 0x2;
637
638
642typedef Uint32 GPU_TypeEnum;
643// Use OpenGL's values for simpler translation
644static const GPU_TypeEnum GPU_TYPE_BYTE = 0x1400;
645static const GPU_TypeEnum GPU_TYPE_UNSIGNED_BYTE = 0x1401;
646static const GPU_TypeEnum GPU_TYPE_SHORT = 0x1402;
647static const GPU_TypeEnum GPU_TYPE_UNSIGNED_SHORT = 0x1403;
648static const GPU_TypeEnum GPU_TYPE_INT = 0x1404;
649static const GPU_TypeEnum GPU_TYPE_UNSIGNED_INT = 0x1405;
650static const GPU_TypeEnum GPU_TYPE_FLOAT = 0x1406;
651static const GPU_TypeEnum GPU_TYPE_DOUBLE = 0x140A;
652
653
654
655
656
657
664typedef enum {
665 GPU_VERTEX_SHADER = 0,
666 GPU_FRAGMENT_SHADER = 1,
667 GPU_PIXEL_SHADER = 1,
668 GPU_GEOMETRY_SHADER = 2
670
671
672
676typedef enum {
677 GPU_LANGUAGE_NONE = 0,
678 GPU_LANGUAGE_ARB_ASSEMBLY = 1,
679 GPU_LANGUAGE_GLSL = 2,
680 GPU_LANGUAGE_GLSLES = 3,
681 GPU_LANGUAGE_HLSL = 4,
682 GPU_LANGUAGE_CG = 5
684
687{
688 int num_elems_per_value;
689 GPU_TypeEnum type; // GPU_TYPE_FLOAT, GPU_TYPE_INT, GPU_TYPE_UNSIGNED_INT, etc.
690 int stride_bytes; // Number of bytes between two vertex specifications
691 int offset_bytes; // Number of bytes to skip at the beginning of 'values'
692 GPU_bool is_per_sprite; // Per-sprite values are expanded to 4 vertices
693 GPU_bool normalize;
694
695 GPU_PAD_2_TO_32
697
699typedef struct GPU_Attribute
700{
701 void* values; // Expect 4 values for each sprite
702 GPU_AttributeFormat format;
703 int location;
704
705 GPU_PAD_4_TO_64
707
710{
711 void* next_value;
712 void* per_vertex_storage; // Could point to the attribute's values or to allocated storage
713
714 int num_values;
715 // Automatic storage format
716 int per_vertex_storage_stride_bytes;
717 int per_vertex_storage_offset_bytes;
718 int per_vertex_storage_size; // Over 0 means that the per-vertex storage has been automatically allocated
719 GPU_Attribute attribute;
720 GPU_bool enabled;
721
722 GPU_PAD_7_TO_64
724
725
731typedef enum {
732 GPU_ERROR_NONE = 0,
733 GPU_ERROR_BACKEND_ERROR = 1,
734 GPU_ERROR_DATA_ERROR = 2,
735 GPU_ERROR_USER_ERROR = 3,
736 GPU_ERROR_UNSUPPORTED_FUNCTION = 4,
737 GPU_ERROR_NULL_ARGUMENT = 5,
738 GPU_ERROR_FILE_NOT_FOUND = 6
740
742typedef struct GPU_ErrorObject
743{
744 char* function;
745 char* details;
746 GPU_ErrorEnum error;
747
748 GPU_PAD_4_TO_64
750
751
757typedef enum {
758 GPU_DEBUG_LEVEL_0 = 0,
759 GPU_DEBUG_LEVEL_1 = 1,
760 GPU_DEBUG_LEVEL_2 = 2,
761 GPU_DEBUG_LEVEL_3 = 3,
762 GPU_DEBUG_LEVEL_MAX = 3
764
765
770typedef enum {
771 GPU_LOG_INFO = 0,
772 GPU_LOG_WARNING,
773 GPU_LOG_ERROR
775
776
777/* Private implementation of renderer members */
778struct GPU_RendererImpl;
779
782{
785 GPU_RendererID requested_id;
786 GPU_WindowFlagEnum SDL_init_flags;
787 GPU_InitFlagEnum GPU_init_flags;
788
789 GPU_ShaderLanguageEnum shader_language;
790 int min_shader_version;
791 int max_shader_version;
792 GPU_FeatureEnum enabled_features;
793
796
799 float default_image_anchor_y;
800
801 struct GPU_RendererImpl* impl;
802
805
806 GPU_PAD_7_TO_64
807};
808
809
810
811
812
813
817// Visual C does not support static inline
818#ifdef _MSC_VER
819static SDL_version SDLCALL GPU_GetCompiledVersion(void)
820#else
821static inline SDL_version SDLCALL GPU_GetCompiledVersion(void)
822#endif
823{
824 SDL_version v = {SDL_GPU_VERSION_MAJOR, SDL_GPU_VERSION_MINOR, SDL_GPU_VERSION_PATCH};
825 return v;
826}
827
828DECLSPEC SDL_version SDLCALL GPU_GetLinkedVersion(void);
829
831DECLSPEC void SDLCALL GPU_SetInitWindow(Uint32 windowID);
832
834DECLSPEC Uint32 SDLCALL GPU_GetInitWindow(void);
835
838DECLSPEC void SDLCALL GPU_SetPreInitFlags(GPU_InitFlagEnum GPU_flags);
839
841DECLSPEC GPU_InitFlagEnum SDLCALL GPU_GetPreInitFlags(void);
842
845DECLSPEC void SDLCALL GPU_SetRequiredFeatures(GPU_FeatureEnum features);
846
848DECLSPEC GPU_FeatureEnum SDLCALL GPU_GetRequiredFeatures(void);
849
851DECLSPEC void SDLCALL GPU_GetDefaultRendererOrder(int* order_size, GPU_RendererID* order);
852
854DECLSPEC void SDLCALL GPU_GetRendererOrder(int* order_size, GPU_RendererID* order);
855
857DECLSPEC void SDLCALL GPU_SetRendererOrder(int order_size, GPU_RendererID* order);
858
882DECLSPEC GPU_Target* SDLCALL GPU_Init(Uint16 w, Uint16 h, GPU_WindowFlagEnum SDL_flags);
883
885DECLSPEC GPU_Target* SDLCALL GPU_InitRenderer(GPU_RendererEnum renderer_enum, Uint16 w, Uint16 h, GPU_WindowFlagEnum SDL_flags);
886
891DECLSPEC GPU_Target* SDLCALL GPU_InitRendererByID(GPU_RendererID renderer_request, Uint16 w, Uint16 h, GPU_WindowFlagEnum SDL_flags);
892
897DECLSPEC GPU_bool SDLCALL GPU_IsFeatureEnabled(GPU_FeatureEnum feature);
898
900DECLSPEC void SDLCALL GPU_CloseCurrentRenderer(void);
901
903DECLSPEC void SDLCALL GPU_Quit(void);
904
905// End of Initialization
910// Debugging, logging, and error handling
911
912#define GPU_Log GPU_LogInfo
922DECLSPEC void SDLCALL GPU_SetDebugLevel(GPU_DebugLevelEnum level);
923
925DECLSPEC GPU_DebugLevelEnum SDLCALL GPU_GetDebugLevel(void);
926
928DECLSPEC void SDLCALL GPU_LogInfo(const char* format, ...);
929
931DECLSPEC void SDLCALL GPU_LogWarning(const char* format, ...);
932
934DECLSPEC void SDLCALL GPU_LogError(const char* format, ...);
935
937DECLSPEC void SDLCALL GPU_SetLogCallback(int (*callback)(GPU_LogLevelEnum log_level, const char* format, va_list args));
938
944DECLSPEC void SDLCALL GPU_PushErrorCode(const char* function, GPU_ErrorEnum error, const char* details, ...);
945
947DECLSPEC GPU_ErrorObject SDLCALL GPU_PopErrorCode(void);
948
950DECLSPEC const char* SDLCALL GPU_GetErrorString(GPU_ErrorEnum error);
951
953DECLSPEC void SDLCALL GPU_SetErrorQueueMax(unsigned int max);
954
955// End of Logging
968DECLSPEC GPU_RendererID SDLCALL GPU_MakeRendererID(const char* name, GPU_RendererEnum renderer, int major_version, int minor_version);
969
971DECLSPEC GPU_RendererID SDLCALL GPU_GetRendererID(GPU_RendererEnum renderer);
972
974DECLSPEC int SDLCALL GPU_GetNumRegisteredRenderers(void);
975
977DECLSPEC void SDLCALL GPU_GetRegisteredRendererList(GPU_RendererID* renderers_array);
978
980DECLSPEC void SDLCALL GPU_RegisterRenderer(GPU_RendererID id, GPU_Renderer* (SDLCALL *create_renderer)(GPU_RendererID request), void (SDLCALL *free_renderer)(GPU_Renderer* renderer));
981
982// End of RendererSetup
991DECLSPEC GPU_RendererEnum SDLCALL GPU_ReserveNextRendererEnum(void);
992
994DECLSPEC int SDLCALL GPU_GetNumActiveRenderers(void);
995
997DECLSPEC void SDLCALL GPU_GetActiveRendererList(GPU_RendererID* renderers_array);
998
1000DECLSPEC GPU_Renderer* SDLCALL GPU_GetCurrentRenderer(void);
1001
1003DECLSPEC void SDLCALL GPU_SetCurrentRenderer(GPU_RendererID id);
1004
1006DECLSPEC GPU_Renderer* SDLCALL GPU_GetRenderer(GPU_RendererID id);
1007
1008DECLSPEC void SDLCALL GPU_FreeRenderer(GPU_Renderer* renderer);
1009
1011DECLSPEC void SDLCALL GPU_ResetRendererState(void);
1012
1016DECLSPEC void SDLCALL GPU_SetCoordinateMode(GPU_bool use_math_coords);
1017
1018DECLSPEC GPU_bool SDLCALL GPU_GetCoordinateMode(void);
1019
1023DECLSPEC void SDLCALL GPU_SetDefaultAnchor(float anchor_x, float anchor_y);
1024
1028DECLSPEC void SDLCALL GPU_GetDefaultAnchor(float* anchor_x, float* anchor_y);
1029
1030// End of RendererControls
1036// Context / window controls
1037
1042DECLSPEC GPU_Target* SDLCALL GPU_GetContextTarget(void);
1043
1045DECLSPEC GPU_Target* SDLCALL GPU_GetWindowTarget(Uint32 windowID);
1046
1048DECLSPEC GPU_Target* SDLCALL GPU_CreateTargetFromWindow(Uint32 windowID);
1049
1054DECLSPEC void SDLCALL GPU_MakeCurrent(GPU_Target* target, Uint32 windowID);
1055
1058DECLSPEC GPU_bool SDLCALL GPU_SetWindowResolution(Uint16 w, Uint16 h);
1059
1065DECLSPEC GPU_bool SDLCALL GPU_SetFullscreen(GPU_bool enable_fullscreen, GPU_bool use_desktop_resolution);
1066
1068DECLSPEC GPU_bool SDLCALL GPU_GetFullscreen(void);
1069
1071DECLSPEC GPU_Target* SDLCALL GPU_GetActiveTarget(void);
1072
1074DECLSPEC GPU_bool SDLCALL GPU_SetActiveTarget(GPU_Target* target);
1075
1077DECLSPEC void SDLCALL GPU_SetShapeBlending(GPU_bool enable);
1078
1081
1083DECLSPEC void SDLCALL GPU_SetShapeBlendFunction(GPU_BlendFuncEnum source_color, GPU_BlendFuncEnum dest_color, GPU_BlendFuncEnum source_alpha, GPU_BlendFuncEnum dest_alpha);
1084
1086DECLSPEC void SDLCALL GPU_SetShapeBlendEquation(GPU_BlendEqEnum color_equation, GPU_BlendEqEnum alpha_equation);
1087
1089DECLSPEC void SDLCALL GPU_SetShapeBlendMode(GPU_BlendPresetEnum mode);
1090
1095DECLSPEC float SDLCALL GPU_SetLineThickness(float thickness);
1096
1098DECLSPEC float SDLCALL GPU_GetLineThickness(void);
1099
1100
1101// End of ContextControls
1114DECLSPEC GPU_Target* SDLCALL GPU_CreateAliasTarget(GPU_Target* target);
1115
1117DECLSPEC GPU_Target* SDLCALL GPU_LoadTarget(GPU_Image* image);
1118
1120DECLSPEC GPU_Target* SDLCALL GPU_GetTarget(GPU_Image* image);
1121
1123DECLSPEC void SDLCALL GPU_FreeTarget(GPU_Target* target);
1124
1126DECLSPEC void SDLCALL GPU_SetVirtualResolution(GPU_Target* target, Uint16 w, Uint16 h);
1127
1129DECLSPEC void SDLCALL GPU_GetVirtualResolution(GPU_Target* target, Uint16* w, Uint16* h);
1130
1132DECLSPEC void SDLCALL GPU_GetVirtualCoords(GPU_Target* target, float* x, float* y, float displayX, float displayY);
1133
1135DECLSPEC void SDLCALL GPU_UnsetVirtualResolution(GPU_Target* target);
1136
1138DECLSPEC GPU_Rect SDLCALL GPU_MakeRect(float x, float y, float w, float h);
1139
1141DECLSPEC SDL_Color SDLCALL GPU_MakeColor(Uint8 r, Uint8 g, Uint8 b, Uint8 a);
1142
1144DECLSPEC void SDLCALL GPU_SetViewport(GPU_Target* target, GPU_Rect viewport);
1145
1147DECLSPEC void SDLCALL GPU_UnsetViewport(GPU_Target* target);
1148
1150DECLSPEC GPU_Camera SDLCALL GPU_GetDefaultCamera(void);
1151
1153DECLSPEC GPU_Camera SDLCALL GPU_GetCamera(GPU_Target* target);
1154
1159DECLSPEC GPU_Camera SDLCALL GPU_SetCamera(GPU_Target* target, GPU_Camera* cam);
1160
1162DECLSPEC void SDLCALL GPU_EnableCamera(GPU_Target* target, GPU_bool use_camera);
1163
1165DECLSPEC GPU_bool SDLCALL GPU_IsCameraEnabled(GPU_Target* target);
1166
1170DECLSPEC GPU_bool SDLCALL GPU_AddDepthBuffer(GPU_Target* target);
1171
1175DECLSPEC void SDLCALL GPU_SetDepthTest(GPU_Target* target, GPU_bool enable);
1176
1178DECLSPEC void SDLCALL GPU_SetDepthWrite(GPU_Target* target, GPU_bool enable);
1179
1181DECLSPEC void SDLCALL GPU_SetDepthFunction(GPU_Target* target, GPU_ComparisonEnum compare_operation);
1182
1184DECLSPEC SDL_Color SDLCALL GPU_GetPixel(GPU_Target* target, Sint16 x, Sint16 y);
1185
1187DECLSPEC GPU_Rect SDLCALL GPU_SetClipRect(GPU_Target* target, GPU_Rect rect);
1188
1190DECLSPEC GPU_Rect SDLCALL GPU_SetClip(GPU_Target* target, Sint16 x, Sint16 y, Uint16 w, Uint16 h);
1191
1193DECLSPEC void SDLCALL GPU_UnsetClip(GPU_Target* target);
1194
1196DECLSPEC GPU_bool SDLCALL GPU_IntersectRect(GPU_Rect A, GPU_Rect B, GPU_Rect* result);
1197
1201DECLSPEC GPU_bool SDLCALL GPU_IntersectClipRect(GPU_Target* target, GPU_Rect B, GPU_Rect* result);
1202
1208DECLSPEC void SDLCALL GPU_SetTargetColor(GPU_Target* target, SDL_Color color);
1209
1215DECLSPEC void SDLCALL GPU_SetTargetRGB(GPU_Target* target, Uint8 r, Uint8 g, Uint8 b);
1216
1222DECLSPEC void SDLCALL GPU_SetTargetRGBA(GPU_Target* target, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
1223
1227DECLSPEC void SDLCALL GPU_UnsetTargetColor(GPU_Target* target);
1228
1229// End of TargetControls
1238DECLSPEC SDL_Surface* SDLCALL GPU_LoadSurface(const char* filename);
1239
1241DECLSPEC SDL_Surface* SDLCALL GPU_LoadSurface_RW(SDL_RWops* rwops, GPU_bool free_rwops);
1242
1246DECLSPEC GPU_bool SDLCALL GPU_SaveSurface(SDL_Surface* surface, const char* filename, GPU_FileFormatEnum format);
1247
1251DECLSPEC GPU_bool SDLCALL GPU_SaveSurface_RW(SDL_Surface* surface, SDL_RWops* rwops, GPU_bool free_rwops, GPU_FileFormatEnum format);
1252
1253// End of SurfaceControls
1267DECLSPEC GPU_Image* SDLCALL GPU_CreateImage(Uint16 w, Uint16 h, GPU_FormatEnum format);
1268
1270DECLSPEC GPU_Image* SDLCALL GPU_CreateImageUsingTexture(GPU_TextureHandle handle, GPU_bool take_ownership);
1271
1273DECLSPEC GPU_Image* SDLCALL GPU_LoadImage(const char* filename);
1274
1276DECLSPEC GPU_Image* SDLCALL GPU_LoadImage_RW(SDL_RWops* rwops, GPU_bool free_rwops);
1277
1280DECLSPEC GPU_Image* SDLCALL GPU_CreateAliasImage(GPU_Image* image);
1281
1283DECLSPEC GPU_Image* SDLCALL GPU_CopyImage(GPU_Image* image);
1284
1286DECLSPEC void SDLCALL GPU_FreeImage(GPU_Image* image);
1287
1289DECLSPEC void SDLCALL GPU_SetImageVirtualResolution(GPU_Image* image, Uint16 w, Uint16 h);
1290
1292DECLSPEC void SDLCALL GPU_UnsetImageVirtualResolution(GPU_Image* image);
1293
1295DECLSPEC void SDLCALL GPU_UpdateImage(GPU_Image* image, const GPU_Rect* image_rect, SDL_Surface* surface, const GPU_Rect* surface_rect);
1296
1298DECLSPEC void SDLCALL GPU_UpdateImageBytes(GPU_Image* image, const GPU_Rect* image_rect, const unsigned char* bytes, int bytes_per_row);
1299
1301DECLSPEC GPU_bool SDLCALL GPU_ReplaceImage(GPU_Image* image, SDL_Surface* surface, const GPU_Rect* surface_rect);
1302
1306DECLSPEC GPU_bool SDLCALL GPU_SaveImage(GPU_Image* image, const char* filename, GPU_FileFormatEnum format);
1307
1311DECLSPEC GPU_bool SDLCALL GPU_SaveImage_RW(GPU_Image* image, SDL_RWops* rwops, GPU_bool free_rwops, GPU_FileFormatEnum format);
1312
1314DECLSPEC void SDLCALL GPU_GenerateMipmaps(GPU_Image* image);
1315
1317DECLSPEC void SDLCALL GPU_SetColor(GPU_Image* image, SDL_Color color);
1318
1320DECLSPEC void SDLCALL GPU_SetRGB(GPU_Image* image, Uint8 r, Uint8 g, Uint8 b);
1321
1323DECLSPEC void SDLCALL GPU_SetRGBA(GPU_Image* image, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
1324
1327DECLSPEC void SDLCALL GPU_UnsetColor(GPU_Image* image);
1328
1330DECLSPEC GPU_bool SDLCALL GPU_GetBlending(GPU_Image* image);
1331
1333DECLSPEC void SDLCALL GPU_SetBlending(GPU_Image* image, GPU_bool enable);
1334
1336DECLSPEC void SDLCALL GPU_SetBlendFunction(GPU_Image* image, GPU_BlendFuncEnum source_color, GPU_BlendFuncEnum dest_color, GPU_BlendFuncEnum source_alpha, GPU_BlendFuncEnum dest_alpha);
1337
1339DECLSPEC void SDLCALL GPU_SetBlendEquation(GPU_Image* image, GPU_BlendEqEnum color_equation, GPU_BlendEqEnum alpha_equation);
1340
1342DECLSPEC void SDLCALL GPU_SetBlendMode(GPU_Image* image, GPU_BlendPresetEnum mode);
1343
1345DECLSPEC void SDLCALL GPU_SetImageFilter(GPU_Image* image, GPU_FilterEnum filter);
1346
1348DECLSPEC void SDLCALL GPU_SetAnchor(GPU_Image* image, float anchor_x, float anchor_y);
1349
1351DECLSPEC void SDLCALL GPU_GetAnchor(GPU_Image* image, float* anchor_x, float* anchor_y);
1352
1354DECLSPEC GPU_SnapEnum SDLCALL GPU_GetSnapMode(GPU_Image* image);
1355
1357DECLSPEC void SDLCALL GPU_SetSnapMode(GPU_Image* image, GPU_SnapEnum mode);
1358
1360DECLSPEC void SDLCALL GPU_SetWrapMode(GPU_Image* image, GPU_WrapEnum wrap_mode_x, GPU_WrapEnum wrap_mode_y);
1361
1363DECLSPEC GPU_TextureHandle SDLCALL GPU_GetTextureHandle(GPU_Image* image);
1364
1365// End of ImageControls
1369// Surface / Image / Target conversions
1374DECLSPEC GPU_Image* SDLCALL GPU_CopyImageFromSurface(SDL_Surface* surface);
1375
1377DECLSPEC GPU_Image* SDLCALL GPU_CopyImageFromSurfaceRect(SDL_Surface* surface, GPU_Rect* surface_rect);
1378
1380DECLSPEC GPU_Image* SDLCALL GPU_CopyImageFromTarget(GPU_Target* target);
1381
1383DECLSPEC SDL_Surface* SDLCALL GPU_CopySurfaceFromTarget(GPU_Target* target);
1384
1386DECLSPEC SDL_Surface* SDLCALL GPU_CopySurfaceFromImage(GPU_Image* image);
1387
1388// End of Conversions
1398// Basic vector operations (3D)
1399
1401DECLSPEC float SDLCALL GPU_VectorLength(const float* vec3);
1402
1404DECLSPEC void SDLCALL GPU_VectorNormalize(float* vec3);
1405
1407DECLSPEC float SDLCALL GPU_VectorDot(const float* A, const float* B);
1408
1410DECLSPEC void SDLCALL GPU_VectorCross(float* result, const float* A, const float* B);
1411
1413DECLSPEC void SDLCALL GPU_VectorCopy(float* result, const float* A);
1414
1416DECLSPEC void SDLCALL GPU_VectorApplyMatrix(float* vec3, const float* matrix_4x4);
1417
1419DECLSPEC void SDLCALL GPU_Vector4ApplyMatrix(float* vec4, const float* matrix_4x4);
1420
1421
1422
1423// Basic matrix operations (4x4)
1424
1426DECLSPEC void SDLCALL GPU_MatrixCopy(float* result, const float* A);
1427
1429DECLSPEC void SDLCALL GPU_MatrixIdentity(float* result);
1430
1432DECLSPEC void SDLCALL GPU_MatrixOrtho(float* result, float left, float right, float bottom, float top, float z_near, float z_far);
1433
1435DECLSPEC void SDLCALL GPU_MatrixFrustum(float* result, float left, float right, float bottom, float top, float z_near, float z_far);
1436
1438DECLSPEC void SDLCALL GPU_MatrixPerspective(float* result, float fovy, float aspect, float z_near, float z_far);
1439
1441DECLSPEC 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);
1442
1444DECLSPEC void SDLCALL GPU_MatrixTranslate(float* result, float x, float y, float z);
1445
1447DECLSPEC void SDLCALL GPU_MatrixScale(float* result, float sx, float sy, float sz);
1448
1450DECLSPEC void SDLCALL GPU_MatrixRotate(float* result, float degrees, float x, float y, float z);
1451
1455DECLSPEC void SDLCALL GPU_MatrixMultiply(float* result, const float* A, const float* B);
1456
1458DECLSPEC void SDLCALL GPU_MultiplyAndAssign(float* result, const float* B);
1459
1460
1461// Matrix stack accessors
1462
1464DECLSPEC const char* SDLCALL GPU_GetMatrixString(const float* A);
1465
1467DECLSPEC float* SDLCALL GPU_GetCurrentMatrix(void);
1468
1470DECLSPEC float* SDLCALL GPU_GetTopMatrix(GPU_MatrixStack* stack);
1471
1473DECLSPEC float* SDLCALL GPU_GetModel(void);
1474
1476DECLSPEC float* SDLCALL GPU_GetView(void);
1477
1479DECLSPEC float* SDLCALL GPU_GetProjection(void);
1480
1482DECLSPEC void SDLCALL GPU_GetModelViewProjection(float* result);
1483
1484
1485// Matrix stack manipulators
1486
1488DECLSPEC GPU_MatrixStack* SDLCALL GPU_CreateMatrixStack(void);
1489
1491DECLSPEC void SDLCALL GPU_FreeMatrixStack(GPU_MatrixStack* stack);
1492
1494DECLSPEC void SDLCALL GPU_InitMatrixStack(GPU_MatrixStack* stack);
1495
1497DECLSPEC void SDLCALL GPU_CopyMatrixStack(const GPU_MatrixStack* source, GPU_MatrixStack* dest);
1498
1500DECLSPEC void SDLCALL GPU_ClearMatrixStack(GPU_MatrixStack* stack);
1501
1503DECLSPEC void SDLCALL GPU_ResetProjection(GPU_Target* target);
1504
1506DECLSPEC void SDLCALL GPU_MatrixMode(GPU_Target* target, int matrix_mode);
1507
1509DECLSPEC void SDLCALL GPU_SetProjection(const float* A);
1510
1512DECLSPEC void SDLCALL GPU_SetView(const float* A);
1513
1515DECLSPEC void SDLCALL GPU_SetModel(const float* A);
1516
1518DECLSPEC void SDLCALL GPU_SetProjectionFromStack(GPU_MatrixStack* stack);
1519
1521DECLSPEC void SDLCALL GPU_SetViewFromStack(GPU_MatrixStack* stack);
1522
1524DECLSPEC void SDLCALL GPU_SetModelFromStack(GPU_MatrixStack* stack);
1525
1527DECLSPEC void SDLCALL GPU_PushMatrix(void);
1528
1530DECLSPEC void SDLCALL GPU_PopMatrix(void);
1531
1533DECLSPEC void SDLCALL GPU_LoadIdentity(void);
1534
1536DECLSPEC void SDLCALL GPU_LoadMatrix(const float* matrix4x4);
1537
1539DECLSPEC void SDLCALL GPU_Ortho(float left, float right, float bottom, float top, float z_near, float z_far);
1540
1542DECLSPEC void SDLCALL GPU_Frustum(float left, float right, float bottom, float top, float z_near, float z_far);
1543
1545DECLSPEC void SDLCALL GPU_Perspective(float fovy, float aspect, float z_near, float z_far);
1546
1548DECLSPEC void SDLCALL GPU_LookAt(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);
1549
1551DECLSPEC void SDLCALL GPU_Translate(float x, float y, float z);
1552
1554DECLSPEC void SDLCALL GPU_Scale(float sx, float sy, float sz);
1555
1557DECLSPEC void SDLCALL GPU_Rotate(float degrees, float x, float y, float z);
1558
1560DECLSPEC void SDLCALL GPU_MultMatrix(const float* matrix4x4);
1561
1562// End of Matrix
1574DECLSPEC void SDLCALL GPU_Clear(GPU_Target* target);
1575
1577DECLSPEC void SDLCALL GPU_ClearColor(GPU_Target* target, SDL_Color color);
1578
1580DECLSPEC void SDLCALL GPU_ClearRGB(GPU_Target* target, Uint8 r, Uint8 g, Uint8 b);
1581
1583DECLSPEC void SDLCALL GPU_ClearRGBA(GPU_Target* target, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
1584
1589DECLSPEC void SDLCALL GPU_Blit(GPU_Image* image, GPU_Rect* src_rect, GPU_Target* target, float x, float y);
1590
1596DECLSPEC void SDLCALL GPU_BlitRotate(GPU_Image* image, GPU_Rect* src_rect, GPU_Target* target, float x, float y, float degrees);
1597
1604DECLSPEC void SDLCALL GPU_BlitScale(GPU_Image* image, GPU_Rect* src_rect, GPU_Target* target, float x, float y, float scaleX, float scaleY);
1605
1613DECLSPEC void SDLCALL GPU_BlitTransform(GPU_Image* image, GPU_Rect* src_rect, GPU_Target* target, float x, float y, float degrees, float scaleX, float scaleY);
1614
1624DECLSPEC 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);
1625
1630DECLSPEC void SDLCALL GPU_BlitRect(GPU_Image* image, GPU_Rect* src_rect, GPU_Target* target, GPU_Rect* dest_rect);
1631
1640DECLSPEC 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);
1641
1642
1648DECLSPEC 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);
1649
1655DECLSPEC 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);
1656
1663DECLSPEC void SDLCALL GPU_PrimitiveBatch(GPU_Image* image, GPU_Target* target, GPU_PrimitiveEnum primitive_type, unsigned short num_vertices, float* values, unsigned int num_indices, unsigned short* indices, GPU_BatchFlagEnum flags);
1664
1671DECLSPEC void SDLCALL GPU_PrimitiveBatchV(GPU_Image* image, GPU_Target* target, GPU_PrimitiveEnum primitive_type, unsigned short num_vertices, void* values, unsigned int num_indices, unsigned short* indices, GPU_BatchFlagEnum flags);
1672
1674DECLSPEC void SDLCALL GPU_FlushBlitBuffer(void);
1675
1677DECLSPEC void SDLCALL GPU_Flip(GPU_Target* target);
1678
1679// End of Rendering
1695DECLSPEC void SDLCALL GPU_Pixel(GPU_Target* target, float x, float y, SDL_Color color);
1696
1705DECLSPEC void SDLCALL GPU_Line(GPU_Target* target, float x1, float y1, float x2, float y2, SDL_Color color);
1706
1716DECLSPEC void SDLCALL GPU_Arc(GPU_Target* target, float x, float y, float radius, float start_angle, float end_angle, SDL_Color color);
1717
1727DECLSPEC void SDLCALL GPU_ArcFilled(GPU_Target* target, float x, float y, float radius, float start_angle, float end_angle, SDL_Color color);
1728
1736DECLSPEC void SDLCALL GPU_Circle(GPU_Target* target, float x, float y, float radius, SDL_Color color);
1737
1745DECLSPEC void SDLCALL GPU_CircleFilled(GPU_Target* target, float x, float y, float radius, SDL_Color color);
1746
1756DECLSPEC void SDLCALL GPU_Ellipse(GPU_Target* target, float x, float y, float rx, float ry, float degrees, SDL_Color color);
1757
1767DECLSPEC void SDLCALL GPU_EllipseFilled(GPU_Target* target, float x, float y, float rx, float ry, float degrees, SDL_Color color);
1768
1779DECLSPEC 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);
1780
1791DECLSPEC 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);
1792
1803DECLSPEC void SDLCALL GPU_Tri(GPU_Target* target, float x1, float y1, float x2, float y2, float x3, float y3, SDL_Color color);
1804
1815DECLSPEC void SDLCALL GPU_TriFilled(GPU_Target* target, float x1, float y1, float x2, float y2, float x3, float y3, SDL_Color color);
1816
1825DECLSPEC void SDLCALL GPU_Rectangle(GPU_Target* target, float x1, float y1, float x2, float y2, SDL_Color color);
1826
1832DECLSPEC void SDLCALL GPU_Rectangle2(GPU_Target* target, GPU_Rect rect, SDL_Color color);
1833
1842DECLSPEC void SDLCALL GPU_RectangleFilled(GPU_Target* target, float x1, float y1, float x2, float y2, SDL_Color color);
1843
1849DECLSPEC void SDLCALL GPU_RectangleFilled2(GPU_Target* target, GPU_Rect rect, SDL_Color color);
1850
1860DECLSPEC void SDLCALL GPU_RectangleRound(GPU_Target* target, float x1, float y1, float x2, float y2, float radius, SDL_Color color);
1861
1868DECLSPEC void SDLCALL GPU_RectangleRound2(GPU_Target* target, GPU_Rect rect, float radius, SDL_Color color);
1869
1879DECLSPEC void SDLCALL GPU_RectangleRoundFilled(GPU_Target* target, float x1, float y1, float x2, float y2, float radius, SDL_Color color);
1880
1887DECLSPEC void SDLCALL GPU_RectangleRoundFilled2(GPU_Target* target, GPU_Rect rect, float radius, SDL_Color color);
1888
1895DECLSPEC void SDLCALL GPU_Polygon(GPU_Target* target, unsigned int num_vertices, float* vertices, SDL_Color color);
1896
1904DECLSPEC void SDLCALL GPU_Polyline(GPU_Target* target, unsigned int num_vertices, float* vertices, SDL_Color color, GPU_bool close_loop);
1905
1912DECLSPEC void SDLCALL GPU_PolygonFilled(GPU_Target* target, unsigned int num_vertices, float* vertices, SDL_Color color);
1913
1914// End of Shapes
1928DECLSPEC Uint32 SDLCALL GPU_CreateShaderProgram(void);
1929
1931DECLSPEC void SDLCALL GPU_FreeShaderProgram(Uint32 program_object);
1932
1934DECLSPEC Uint32 SDLCALL GPU_CompileShader_RW(GPU_ShaderEnum shader_type, SDL_RWops* shader_source, GPU_bool free_rwops);
1935
1937DECLSPEC Uint32 SDLCALL GPU_CompileShader(GPU_ShaderEnum shader_type, const char* shader_source);
1938
1940DECLSPEC Uint32 SDLCALL GPU_LoadShader(GPU_ShaderEnum shader_type, const char* filename);
1941
1943DECLSPEC Uint32 SDLCALL GPU_LinkShaders(Uint32 shader_object1, Uint32 shader_object2);
1944
1946DECLSPEC Uint32 SDLCALL GPU_LinkManyShaders(Uint32 *shader_objects, int count);
1947
1949DECLSPEC void SDLCALL GPU_FreeShader(Uint32 shader_object);
1950
1952DECLSPEC void SDLCALL GPU_AttachShader(Uint32 program_object, Uint32 shader_object);
1953
1955DECLSPEC void SDLCALL GPU_DetachShader(Uint32 program_object, Uint32 shader_object);
1956
1958DECLSPEC GPU_bool SDLCALL GPU_LinkShaderProgram(Uint32 program_object);
1959
1961DECLSPEC Uint32 SDLCALL GPU_GetCurrentShaderProgram(void);
1962
1964DECLSPEC GPU_bool SDLCALL GPU_IsDefaultShaderProgram(Uint32 program_object);
1965
1967DECLSPEC void SDLCALL GPU_ActivateShaderProgram(Uint32 program_object, GPU_ShaderBlock* block);
1968
1970DECLSPEC void SDLCALL GPU_DeactivateShaderProgram(void);
1971
1973DECLSPEC const char* SDLCALL GPU_GetShaderMessage(void);
1974
1976DECLSPEC int SDLCALL GPU_GetAttributeLocation(Uint32 program_object, const char* attrib_name);
1977
1979DECLSPEC GPU_AttributeFormat SDLCALL GPU_MakeAttributeFormat(int num_elems_per_vertex, GPU_TypeEnum type, GPU_bool normalize, int stride_bytes, int offset_bytes);
1980
1982DECLSPEC GPU_Attribute SDLCALL GPU_MakeAttribute(int location, void* values, GPU_AttributeFormat format);
1983
1985DECLSPEC int SDLCALL GPU_GetUniformLocation(Uint32 program_object, const char* uniform_name);
1986
1988DECLSPEC GPU_ShaderBlock SDLCALL GPU_LoadShaderBlock(Uint32 program_object, const char* position_name, const char* texcoord_name, const char* color_name, const char* modelViewMatrix_name);
1989
1991DECLSPEC void SDLCALL GPU_SetShaderBlock(GPU_ShaderBlock block);
1992
1994DECLSPEC GPU_ShaderBlock SDLCALL GPU_GetShaderBlock(void);
1995
2000DECLSPEC void SDLCALL GPU_SetShaderImage(GPU_Image* image, int location, int image_unit);
2001
2003DECLSPEC void SDLCALL GPU_GetUniformiv(Uint32 program_object, int location, int* values);
2004
2007DECLSPEC void SDLCALL GPU_SetUniformi(int location, int value);
2008
2010DECLSPEC void SDLCALL GPU_SetUniformiv(int location, int num_elements_per_value, int num_values, int* values);
2011
2013DECLSPEC void SDLCALL GPU_GetUniformuiv(Uint32 program_object, int location, unsigned int* values);
2014
2017DECLSPEC void SDLCALL GPU_SetUniformui(int location, unsigned int value);
2018
2020DECLSPEC void SDLCALL GPU_SetUniformuiv(int location, int num_elements_per_value, int num_values, unsigned int* values);
2021
2023DECLSPEC void SDLCALL GPU_GetUniformfv(Uint32 program_object, int location, float* values);
2024
2027DECLSPEC void SDLCALL GPU_SetUniformf(int location, float value);
2028
2030DECLSPEC void SDLCALL GPU_SetUniformfv(int location, int num_elements_per_value, int num_values, float* values);
2031
2033DECLSPEC void SDLCALL GPU_GetUniformMatrixfv(Uint32 program_object, int location, float* values);
2034
2036DECLSPEC void SDLCALL GPU_SetUniformMatrixfv(int location, int num_matrices, int num_rows, int num_columns, GPU_bool transpose, float* values);
2037
2039DECLSPEC void SDLCALL GPU_SetAttributef(int location, float value);
2040
2042DECLSPEC void SDLCALL GPU_SetAttributei(int location, int value);
2043
2045DECLSPEC void SDLCALL GPU_SetAttributeui(int location, unsigned int value);
2046
2048DECLSPEC void SDLCALL GPU_SetAttributefv(int location, int num_elements, float* value);
2049
2051DECLSPEC void SDLCALL GPU_SetAttributeiv(int location, int num_elements, int* value);
2052
2054DECLSPEC void SDLCALL GPU_SetAttributeuiv(int location, int num_elements, unsigned int* value);
2055
2057DECLSPEC void SDLCALL GPU_SetAttributeSource(int num_values, GPU_Attribute source);
2058
2059// End of ShaderInterface
2063#ifdef __cplusplus
2064}
2065#endif
2066
2067#include "close_code.h"
2068
2069
2070#endif
2071
DECLSPEC float SDLCALL GPU_GetLineThickness(void)
Definition: SDL_gpu_shapes.c:29
DECLSPEC GPU_bool SDLCALL GPU_SetFullscreen(GPU_bool enable_fullscreen, GPU_bool use_desktop_resolution)
Definition: SDL_gpu.c:512
DECLSPEC void SDLCALL GPU_SetShapeBlendEquation(GPU_BlendEqEnum color_equation, GPU_BlendEqEnum alpha_equation)
Definition: SDL_gpu.c:1949
DECLSPEC GPU_Target *SDLCALL GPU_GetActiveTarget(void)
Definition: SDL_gpu.c:536
DECLSPEC float SDLCALL GPU_SetLineThickness(float thickness)
Definition: SDL_gpu_shapes.c:23
DECLSPEC void SDLCALL GPU_SetShapeBlendFunction(GPU_BlendFuncEnum source_color, GPU_BlendFuncEnum dest_color, GPU_BlendFuncEnum source_alpha, GPU_BlendFuncEnum dest_alpha)
Definition: SDL_gpu.c:1935
DECLSPEC GPU_Target *SDLCALL GPU_GetWindowTarget(Uint32 windowID)
Definition: SDL_gpu.c:390
DECLSPEC GPU_bool SDLCALL GPU_GetFullscreen(void)
Definition: SDL_gpu.c:520
DECLSPEC GPU_bool SDLCALL GPU_SetActiveTarget(GPU_Target *target)
Definition: SDL_gpu.c:545
DECLSPEC GPU_BlendMode SDLCALL GPU_GetBlendModeFromPreset(GPU_BlendPresetEnum preset)
Definition: SDL_gpu.c:1820
DECLSPEC GPU_Target *SDLCALL GPU_CreateTargetFromWindow(Uint32 windowID)
Definition: SDL_gpu.c:483
DECLSPEC void SDLCALL GPU_SetShapeBlendMode(GPU_BlendPresetEnum mode)
Definition: SDL_gpu.c:1961
DECLSPEC void SDLCALL GPU_SetShapeBlending(GPU_bool enable)
Definition: SDL_gpu.c:1811
DECLSPEC void SDLCALL GPU_MakeCurrent(GPU_Target *target, Uint32 windowID)
Definition: SDL_gpu.c:504
DECLSPEC GPU_bool SDLCALL GPU_SetWindowResolution(Uint16 w, Uint16 h)
Definition: SDL_gpu.c:579
DECLSPEC GPU_Target *SDLCALL GPU_GetContextTarget(void)
Definition: SDL_gpu.c:1360
DECLSPEC GPU_Image *SDLCALL GPU_CopyImageFromSurface(SDL_Surface *surface)
Definition: SDL_gpu.c:1305
DECLSPEC SDL_Surface *SDLCALL GPU_CopySurfaceFromTarget(GPU_Target *target)
Definition: SDL_gpu.c:1332
DECLSPEC GPU_Image *SDLCALL GPU_CopyImageFromSurfaceRect(SDL_Surface *surface, GPU_Rect *surface_rect)
Definition: SDL_gpu.c:1313
DECLSPEC SDL_Surface *SDLCALL GPU_CopySurfaceFromImage(GPU_Image *image)
Definition: SDL_gpu.c:1343
DECLSPEC GPU_Image *SDLCALL GPU_CopyImageFromTarget(GPU_Target *target)
Definition: SDL_gpu.c:1321
DECLSPEC GPU_Image *SDLCALL GPU_CopyImage(GPU_Image *image)
Definition: SDL_gpu.c:1027
DECLSPEC GPU_SnapEnum SDLCALL GPU_GetSnapMode(GPU_Image *image)
Definition: SDL_gpu.c:2025
GPU_FormatEnum
Definition: SDL_gpu.h:293
GPU_FilterEnum
Definition: SDL_gpu.h:260
GPU_WrapEnum
Definition: SDL_gpu.h:283
DECLSPEC void SDLCALL GPU_SetBlendFunction(GPU_Image *image, GPU_BlendFuncEnum source_color, GPU_BlendFuncEnum dest_color, GPU_BlendFuncEnum source_alpha, GPU_BlendFuncEnum dest_alpha)
Definition: SDL_gpu.c:1904
DECLSPEC void SDLCALL GPU_UpdateImageBytes(GPU_Image *image, const GPU_Rect *image_rect, const unsigned char *bytes, int bytes_per_row)
Definition: SDL_gpu.c:1043
uintptr_t GPU_TextureHandle
Definition: SDL_gpu.h:370
GPU_FileFormatEnum
Definition: SDL_gpu.h:314
DECLSPEC GPU_bool SDLCALL GPU_GetBlending(GPU_Image *image)
Definition: SDL_gpu.c:1794
DECLSPEC GPU_Image *SDLCALL GPU_CreateImageUsingTexture(GPU_TextureHandle handle, GPU_bool take_ownership)
Definition: SDL_gpu.c:966
DECLSPEC void SDLCALL GPU_GetAnchor(GPU_Image *image, float *anchor_x, float *anchor_y)
Definition: SDL_gpu.c:2013
DECLSPEC void SDLCALL GPU_UnsetImageVirtualResolution(GPU_Image *image)
Definition: SDL_gpu.c:640
DECLSPEC void SDLCALL GPU_SetColor(GPU_Image *image, SDL_Color color)
Definition: SDL_gpu.c:1700
DECLSPEC void SDLCALL GPU_SetAnchor(GPU_Image *image, float anchor_x, float anchor_y)
Definition: SDL_gpu.c:2004
DECLSPEC void SDLCALL GPU_SetBlending(GPU_Image *image, GPU_bool enable)
Definition: SDL_gpu.c:1803
GPU_BlendPresetEnum
Definition: SDL_gpu.h:242
DECLSPEC void SDLCALL GPU_SetBlendEquation(GPU_Image *image, GPU_BlendEqEnum color_equation, GPU_BlendEqEnum alpha_equation)
Definition: SDL_gpu.c:1915
DECLSPEC GPU_Image *SDLCALL GPU_CreateImage(Uint16 w, Uint16 h, GPU_FormatEnum format)
Definition: SDL_gpu.c:958
DECLSPEC void SDLCALL GPU_SetWrapMode(GPU_Image *image, GPU_WrapEnum wrap_mode_x, GPU_WrapEnum wrap_mode_y)
Definition: SDL_gpu.c:2041
DECLSPEC GPU_bool SDLCALL GPU_ReplaceImage(GPU_Image *image, SDL_Surface *surface, const GPU_Rect *surface_rect)
Definition: SDL_gpu.c:1051
DECLSPEC void SDLCALL GPU_UnsetColor(GPU_Image *image)
Definition: SDL_gpu.c:1736
DECLSPEC void SDLCALL GPU_SetBlendMode(GPU_Image *image, GPU_BlendPresetEnum mode)
Definition: SDL_gpu.c:1924
DECLSPEC GPU_bool SDLCALL GPU_SaveImage_RW(GPU_Image *image, SDL_RWops *rwops, GPU_bool free_rwops, GPU_FileFormatEnum format)
Definition: SDL_gpu.c:1015
GPU_BlendEqEnum
Definition: SDL_gpu.h:218
DECLSPEC void SDLCALL GPU_SetRGBA(GPU_Image *image, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Definition: SDL_gpu.c:1722
DECLSPEC GPU_Image *SDLCALL GPU_LoadImage_RW(SDL_RWops *rwops, GPU_bool free_rwops)
Definition: SDL_gpu.c:979
DECLSPEC GPU_bool SDLCALL GPU_SaveImage(GPU_Image *image, const char *filename, GPU_FileFormatEnum format)
Definition: SDL_gpu.c:1007
GPU_SnapEnum
Definition: SDL_gpu.h:271
DECLSPEC void SDLCALL GPU_SetRGB(GPU_Image *image, Uint8 r, Uint8 g, Uint8 b)
Definition: SDL_gpu.c:1708
DECLSPEC void SDLCALL GPU_GenerateMipmaps(GPU_Image *image)
Definition: SDL_gpu.c:1594
DECLSPEC GPU_Image *SDLCALL GPU_CreateAliasImage(GPU_Image *image)
Definition: SDL_gpu.c:999
DECLSPEC void SDLCALL GPU_SetImageFilter(GPU_Image *image, GPU_FilterEnum filter)
Definition: SDL_gpu.c:1972
DECLSPEC GPU_Image *SDLCALL GPU_LoadImage(const char *filename)
Definition: SDL_gpu.c:974
DECLSPEC void SDLCALL GPU_FreeImage(GPU_Image *image)
Definition: SDL_gpu.c:1351
DECLSPEC void SDLCALL GPU_SetImageVirtualResolution(GPU_Image *image, Uint16 w, Uint16 h)
Definition: SDL_gpu.c:626
DECLSPEC void SDLCALL GPU_UpdateImage(GPU_Image *image, const GPU_Rect *image_rect, SDL_Surface *surface, const GPU_Rect *surface_rect)
Definition: SDL_gpu.c:1035
GPU_BlendFuncEnum
Definition: SDL_gpu.h:200
DECLSPEC GPU_TextureHandle SDLCALL GPU_GetTextureHandle(GPU_Image *image)
Definition: SDL_gpu.c:2051
DECLSPEC void SDLCALL GPU_SetSnapMode(GPU_Image *image, GPU_SnapEnum mode)
Definition: SDL_gpu.c:2033
DECLSPEC void SDLCALL GPU_Quit(void)
Definition: SDL_gpu.c:694
DECLSPEC GPU_InitFlagEnum SDLCALL GPU_GetPreInitFlags(void)
Definition: SDL_gpu.c:230
DECLSPEC GPU_bool SDLCALL GPU_IsFeatureEnabled(GPU_FeatureEnum feature)
Definition: SDL_gpu.c:475
DECLSPEC void SDLCALL GPU_SetRendererOrder(int order_size, GPU_RendererID *order)
Definition: SDL_gpu_renderer.c:300
DECLSPEC GPU_Target *SDLCALL GPU_InitRenderer(GPU_RendererEnum renderer_enum, Uint16 w, Uint16 h, GPU_WindowFlagEnum SDL_flags)
Definition: SDL_gpu.c:438
Uint32 GPU_InitFlagEnum
Definition: SDL_gpu.h:569
DECLSPEC Uint32 SDLCALL GPU_GetInitWindow(void)
Definition: SDL_gpu.c:220
DECLSPEC void SDLCALL GPU_SetInitWindow(Uint32 windowID)
Definition: SDL_gpu.c:215
DECLSPEC GPU_Target *SDLCALL GPU_InitRendererByID(GPU_RendererID renderer_request, Uint16 w, Uint16 h, GPU_WindowFlagEnum SDL_flags)
Definition: SDL_gpu.c:444
DECLSPEC void SDLCALL GPU_SetRequiredFeatures(GPU_FeatureEnum features)
Definition: SDL_gpu.c:235
DECLSPEC GPU_Target *SDLCALL GPU_Init(Uint16 w, Uint16 h, GPU_WindowFlagEnum SDL_flags)
Definition: SDL_gpu.c:410
DECLSPEC void SDLCALL GPU_GetRendererOrder(int *order_size, GPU_RendererID *order)
Definition: SDL_gpu_renderer.c:291
Uint32 GPU_FeatureEnum
Definition: SDL_gpu.h:537
DECLSPEC void SDLCALL GPU_CloseCurrentRenderer(void)
Definition: SDL_gpu.c:685
DECLSPEC void SDLCALL GPU_SetPreInitFlags(GPU_InitFlagEnum GPU_flags)
Definition: SDL_gpu.c:225
DECLSPEC void SDLCALL GPU_GetDefaultRendererOrder(int *order_size, GPU_RendererID *order)
Definition: SDL_gpu_renderer.c:327
DECLSPEC GPU_FeatureEnum SDLCALL GPU_GetRequiredFeatures(void)
Definition: SDL_gpu.c:240
DECLSPEC GPU_ErrorObject SDLCALL GPU_PopErrorCode(void)
Definition: SDL_gpu.c:788
DECLSPEC void SDLCALL GPU_LogError(const char *format,...)
Definition: SDL_gpu.c:180
DECLSPEC void SDLCALL GPU_SetDebugLevel(GPU_DebugLevelEnum level)
Definition: SDL_gpu.c:732
GPU_DebugLevelEnum
Definition: SDL_gpu.h:757
DECLSPEC void SDLCALL GPU_PushErrorCode(const char *function, GPU_ErrorEnum error, const char *details,...)
Definition: SDL_gpu.c:744
DECLSPEC void SDLCALL GPU_SetLogCallback(int(*callback)(GPU_LogLevelEnum log_level, const char *format, va_list args))
Definition: SDL_gpu.c:156
GPU_LogLevelEnum
Definition: SDL_gpu.h:770
DECLSPEC void SDLCALL GPU_LogWarning(const char *format,...)
Definition: SDL_gpu.c:172
DECLSPEC void SDLCALL GPU_SetErrorQueueMax(unsigned int max)
Definition: SDL_gpu.c:676
GPU_ErrorEnum
Definition: SDL_gpu.h:731
DECLSPEC void SDLCALL GPU_LogInfo(const char *format,...)
Definition: SDL_gpu.c:164
DECLSPEC GPU_DebugLevelEnum SDLCALL GPU_GetDebugLevel(void)
Definition: SDL_gpu.c:739
DECLSPEC const char *SDLCALL GPU_GetErrorString(GPU_ErrorEnum error)
Definition: SDL_gpu.c:817
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)
Definition: SDL_gpu_matrix.c:303
DECLSPEC void SDLCALL GPU_Ortho(float left, float right, float bottom, float top, float z_near, float z_far)
Definition: SDL_gpu_matrix.c:702
DECLSPEC void SDLCALL GPU_MatrixCopy(float *result, const float *A)
Definition: SDL_gpu_matrix.c:231
DECLSPEC void SDLCALL GPU_MatrixOrtho(float *result, float left, float right, float bottom, float top, float z_near, float z_far)
Definition: SDL_gpu_matrix.c:243
DECLSPEC void SDLCALL GPU_SetModelFromStack(GPU_MatrixStack *stack)
Definition: SDL_gpu_matrix.c:658
DECLSPEC void SDLCALL GPU_ResetProjection(GPU_Target *target)
Definition: SDL_gpu_matrix.c:126
DECLSPEC void SDLCALL GPU_MatrixIdentity(float *result)
Definition: SDL_gpu_matrix.c:236
DECLSPEC void SDLCALL GPU_MatrixScale(float *result, float sx, float sy, float sz)
Definition: SDL_gpu_matrix.c:370
DECLSPEC void SDLCALL GPU_PopMatrix(void)
Definition: SDL_gpu_matrix.c:589
DECLSPEC void SDLCALL GPU_GetModelViewProjection(float *result)
Definition: SDL_gpu_matrix.c:754
DECLSPEC float *SDLCALL GPU_GetTopMatrix(GPU_MatrixStack *stack)
Definition: SDL_gpu_matrix.c:676
DECLSPEC void SDLCALL GPU_MatrixMultiply(float *result, const float *A, const float *B)
Definition: SDL_gpu_matrix.c:434
DECLSPEC void SDLCALL GPU_Frustum(float left, float right, float bottom, float top, float z_near, float z_far)
Definition: SDL_gpu_matrix.c:708
DECLSPEC void SDLCALL GPU_SetModel(const float *A)
Definition: SDL_gpu_matrix.c:629
DECLSPEC float SDLCALL GPU_VectorDot(const float *A, const float *B)
Definition: SDL_gpu_matrix.c:160
DECLSPEC float *SDLCALL GPU_GetProjection(void)
Definition: SDL_gpu_matrix.c:519
DECLSPEC void SDLCALL GPU_MultiplyAndAssign(float *result, const float *B)
Definition: SDL_gpu_matrix.c:457
DECLSPEC void SDLCALL GPU_VectorCross(float *result, const float *A, const float *B)
Definition: SDL_gpu_matrix.c:165
DECLSPEC void SDLCALL GPU_MatrixRotate(float *result, float degrees, float x, float y, float z)
Definition: SDL_gpu_matrix.c:388
DECLSPEC void SDLCALL GPU_Rotate(float degrees, float x, float y, float z)
Definition: SDL_gpu_matrix.c:739
DECLSPEC void SDLCALL GPU_MatrixMode(GPU_Target *target, int matrix_mode)
Definition: SDL_gpu_matrix.c:489
DECLSPEC void SDLCALL GPU_InitMatrixStack(GPU_MatrixStack *stack)
Definition: SDL_gpu_matrix.c:79
DECLSPEC GPU_MatrixStack *SDLCALL GPU_CreateMatrixStack(void)
Definition: SDL_gpu_matrix.c:62
DECLSPEC void SDLCALL GPU_LoadMatrix(const float *matrix4x4)
Definition: SDL_gpu_matrix.c:693
DECLSPEC float *SDLCALL GPU_GetView(void)
Definition: SDL_gpu_matrix.c:511
DECLSPEC void SDLCALL GPU_SetProjection(const float *A)
Definition: SDL_gpu_matrix.c:619
DECLSPEC const char *SDLCALL GPU_GetMatrixString(const float *A)
Definition: SDL_gpu_matrix.c:469
DECLSPEC void SDLCALL GPU_LoadIdentity(void)
Definition: SDL_gpu_matrix.c:683
DECLSPEC void SDLCALL GPU_VectorApplyMatrix(float *vec3, const float *matrix_4x4)
Definition: SDL_gpu_matrix.c:179
DECLSPEC float SDLCALL GPU_VectorLength(const float *vec3)
Definition: SDL_gpu_matrix.c:147
DECLSPEC void SDLCALL GPU_MatrixPerspective(float *result, float fovy, float aspect, float z_near, float z_far)
Definition: SDL_gpu_matrix.c:290
DECLSPEC void SDLCALL GPU_ClearMatrixStack(GPU_MatrixStack *stack)
Definition: SDL_gpu_matrix.c:112
DECLSPEC void SDLCALL GPU_SetView(const float *A)
Definition: SDL_gpu_matrix.c:639
DECLSPEC void SDLCALL GPU_LookAt(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)
Definition: SDL_gpu_matrix.c:720
DECLSPEC float *SDLCALL GPU_GetCurrentMatrix(void)
Definition: SDL_gpu_matrix.c:527
DECLSPEC void SDLCALL GPU_Perspective(float fovy, float aspect, float z_near, float z_far)
Definition: SDL_gpu_matrix.c:714
DECLSPEC void SDLCALL GPU_SetProjectionFromStack(GPU_MatrixStack *stack)
Definition: SDL_gpu_matrix.c:649
DECLSPEC void SDLCALL GPU_SetViewFromStack(GPU_MatrixStack *stack)
Definition: SDL_gpu_matrix.c:667
DECLSPEC void SDLCALL GPU_FreeMatrixStack(GPU_MatrixStack *stack)
Definition: SDL_gpu_matrix.c:73
DECLSPEC float *SDLCALL GPU_GetModel(void)
Definition: SDL_gpu_matrix.c:503
DECLSPEC void SDLCALL GPU_PushMatrix(void)
Definition: SDL_gpu_matrix.c:543
DECLSPEC void SDLCALL GPU_VectorNormalize(float *vec3)
Definition: SDL_gpu_matrix.c:152
DECLSPEC void SDLCALL GPU_MatrixTranslate(float *result, float x, float y, float z)
Definition: SDL_gpu_matrix.c:342
DECLSPEC void SDLCALL GPU_Scale(float sx, float sy, float sz)
Definition: SDL_gpu_matrix.c:733
DECLSPEC void SDLCALL GPU_MatrixFrustum(float *result, float left, float right, float bottom, float top, float z_near, float z_far)
Definition: SDL_gpu_matrix.c:272
DECLSPEC void SDLCALL GPU_MultMatrix(const float *matrix4x4)
Definition: SDL_gpu_matrix.c:745
DECLSPEC void SDLCALL GPU_VectorCopy(float *result, const float *A)
Definition: SDL_gpu_matrix.c:172
DECLSPEC void SDLCALL GPU_CopyMatrixStack(const GPU_MatrixStack *source, GPU_MatrixStack *dest)
Definition: SDL_gpu_matrix.c:95
DECLSPEC void SDLCALL GPU_Vector4ApplyMatrix(float *vec4, const float *matrix_4x4)
Definition: SDL_gpu_matrix.c:190
DECLSPEC void SDLCALL GPU_Translate(float x, float y, float z)
Definition: SDL_gpu_matrix.c:727
DECLSPEC void SDLCALL GPU_GetDefaultAnchor(float *anchor_x, float *anchor_y)
Definition: SDL_gpu.c:1992
DECLSPEC void SDLCALL GPU_GetActiveRendererList(GPU_RendererID *renderers_array)
Definition: SDL_gpu_renderer.c:63
DECLSPEC GPU_RendererEnum SDLCALL GPU_ReserveNextRendererEnum(void)
Definition: SDL_gpu_renderer.c:41
DECLSPEC void SDLCALL GPU_SetCoordinateMode(GPU_bool use_math_coords)
Definition: SDL_gpu.c:102
DECLSPEC void SDLCALL GPU_SetDefaultAnchor(float anchor_x, float anchor_y)
Definition: SDL_gpu.c:1983
DECLSPEC void SDLCALL GPU_SetCurrentRenderer(GPU_RendererID id)
Definition: SDL_gpu.c:86
DECLSPEC int SDLCALL GPU_GetNumActiveRenderers(void)
Definition: SDL_gpu_renderer.c:47
DECLSPEC GPU_Renderer *SDLCALL GPU_GetRenderer(GPU_RendererID id)
Definition: SDL_gpu_renderer.c:415
DECLSPEC void SDLCALL GPU_ResetRendererState(void)
Definition: SDL_gpu.c:94
DECLSPEC GPU_Renderer *SDLCALL GPU_GetCurrentRenderer(void)
Definition: SDL_gpu.c:118
DECLSPEC void SDLCALL GPU_GetRegisteredRendererList(GPU_RendererID *renderers_array)
Definition: SDL_gpu_renderer.c:98
DECLSPEC GPU_RendererID SDLCALL GPU_MakeRendererID(const char *name, GPU_RendererEnum renderer, int major_version, int minor_version)
Definition: SDL_gpu.c:896
DECLSPEC GPU_RendererID SDLCALL GPU_GetRendererID(GPU_RendererEnum renderer)
Definition: SDL_gpu_renderer.c:117
DECLSPEC int SDLCALL GPU_GetNumRegisteredRenderers(void)
Definition: SDL_gpu_renderer.c:82
DECLSPEC void SDLCALL GPU_RegisterRenderer(GPU_RendererID id, GPU_Renderer *(SDLCALL *create_renderer)(GPU_RendererID request), void(SDLCALL *free_renderer)(GPU_Renderer *renderer))
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)
Definition: SDL_gpu.c:1465
DECLSPEC void SDLCALL GPU_Clear(GPU_Target *target)
Definition: SDL_gpu.c:2076
DECLSPEC void SDLCALL GPU_ClearColor(GPU_Target *target, SDL_Color color)
Definition: SDL_gpu.c:2087
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)
Definition: SDL_gpu.c:1558
DECLSPEC void SDLCALL GPU_ClearRGBA(GPU_Target *target, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Definition: SDL_gpu.c:2109
DECLSPEC void SDLCALL GPU_Flip(GPU_Target *target)
Definition: SDL_gpu.c:2128
DECLSPEC void SDLCALL GPU_PrimitiveBatch(GPU_Image *image, GPU_Target *target, GPU_PrimitiveEnum primitive_type, unsigned short num_vertices, float *values, unsigned int num_indices, unsigned short *indices, GPU_BatchFlagEnum flags)
Definition: SDL_gpu.c:1568
DECLSPEC void SDLCALL GPU_BlitRotate(GPU_Image *image, GPU_Rect *src_rect, GPU_Target *target, float x, float y, float degrees)
Definition: SDL_gpu.c:1417
Uint32 GPU_PrimitiveEnum
Definition: SDL_gpu.h:588
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)
Definition: SDL_gpu.c:1449
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)
Definition: SDL_gpu.c:1563
DECLSPEC void SDLCALL GPU_PrimitiveBatchV(GPU_Image *image, GPU_Target *target, GPU_PrimitiveEnum primitive_type, unsigned short num_vertices, void *values, unsigned int num_indices, unsigned short *indices, GPU_BatchFlagEnum flags)
Definition: SDL_gpu.c:1573
DECLSPEC void SDLCALL GPU_FlushBlitBuffer(void)
Definition: SDL_gpu.c:2120
DECLSPEC void SDLCALL GPU_BlitRect(GPU_Image *image, GPU_Rect *src_rect, GPU_Target *target, GPU_Rect *dest_rect)
Definition: SDL_gpu.c:1481
DECLSPEC void SDLCALL GPU_ClearRGB(GPU_Target *target, Uint8 r, Uint8 g, Uint8 b)
Definition: SDL_gpu.c:2098
DECLSPEC void SDLCALL GPU_BlitScale(GPU_Image *image, GPU_Rect *src_rect, GPU_Target *target, float x, float y, float scaleX, float scaleY)
Definition: SDL_gpu.c:1433
DECLSPEC void SDLCALL GPU_Blit(GPU_Image *image, GPU_Rect *src_rect, GPU_Target *target, float x, float y)
Definition: SDL_gpu.c:1400
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)
Definition: SDL_gpu.c:1503
GPU_ShaderEnum
Definition: SDL_gpu.h:664
DECLSPEC void SDLCALL GPU_DetachShader(Uint32 program_object, Uint32 shader_object)
Definition: SDL_gpu.c:2264
DECLSPEC void SDLCALL GPU_DeactivateShaderProgram(void)
Definition: SDL_gpu.c:2291
Uint32 GPU_TypeEnum
Definition: SDL_gpu.h:642
DECLSPEC void SDLCALL GPU_FreeShader(Uint32 shader_object)
Definition: SDL_gpu.c:2240
DECLSPEC GPU_ShaderBlock SDLCALL GPU_GetShaderBlock(void)
Definition: SDL_gpu.c:2367
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)
Definition: SDL_gpu.c:2344
DECLSPEC void SDLCALL GPU_SetShaderBlock(GPU_ShaderBlock block)
Definition: SDL_gpu.c:2359
DECLSPEC void SDLCALL GPU_SetAttributeSource(int num_values, GPU_Attribute source)
Definition: SDL_gpu.c:2530
DECLSPEC void SDLCALL GPU_SetAttributefv(int location, int num_elements, float *value)
Definition: SDL_gpu.c:2506
DECLSPEC void SDLCALL GPU_SetUniformiv(int location, int num_elements_per_value, int num_values, int *values)
Definition: SDL_gpu.c:2406
DECLSPEC const char *SDLCALL GPU_GetShaderMessage(void)
Definition: SDL_gpu.c:2299
DECLSPEC Uint32 SDLCALL GPU_CompileShader(GPU_ShaderEnum shader_type, const char *shader_source)
Definition: SDL_gpu.c:2185
DECLSPEC void SDLCALL GPU_SetAttributeiv(int location, int num_elements, int *value)
Definition: SDL_gpu.c:2514
DECLSPEC void SDLCALL GPU_SetUniformfv(int location, int num_elements_per_value, int num_values, float *values)
Definition: SDL_gpu.c:2456
DECLSPEC Uint32 SDLCALL GPU_LinkShaders(Uint32 shader_object1, Uint32 shader_object2)
Definition: SDL_gpu.c:2209
DECLSPEC GPU_AttributeFormat SDLCALL GPU_MakeAttributeFormat(int num_elems_per_vertex, GPU_TypeEnum type, GPU_bool normalize, int stride_bytes, int offset_bytes)
Definition: SDL_gpu.c:2315
DECLSPEC void SDLCALL GPU_SetAttributeui(int location, unsigned int value)
Definition: SDL_gpu.c:2498
DECLSPEC void SDLCALL GPU_AttachShader(Uint32 program_object, Uint32 shader_object)
Definition: SDL_gpu.c:2256
DECLSPEC int SDLCALL GPU_GetAttributeLocation(Uint32 program_object, const char *attrib_name)
Definition: SDL_gpu.c:2307
DECLSPEC void SDLCALL GPU_SetUniformMatrixfv(int location, int num_matrices, int num_rows, int num_columns, GPU_bool transpose, float *values)
Definition: SDL_gpu.c:2473
DECLSPEC int SDLCALL GPU_GetUniformLocation(Uint32 program_object, const char *uniform_name)
Definition: SDL_gpu.c:2336
DECLSPEC GPU_Attribute SDLCALL GPU_MakeAttribute(int location, void *values, GPU_AttributeFormat format)
Definition: SDL_gpu.c:2327
DECLSPEC GPU_bool SDLCALL GPU_IsDefaultShaderProgram(Uint32 program_object)
Definition: SDL_gpu.c:2272
DECLSPEC Uint32 SDLCALL GPU_LoadShader(GPU_ShaderEnum shader_type, const char *filename)
Definition: SDL_gpu.c:2165
DECLSPEC void SDLCALL GPU_SetAttributeuiv(int location, int num_elements, unsigned int *value)
Definition: SDL_gpu.c:2522
DECLSPEC void SDLCALL GPU_GetUniformfv(Uint32 program_object, int location, float *values)
Definition: SDL_gpu.c:2440
DECLSPEC void SDLCALL GPU_GetUniformMatrixfv(Uint32 program_object, int location, float *values)
Definition: SDL_gpu.c:2465
DECLSPEC void SDLCALL GPU_SetUniformui(int location, unsigned int value)
Definition: SDL_gpu.c:2423
DECLSPEC void SDLCALL GPU_SetAttributef(int location, float value)
Definition: SDL_gpu.c:2482
DECLSPEC Uint32 SDLCALL GPU_LinkManyShaders(Uint32 *shader_objects, int count)
Definition: SDL_gpu.c:2217
DECLSPEC Uint32 SDLCALL GPU_CreateShaderProgram(void)
Definition: SDL_gpu.c:2201
GPU_ShaderLanguageEnum
Definition: SDL_gpu.h:676
DECLSPEC Uint32 SDLCALL GPU_CompileShader_RW(GPU_ShaderEnum shader_type, SDL_RWops *shader_source, GPU_bool free_rwops)
Definition: SDL_gpu.c:2153
DECLSPEC void SDLCALL GPU_SetShaderImage(GPU_Image *image, int location, int image_unit)
Definition: SDL_gpu.c:2382
DECLSPEC void SDLCALL GPU_SetUniformf(int location, float value)
Definition: SDL_gpu.c:2448
DECLSPEC void SDLCALL GPU_SetUniformuiv(int location, int num_elements_per_value, int num_values, unsigned int *values)
Definition: SDL_gpu.c:2431
DECLSPEC Uint32 SDLCALL GPU_GetCurrentShaderProgram(void)
Definition: SDL_gpu.c:123
DECLSPEC void SDLCALL GPU_GetUniformuiv(Uint32 program_object, int location, unsigned int *values)
Definition: SDL_gpu.c:2415
DECLSPEC void SDLCALL GPU_ActivateShaderProgram(Uint32 program_object, GPU_ShaderBlock *block)
Definition: SDL_gpu.c:2283
DECLSPEC void SDLCALL GPU_SetAttributei(int location, int value)
Definition: SDL_gpu.c:2490
DECLSPEC void SDLCALL GPU_FreeShaderProgram(Uint32 program_object)
Definition: SDL_gpu.c:2248
DECLSPEC void SDLCALL GPU_GetUniformiv(Uint32 program_object, int location, int *values)
Definition: SDL_gpu.c:2390
DECLSPEC GPU_bool SDLCALL GPU_LinkShaderProgram(Uint32 program_object)
Definition: SDL_gpu.c:2193
DECLSPEC void SDLCALL GPU_SetUniformi(int location, int value)
Definition: SDL_gpu.c:2398
DECLSPEC void SDLCALL GPU_RectangleRoundFilled(GPU_Target *target, float x1, float y1, float x2, float y2, float radius, SDL_Color color)
Definition: SDL_gpu_shapes.c:145
DECLSPEC void SDLCALL GPU_RectangleFilled(GPU_Target *target, float x1, float y1, float x2, float y2, SDL_Color color)
Definition: SDL_gpu_shapes.c:121
DECLSPEC void SDLCALL GPU_Tri(GPU_Target *target, float x1, float y1, float x2, float y2, float x3, float y3, SDL_Color color)
Definition: SDL_gpu_shapes.c:97
DECLSPEC void SDLCALL GPU_PolygonFilled(GPU_Target *target, unsigned int num_vertices, float *vertices, SDL_Color color)
Definition: SDL_gpu_shapes.c:169
DECLSPEC void SDLCALL GPU_Ellipse(GPU_Target *target, float x, float y, float rx, float ry, float degrees, SDL_Color color)
Definition: SDL_gpu_shapes.c:73
DECLSPEC void SDLCALL GPU_Arc(GPU_Target *target, float x, float y, float radius, float start_angle, float end_angle, SDL_Color color)
Definition: SDL_gpu_shapes.c:48
DECLSPEC void SDLCALL GPU_Rectangle(GPU_Target *target, float x1, float y1, float x2, float y2, SDL_Color color)
Definition: SDL_gpu_shapes.c:109
DECLSPEC void SDLCALL GPU_RectangleFilled2(GPU_Target *target, GPU_Rect rect, SDL_Color color)
Definition: SDL_gpu_shapes.c:127
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)
Definition: SDL_gpu_shapes.c:91
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)
Definition: SDL_gpu_shapes.c:85
DECLSPEC void SDLCALL GPU_RectangleRound2(GPU_Target *target, GPU_Rect rect, float radius, SDL_Color color)
Definition: SDL_gpu_shapes.c:139
DECLSPEC void SDLCALL GPU_EllipseFilled(GPU_Target *target, float x, float y, float rx, float ry, float degrees, SDL_Color color)
Definition: SDL_gpu_shapes.c:79
DECLSPEC void SDLCALL GPU_Rectangle2(GPU_Target *target, GPU_Rect rect, SDL_Color color)
Definition: SDL_gpu_shapes.c:115
DECLSPEC void SDLCALL GPU_Circle(GPU_Target *target, float x, float y, float radius, SDL_Color color)
Definition: SDL_gpu_shapes.c:61
DECLSPEC void SDLCALL GPU_Polygon(GPU_Target *target, unsigned int num_vertices, float *vertices, SDL_Color color)
Definition: SDL_gpu_shapes.c:157
DECLSPEC void SDLCALL GPU_RectangleRound(GPU_Target *target, float x1, float y1, float x2, float y2, float radius, SDL_Color color)
Definition: SDL_gpu_shapes.c:133
DECLSPEC void SDLCALL GPU_Polyline(GPU_Target *target, unsigned int num_vertices, float *vertices, SDL_Color color, GPU_bool close_loop)
Definition: SDL_gpu_shapes.c:163
DECLSPEC void SDLCALL GPU_Pixel(GPU_Target *target, float x, float y, SDL_Color color)
Definition: SDL_gpu_shapes.c:35
DECLSPEC void SDLCALL GPU_Line(GPU_Target *target, float x1, float y1, float x2, float y2, SDL_Color color)
Definition: SDL_gpu_shapes.c:41
DECLSPEC void SDLCALL GPU_TriFilled(GPU_Target *target, float x1, float y1, float x2, float y2, float x3, float y3, SDL_Color color)
Definition: SDL_gpu_shapes.c:103
DECLSPEC void SDLCALL GPU_ArcFilled(GPU_Target *target, float x, float y, float radius, float start_angle, float end_angle, SDL_Color color)
Definition: SDL_gpu_shapes.c:55
DECLSPEC void SDLCALL GPU_CircleFilled(GPU_Target *target, float x, float y, float radius, SDL_Color color)
Definition: SDL_gpu_shapes.c:67
DECLSPEC void SDLCALL GPU_RectangleRoundFilled2(GPU_Target *target, GPU_Rect rect, float radius, SDL_Color color)
Definition: SDL_gpu_shapes.c:151
DECLSPEC SDL_Surface *SDLCALL GPU_LoadSurface_RW(SDL_RWops *rwops, GPU_bool free_rwops)
Definition: SDL_gpu.c:1148
DECLSPEC GPU_bool SDLCALL GPU_SaveSurface_RW(SDL_Surface *surface, SDL_RWops *rwops, GPU_bool free_rwops, GPU_FileFormatEnum format)
Definition: SDL_gpu.c:1263
DECLSPEC SDL_Surface *SDLCALL GPU_LoadSurface(const char *filename)
Definition: SDL_gpu.c:1194
DECLSPEC GPU_bool SDLCALL GPU_SaveSurface(SDL_Surface *surface, const char *filename, GPU_FileFormatEnum format)
Definition: SDL_gpu.c:1208
DECLSPEC void SDLCALL GPU_SetDepthTest(GPU_Target *target, GPU_bool enable)
Definition: SDL_gpu.c:561
DECLSPEC void SDLCALL GPU_GetVirtualResolution(GPU_Target *target, Uint16 *w, Uint16 *h)
Definition: SDL_gpu.c:588
DECLSPEC void SDLCALL GPU_GetVirtualCoords(GPU_Target *target, float *x, float *y, float displayX, float displayY)
Definition: SDL_gpu.c:840
DECLSPEC void SDLCALL GPU_SetViewport(GPU_Target *target, GPU_Rect viewport)
Definition: SDL_gpu.c:907
DECLSPEC void SDLCALL GPU_SetTargetColor(GPU_Target *target, SDL_Color color)
Definition: SDL_gpu.c:1745
DECLSPEC GPU_Rect SDLCALL GPU_MakeRect(float x, float y, float w, float h)
Definition: SDL_gpu.c:874
DECLSPEC void SDLCALL GPU_UnsetViewport(GPU_Target *target)
Definition: SDL_gpu.c:913
DECLSPEC GPU_Camera SDLCALL GPU_GetDefaultCamera(void)
Definition: SDL_gpu.c:919
DECLSPEC SDL_Color SDLCALL GPU_GetPixel(GPU_Target *target, Sint16 x, Sint16 y)
Definition: SDL_gpu.c:2059
DECLSPEC SDL_Color SDLCALL GPU_MakeColor(Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Definition: SDL_gpu.c:885
DECLSPEC GPU_bool SDLCALL GPU_AddDepthBuffer(GPU_Target *target)
Definition: SDL_gpu.c:553
DECLSPEC void SDLCALL GPU_UnsetClip(GPU_Target *target)
Definition: SDL_gpu.c:1627
DECLSPEC GPU_bool SDLCALL GPU_IntersectRect(GPU_Rect A, GPU_Rect B, GPU_Rect *result)
Definition: SDL_gpu.c:1636
DECLSPEC GPU_bool SDLCALL GPU_IntersectClipRect(GPU_Target *target, GPU_Rect B, GPU_Rect *result)
Definition: SDL_gpu.c:1685
DECLSPEC GPU_Rect SDLCALL GPU_SetClipRect(GPU_Target *target, GPU_Rect rect)
Definition: SDL_gpu.c:1605
DECLSPEC void SDLCALL GPU_UnsetVirtualResolution(GPU_Target *target)
Definition: SDL_gpu.c:615
DECLSPEC GPU_bool SDLCALL GPU_IsCameraEnabled(GPU_Target *target)
Definition: SDL_gpu.c:951
DECLSPEC GPU_Camera SDLCALL GPU_GetCamera(GPU_Target *target)
Definition: SDL_gpu.c:925
DECLSPEC GPU_Camera SDLCALL GPU_SetCamera(GPU_Target *target, GPU_Camera *cam)
Definition: SDL_gpu.c:932
DECLSPEC void SDLCALL GPU_SetDepthFunction(GPU_Target *target, GPU_ComparisonEnum compare_operation)
Definition: SDL_gpu.c:573
DECLSPEC void SDLCALL GPU_FreeTarget(GPU_Target *target)
Definition: SDL_gpu.c:1390
DECLSPEC GPU_Rect SDLCALL GPU_SetClip(GPU_Target *target, Sint16 x, Sint16 y, Uint16 w, Uint16 h)
Definition: SDL_gpu.c:1616
DECLSPEC GPU_Target *SDLCALL GPU_GetTarget(GPU_Image *image)
Definition: SDL_gpu.c:1380
DECLSPEC void SDLCALL GPU_EnableCamera(GPU_Target *target, GPU_bool use_camera)
Definition: SDL_gpu.c:943
DECLSPEC GPU_Target *SDLCALL GPU_CreateAliasTarget(GPU_Target *target)
Definition: SDL_gpu.c:493
DECLSPEC void SDLCALL GPU_SetDepthWrite(GPU_Target *target, GPU_bool enable)
Definition: SDL_gpu.c:567
DECLSPEC void SDLCALL GPU_SetVirtualResolution(GPU_Target *target, Uint16 w, Uint16 h)
Definition: SDL_gpu.c:602
DECLSPEC void SDLCALL GPU_SetTargetRGB(GPU_Target *target, Uint8 r, Uint8 g, Uint8 b)
Definition: SDL_gpu.c:1754
DECLSPEC void SDLCALL GPU_SetTargetRGBA(GPU_Target *target, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Definition: SDL_gpu.c:1769
GPU_ComparisonEnum
Definition: SDL_gpu.h:183
DECLSPEC GPU_Target *SDLCALL GPU_LoadTarget(GPU_Image *image)
Definition: SDL_gpu.c:1369
DECLSPEC void SDLCALL GPU_UnsetTargetColor(GPU_Target *target)
Definition: SDL_gpu.c:1784
Definition: SDL_gpu.h:687
Definition: SDL_gpu.h:710
Definition: SDL_gpu.h:700
Definition: SDL_gpu.h:227
Definition: SDL_gpu.h:380
Definition: SDL_gpu.h:427
int stored_window_w
Definition: SDL_gpu.h:451
GPU_Target * active_target
Definition: SDL_gpu.h:432
int drawable_w
Definition: SDL_gpu.h:447
Uint32 windowID
Definition: SDL_gpu.h:440
Uint32 default_textured_vertex_shader_id
Definition: SDL_gpu.h:455
Uint32 current_shader_program
Definition: SDL_gpu.h:463
int window_w
Definition: SDL_gpu.h:443
void * context
Definition: SDL_gpu.h:429
Definition: SDL_gpu.h:743
Definition: SDL_gpu.h:334
Definition: SDL_gpu.h:417
Definition: SDL_gpu.h:138
Definition: SDL_gpu.h:168
Definition: SDL_gpu_RendererImpl.h:17
Uint32(SDLCALL *CreateShaderProgram)(GPU_Renderer *renderer)
SDL_Color(SDLCALL *GetPixel)(GPU_Renderer *renderer
Definition: SDL_gpu.h:782
GPU_bool coordinate_mode
Definition: SDL_gpu.h:804
float default_image_anchor_x
Definition: SDL_gpu.h:798
GPU_Target * current_context_target
Definition: SDL_gpu.h:795
GPU_RendererID id
Definition: SDL_gpu.h:784
Definition: SDL_gpu.h:397
Definition: SDL_gpu.h:493
int matrix_mode
Definition: SDL_gpu.h:506
GPU_Context * context
Definition: SDL_gpu.h:522