#include "SDL_gpu_GL_matrix.h"
#include "SDL_platform.h"
#include "stb_image.h"
#include "stb_image_write.h"
#include <math.h>
#include <string.h>
#include <strings.h>
Go to the source code of this file.
Functions | |
void | GPU_AddWindowMapping (GPU_Target *target) |
void | GPU_RemoveWindowMapping (Uint32 windowID) |
void | GPU_RemoveWindowMappingByTarget (GPU_Target *target) |
static SDL_PixelFormat * | AllocFormat (GLenum glFormat) |
static void | FreeFormat (SDL_PixelFormat *format) |
static Uint8 | isExtensionSupported (const char *extension_str) |
static void | init_features (GPU_Renderer *renderer) |
static void | extBindFramebuffer (GPU_Renderer *renderer, GLuint handle) |
static_inline Uint8 | isPowerOfTwo (unsigned int x) |
static_inline unsigned int | getNearestPowerOf2 (unsigned int n) |
static void | bindTexture (GPU_Renderer *renderer, GPU_Image *image) |
static_inline void | flushAndBindTexture (GPU_Renderer *renderer, GLuint handle) |
static Uint8 | bindFramebuffer (GPU_Renderer *renderer, GPU_Target *target) |
static_inline void | flushAndBindFramebuffer (GPU_Renderer *renderer, GLuint handle) |
static_inline void | flushBlitBufferIfCurrentTexture (GPU_Renderer *renderer, GPU_Image *image) |
static_inline void | flushAndClearBlitBufferIfCurrentTexture (GPU_Renderer *renderer, GPU_Image *image) |
static_inline Uint8 | isCurrentTarget (GPU_Renderer *renderer, GPU_Target *target) |
static_inline void | flushAndClearBlitBufferIfCurrentFramebuffer (GPU_Renderer *renderer, GPU_Target *target) |
static Uint8 | growBlitBuffer (GPU_CONTEXT_DATA *cdata, unsigned int minimum_vertices_needed) |
static Uint8 | growIndexBuffer (GPU_CONTEXT_DATA *cdata, unsigned int minimum_vertices_needed) |
static void | makeContextCurrent (GPU_Renderer *renderer, GPU_Target *target) |
static void | setClipRect (GPU_Renderer *renderer, GPU_Target *target) |
static void | unsetClipRect (GPU_Renderer *renderer, GPU_Target *target) |
static void | prepareToRenderToTarget (GPU_Renderer *renderer, GPU_Target *target) |
static void | changeColor (GPU_Renderer *renderer, SDL_Color color) |
static void | changeBlending (GPU_Renderer *renderer, Uint8 enable) |
static void | changeBlendMode (GPU_Renderer *renderer, GPU_BlendMode mode) |
static Uint32 | get_proper_program_id (GPU_Renderer *renderer, Uint32 program_object) |
static void | applyTexturing (GPU_Renderer *renderer) |
static void | changeTexturing (GPU_Renderer *renderer, Uint8 enable) |
static void | enableTexturing (GPU_Renderer *renderer) |
static void | disableTexturing (GPU_Renderer *renderer) |
static void | prepareToRenderImage (GPU_Renderer *renderer, GPU_Target *target, GPU_Image *image) |
static void | prepareToRenderShapes (GPU_Renderer *renderer, unsigned int shape) |
static void | changeViewport (GPU_Target *target) |
static void | applyTargetCamera (GPU_Target *target) |
static Uint8 | equal_cameras (GPU_Camera a, GPU_Camera b) |
static void | changeCamera (GPU_Target *target) |
static GPU_Target * | Init (GPU_Renderer *renderer, GPU_RendererID renderer_request, Uint16 w, Uint16 h, GPU_WindowFlagEnum SDL_flags) |
static Uint8 | IsFeatureEnabled (GPU_Renderer *renderer, GPU_FeatureEnum feature) |
static GPU_Target * | CreateTargetFromWindow (GPU_Renderer *renderer, Uint32 windowID, GPU_Target *target) |
static GPU_Target * | CreateAliasTarget (GPU_Renderer *renderer, GPU_Target *target) |
static void | MakeCurrent (GPU_Renderer *renderer, GPU_Target *target, Uint32 windowID) |
static void | SetAsCurrent (GPU_Renderer *renderer) |
static Uint8 | SetWindowResolution (GPU_Renderer *renderer, Uint16 w, Uint16 h) |
static void | SetVirtualResolution (GPU_Renderer *renderer, GPU_Target *target, Uint16 w, Uint16 h) |
static void | UnsetVirtualResolution (GPU_Renderer *renderer, GPU_Target *target) |
static void | Quit (GPU_Renderer *renderer) |
static Uint8 | ToggleFullscreen (GPU_Renderer *renderer, Uint8 use_desktop_resolution) |
static GPU_Camera | SetCamera (GPU_Renderer *renderer, GPU_Target *target, GPU_Camera *cam) |
static GPU_Image * | CreateUninitializedImage (GPU_Renderer *renderer, Uint16 w, Uint16 h, GPU_FormatEnum format) |
static GPU_Image * | CreateImage (GPU_Renderer *renderer, Uint16 w, Uint16 h, GPU_FormatEnum format) |
static GPU_Image * | LoadImage (GPU_Renderer *renderer, const char *filename) |
static GPU_Image * | CreateAliasImage (GPU_Renderer *renderer, GPU_Image *image) |
static Uint8 | readTargetPixels (GPU_Renderer *renderer, GPU_Target *source, GLint format, GLubyte *pixels) |
static Uint8 | readImagePixels (GPU_Renderer *renderer, GPU_Image *source, GLint format, GLubyte *pixels) |
static unsigned char * | getRawTargetData (GPU_Renderer *renderer, GPU_Target *target) |
static unsigned char * | getRawImageData (GPU_Renderer *renderer, GPU_Image *image) |
static const char * | get_filename_ext (const char *filename) |
static Uint8 | SaveImage (GPU_Renderer *renderer, GPU_Image *image, const char *filename) |
static SDL_Surface * | CopySurfaceFromTarget (GPU_Renderer *renderer, GPU_Target *target) |
static SDL_Surface * | CopySurfaceFromImage (GPU_Renderer *renderer, GPU_Image *image) |
static int | compareFormats (GPU_Renderer *renderer, GLenum glFormat, SDL_Surface *surface, GLenum *surfaceFormatResult) |
static Uint8 | hasColorkey (SDL_Surface *surface) |
static SDL_Surface * | copySurfaceIfNeeded (GPU_Renderer *renderer, GLenum glFormat, SDL_Surface *surface, GLenum *surfaceFormatResult) |
static GPU_Image * | CopyImage (GPU_Renderer *renderer, GPU_Image *image) |
static void | UpdateImage (GPU_Renderer *renderer, GPU_Image *image, SDL_Surface *surface, const GPU_Rect *surface_rect) |
static void | UpdateSubImage (GPU_Renderer *renderer, GPU_Image *image, const GPU_Rect *image_rect, SDL_Surface *surface, const GPU_Rect *surface_rect) |
static void | UpdateImageBytes (GPU_Renderer *renderer, GPU_Image *image, const GPU_Rect *image_rect, const unsigned char *bytes, int bytes_per_row) |
static_inline Uint32 | getPixel (SDL_Surface *Surface, int x, int y) |
static GPU_Image * | CopyImageFromSurface (GPU_Renderer *renderer, SDL_Surface *surface) |
static GPU_Image * | CopyImageFromTarget (GPU_Renderer *renderer, GPU_Target *target) |
static void | FreeImage (GPU_Renderer *renderer, GPU_Image *image) |
static GPU_Target * | LoadTarget (GPU_Renderer *renderer, GPU_Image *image) |
static void | FreeTarget (GPU_Renderer *renderer, GPU_Target *target) |
static void | Blit (GPU_Renderer *renderer, GPU_Image *image, GPU_Rect *src_rect, GPU_Target *target, float x, float y) |
static void | BlitRotate (GPU_Renderer *renderer, GPU_Image *image, GPU_Rect *src_rect, GPU_Target *target, float x, float y, float degrees) |
static void | BlitScale (GPU_Renderer *renderer, GPU_Image *image, GPU_Rect *src_rect, GPU_Target *target, float x, float y, float scaleX, float scaleY) |
static 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) |
static 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) |
static void | BlitTransformMatrix (GPU_Renderer *renderer, GPU_Image *image, GPU_Rect *src_rect, GPU_Target *target, float x, float y, float *matrix3x3) |
static int | get_lowest_attribute_num_values (GPU_CONTEXT_DATA *cdata, int cap) |
static void | BlitBatch (GPU_Renderer *renderer, GPU_Image *image, GPU_Target *target, unsigned int num_sprites, float *values, GPU_BlitFlagEnum flags) |
static 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) |
static void | GenerateMipmaps (GPU_Renderer *renderer, GPU_Image *image) |
static GPU_Rect | SetClip (GPU_Renderer *renderer, GPU_Target *target, Sint16 x, Sint16 y, Uint16 w, Uint16 h) |
static void | UnsetClip (GPU_Renderer *renderer, GPU_Target *target) |
static SDL_Color | GetPixel (GPU_Renderer *renderer, GPU_Target *target, Sint16 x, Sint16 y) |
static void | SetImageFilter (GPU_Renderer *renderer, GPU_Image *image, GPU_FilterEnum filter) |
static void | SetWrapMode (GPU_Renderer *renderer, GPU_Image *image, GPU_WrapEnum wrap_mode_x, GPU_WrapEnum wrap_mode_y) |
static void | Clear (GPU_Renderer *renderer, GPU_Target *target) |
static void | ClearRGBA (GPU_Renderer *renderer, GPU_Target *target, Uint8 r, Uint8 g, Uint8 b, Uint8 a) |
static void | DoPartialFlush (GPU_CONTEXT_DATA *cdata, unsigned short num_vertices, float *blit_buffer, unsigned int num_indices, unsigned short *index_buffer) |
static void | DoUntexturedFlush (GPU_CONTEXT_DATA *cdata, unsigned short num_vertices, float *blit_buffer, unsigned int num_indices, unsigned short *index_buffer) |
static void | FlushBlitBuffer (GPU_Renderer *renderer) |
static void | Flip (GPU_Renderer *renderer, GPU_Target *target) |
static Uint32 | GetShaderSourceSize (const char *filename) |
static Uint32 | GetShaderSource (const char *filename, char *result) |
static void | read_until_end_of_comment (SDL_RWops *rwops, char multiline) |
static Uint32 | GetShaderSourceSize_RW (SDL_RWops *shader_source) |
static Uint32 | GetShaderSource_RW (SDL_RWops *shader_source, char *result) |
static Uint32 | compile_shader_source (GPU_ShaderEnum shader_type, const char *shader_source) |
static Uint32 | CompileShader_RW (GPU_Renderer *renderer, GPU_ShaderEnum shader_type, SDL_RWops *shader_source) |
static Uint32 | CompileShader (GPU_Renderer *renderer, GPU_ShaderEnum shader_type, const char *shader_source) |
static Uint32 | LinkShaderProgram (GPU_Renderer *renderer, Uint32 program_object) |
static Uint32 | LinkShaders (GPU_Renderer *renderer, Uint32 shader_object1, Uint32 shader_object2) |
static void | FreeShader (GPU_Renderer *renderer, Uint32 shader_object) |
static void | FreeShaderProgram (GPU_Renderer *renderer, Uint32 program_object) |
static void | AttachShader (GPU_Renderer *renderer, Uint32 program_object, Uint32 shader_object) |
static void | DetachShader (GPU_Renderer *renderer, Uint32 program_object, Uint32 shader_object) |
static Uint8 | IsDefaultShaderProgram (GPU_Renderer *renderer, Uint32 program_object) |
static void | ActivateShaderProgram (GPU_Renderer *renderer, Uint32 program_object, GPU_ShaderBlock *block) |
static void | DeactivateShaderProgram (GPU_Renderer *renderer) |
static const char * | GetShaderMessage (GPU_Renderer *renderer) |
static int | GetAttributeLocation (GPU_Renderer *renderer, Uint32 program_object, const char *attrib_name) |
static int | GetUniformLocation (GPU_Renderer *renderer, Uint32 program_object, const char *uniform_name) |
static 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) |
static void | SetShaderBlock (GPU_Renderer *renderer, GPU_ShaderBlock block) |
static void | SetShaderImage (GPU_Renderer *renderer, GPU_Image *image, int location, int image_unit) |
static void | GetUniformiv (GPU_Renderer *renderer, Uint32 program_object, int location, int *values) |
static void | SetUniformi (GPU_Renderer *renderer, int location, int value) |
static void | SetUniformiv (GPU_Renderer *renderer, int location, int num_elements_per_value, int num_values, int *values) |
static void | GetUniformuiv (GPU_Renderer *renderer, Uint32 program_object, int location, unsigned int *values) |
static void | SetUniformui (GPU_Renderer *renderer, int location, unsigned int value) |
static void | SetUniformuiv (GPU_Renderer *renderer, int location, int num_elements_per_value, int num_values, unsigned int *values) |
static void | GetUniformfv (GPU_Renderer *renderer, Uint32 program_object, int location, float *values) |
static void | SetUniformf (GPU_Renderer *renderer, int location, float value) |
static void | SetUniformfv (GPU_Renderer *renderer, int location, int num_elements_per_value, int num_values, float *values) |
static void | SetUniformMatrixfv (GPU_Renderer *renderer, int location, int num_matrices, int num_rows, int num_columns, Uint8 transpose, float *values) |
static void | SetAttributef (GPU_Renderer *renderer, int location, float value) |
static void | SetAttributei (GPU_Renderer *renderer, int location, int value) |
static void | SetAttributeui (GPU_Renderer *renderer, int location, unsigned int value) |
static void | SetAttributefv (GPU_Renderer *renderer, int location, int num_elements, float *value) |
static void | SetAttributeiv (GPU_Renderer *renderer, int location, int num_elements, int *value) |
static void | SetAttributeuiv (GPU_Renderer *renderer, int location, int num_elements, unsigned int *value) |
static void | SetAttributeSource (GPU_Renderer *renderer, int num_values, GPU_Attribute source) |
Variables | |
static char | shader_message [256] |
#define GET_ALPHA | ( | sdl_color | ) | ((sdl_color).unused) |
Definition at line 91 of file SDL_gpu_GL_common.inl.
Referenced by Blit(), BlitTransformX(), changeColor(), and GetPixel().
#define GPU_BLIT_BUFFER_ABSOLUTE_MAX_VERTICES 60000 |
Definition at line 61 of file SDL_gpu_GL_common.inl.
Referenced by growBlitBuffer().
#define GPU_BLIT_BUFFER_COLOR_OFFSET 4 |
Definition at line 73 of file SDL_gpu_GL_common.inl.
Referenced by Blit(), BlitBatch(), BlitTransformX(), DoPartialFlush(), and DoUntexturedFlush().
#define GPU_BLIT_BUFFER_FLOATS_PER_VERTEX 8 |
Definition at line 67 of file SDL_gpu_GL_common.inl.
Referenced by Blit(), BlitBatch(), BlitTransformX(), DoPartialFlush(), DoUntexturedFlush(), FlushBlitBuffer(), and TriangleBatch().
#define GPU_BLIT_BUFFER_INIT_MAX_NUM_VERTICES (GPU_BLIT_BUFFER_VERTICES_PER_SPRITE*1000) |
Definition at line 57 of file SDL_gpu_GL_common.inl.
Referenced by CreateTargetFromWindow().
#define GPU_BLIT_BUFFER_STRIDE (sizeof(float)*GPU_BLIT_BUFFER_FLOATS_PER_VERTEX) |
Definition at line 70 of file SDL_gpu_GL_common.inl.
Referenced by BlitBatch(), CreateTargetFromWindow(), DoPartialFlush(), DoUntexturedFlush(), growBlitBuffer(), and TriangleBatch().
#define GPU_BLIT_BUFFER_TEX_COORD_OFFSET 2 |
Definition at line 72 of file SDL_gpu_GL_common.inl.
Referenced by Blit(), BlitBatch(), BlitTransformX(), and DoPartialFlush().
#define GPU_BLIT_BUFFER_VERTEX_OFFSET 0 |
Definition at line 71 of file SDL_gpu_GL_common.inl.
Referenced by Blit(), BlitBatch(), BlitTransformX(), DoPartialFlush(), and DoUntexturedFlush().
#define GPU_BLIT_BUFFER_VERTICES_PER_SPRITE 4 |
Definition at line 56 of file SDL_gpu_GL_common.inl.
Referenced by Blit(), and BlitTransformX().
#define GPU_INDEX_BUFFER_ABSOLUTE_MAX_VERTICES 4000000000u |
Definition at line 63 of file SDL_gpu_GL_common.inl.
Referenced by growIndexBuffer().
#define M_PI 3.14159265358979323846 |
Definition at line 84 of file SDL_gpu_GL_common.inl.
Referenced by BlitTransformX(), RectangleRound(), and RectangleRoundFilled().
Definition at line 4537 of file SDL_gpu_GL_common.inl.
Referenced by FlushBlitBuffer().
Definition at line 625 of file SDL_gpu_GL_common.inl.
Definition at line 624 of file SDL_gpu_GL_common.inl.
Referenced by Blit(), and BlitTransformX().
#define MIX_COLORS | ( | color1, | |
color2 | |||
) | {MIX_COLOR_COMPONENT(color1.r, color2.r), MIX_COLOR_COMPONENT(color1.g, color2.g), MIX_COLOR_COMPONENT(color1.b, color2.b), MIX_COLOR_COMPONENT(GET_ALPHA(color1), GET_ALPHA(color2))} |
Definition at line 626 of file SDL_gpu_GL_common.inl.
Referenced by prepareToRenderImage().
#define SDL_GPU_DISABLE_SHADERS |
Definition at line 97 of file SDL_gpu_GL_common.inl.
#define SET_COMMON_FUNCTIONS | ( | renderer | ) |
Definition at line 5591 of file SDL_gpu_GL_common.inl.
Referenced by GPU_CreateRenderer_GLES_1(), GPU_CreateRenderer_GLES_2(), GPU_CreateRenderer_OpenGL_1(), GPU_CreateRenderer_OpenGL_1_BASE(), GPU_CreateRenderer_OpenGL_2(), and GPU_CreateRenderer_OpenGL_3().
#define SET_INDEXED_VERTEX | ( | offset | ) | index_buffer[cdata->index_buffer_num_vertices++] = blit_buffer_starting_index + (offset); |
Definition at line 3069 of file SDL_gpu_GL_common.inl.
Referenced by Arc(), ArcFilled(), Blit(), BlitTransformX(), Circle(), CircleFilled(), Line(), Polygon(), PolygonFilled(), Rectangle(), RectangleFilled(), RectangleRound(), RectangleRoundFilled(), SectorFilled(), and Tri().
Definition at line 3021 of file SDL_gpu_GL_common.inl.
Definition at line 3035 of file SDL_gpu_GL_common.inl.
Referenced by Blit(), and BlitTransformX().
Definition at line 3048 of file SDL_gpu_GL_common.inl.
Referenced by Arc(), ArcFilled(), Circle(), CircleFilled(), Line(), Pixel(), Polygon(), PolygonFilled(), Rectangle(), RectangleFilled(), RectangleRound(), RectangleRoundFilled(), SectorFilled(), Tri(), and TriFilled().
Definition at line 3059 of file SDL_gpu_GL_common.inl.
#define static_inline static inline |
Definition at line 14 of file SDL_gpu_GL_common.inl.
|
static |
Definition at line 5007 of file SDL_gpu_GL_common.inl.
References block(), GPU_ShaderBlock::color_loc, GPU_Target::context, GPU_Renderer::current_context_target, GPU_Context::current_shader_program, GPU_Context::data, GPU_Context::default_textured_shader_program, GPU_Context::default_untextured_shader_program, GPU_Renderer::FlushBlitBuffer, glUseProgram, GPU_CONTEXT_DATA, GPU_ShaderBlock::modelViewProjection_loc, GPU_ShaderBlock::position_loc, and GPU_ShaderBlock::texcoord_loc.
|
static |
Definition at line 2168 of file SDL_gpu_GL_common.inl.
References GL_BGR, GL_BGRA, GL_RGB, GL_RGBA, and mask.
Referenced by CopySurfaceFromImage(), CopySurfaceFromTarget(), and copySurfaceIfNeeded().
|
static |
Definition at line 698 of file SDL_gpu_GL_common.inl.
References GPU_Camera::angle, GPU_Target::camera, GPU_Target::context, GPU_Context::data, GPU_CONTEXT_DATA, GPU_GetContextTarget(), GPU_LoadIdentity(), GPU_MatrixMode(), GPU_MODELVIEW, GPU_Ortho(), GPU_PROJECTION, GPU_Rotate(), GPU_Scale(), GPU_Translate(), GPU_Target::h, GPU_Target::image, GPU_Target::w, GPU_Camera::x, GPU_Camera::y, and GPU_Camera::zoom.
Referenced by changeCamera(), CreateTargetFromWindow(), MakeCurrent(), SetVirtualResolution(), SetWindowResolution(), and UnsetVirtualResolution().
|
static |
Definition at line 578 of file SDL_gpu_GL_common.inl.
References GPU_Target::context, GPU_Renderer::current_context_target, GPU_Context::data, GL_TEXTURE_2D, glDisable(), glEnable(), GPU_CONTEXT_DATA, and GPU_Context::use_texturing.
Referenced by FlushBlitBuffer().
|
static |
Definition at line 4987 of file SDL_gpu_GL_common.inl.
References glAttachShader.
|
static |
Definition at line 288 of file SDL_gpu_GL_common.inl.
References GPU_Target::context, GPU_Renderer::current_context_target, GPU_Context::data, GPU_Target::data, GPU_Renderer::enabled_features, extBindFramebuffer(), GPU_Renderer::FlushBlitBuffer, GPU_CONTEXT_DATA, GPU_FEATURE_RENDER_TARGETS, and GPU_TARGET_DATA.
Referenced by Blit(), BlitBatch(), BlitTransformX(), Clear(), ClearRGBA(), GetPixel(), readTargetPixels(), and TriangleBatch().
|
static |
Definition at line 265 of file SDL_gpu_GL_common.inl.
References GPU_Target::context, GPU_Renderer::current_context_target, GPU_Image::data, GPU_Context::data, GPU_Renderer::FlushBlitBuffer, GL_TEXTURE_2D, glBindTexture(), GPU_CONTEXT_DATA, and GPU_IMAGE_DATA.
Referenced by Blit(), BlitBatch(), BlitTransformX(), CopyImage(), CreateImage(), GenerateMipmaps(), SetImageFilter(), SetWrapMode(), TriangleBatch(), UpdateImageBytes(), and UpdateSubImage().
|
static |
Definition at line 3074 of file SDL_gpu_GL_common.inl.
References bindFramebuffer(), bindTexture(), GPU_Image::color, GPU_Target::color, GPU_Target::context, GPU_Renderer::current_context_target, GPU_Context::data, GPU_Renderer::FlushBlitBuffer, g, GET_ALPHA, GPU_BLIT_BUFFER_COLOR_OFFSET, GPU_BLIT_BUFFER_FLOATS_PER_VERTEX, GPU_BLIT_BUFFER_TEX_COORD_OFFSET, GPU_BLIT_BUFFER_VERTEX_OFFSET, GPU_BLIT_BUFFER_VERTICES_PER_SPRITE, GPU_CONTEXT_DATA, GPU_ERROR_BACKEND_ERROR, GPU_ERROR_NULL_ARGUMENT, GPU_ERROR_USER_ERROR, GPU_PushErrorCode(), GPU_SNAP_DIMENSIONS, GPU_SNAP_POSITION, GPU_SNAP_POSITION_AND_DIMENSIONS, growBlitBuffer(), growIndexBuffer(), GPU_Rect::h, GPU_Image::h, h, makeContextCurrent(), MIX_COLOR_COMPONENT_NORMALIZED_RESULT, prepareToRenderImage(), prepareToRenderToTarget(), GPU_Image::renderer, GPU_Target::renderer, SET_INDEXED_VERTEX, SET_TEXTURED_VERTEX_UNINDEXED, GPU_Image::snap_mode, GPU_Image::texture_h, GPU_Image::texture_w, GPU_Target::use_color, GPU_Rect::w, GPU_Image::w, GPU_Rect::x, and GPU_Rect::y.
Referenced by GPU_Blit().
|
static |
Definition at line 3665 of file SDL_gpu_GL_common.inl.
References bindFramebuffer(), bindTexture(), changeCamera(), changeTexturing(), changeViewport(), GPU_Target::context, GPU_Renderer::current_context_target, GPU_Context::data, GPU_Renderer::FlushBlitBuffer, GL_ARRAY_BUFFER, GL_COLOR_ARRAY, GL_FALSE, GL_FLOAT, GL_QUADS, GL_TEXTURE_COORD_ARRAY, GL_TRIANGLES, GL_UNSIGNED_SHORT, GL_VERTEX_ARRAY, glBegin(), glBindBuffer, glBindVertexArray, glBufferSubData, glColor4f(), glColorPointer(), glDisableClientState(), glDisableVertexAttribArray, glDrawElements(), glEnableClientState(), glEnableVertexAttribArray, glEnd(), glTexCoord2f(), glTexCoordPointer(), glUniformMatrix4fv, glVertex3f(), glVertexAttribPointer, glVertexPointer(), GPU_BLIT_BUFFER_COLOR_OFFSET, GPU_BLIT_BUFFER_FLOATS_PER_VERTEX, GPU_BLIT_BUFFER_STRIDE, GPU_BLIT_BUFFER_TEX_COORD_OFFSET, GPU_BLIT_BUFFER_VERTEX_OFFSET, GPU_CONTEXT_DATA, GPU_ERROR_BACKEND_ERROR, GPU_ERROR_NULL_ARGUMENT, GPU_ERROR_USER_ERROR, GPU_GetModelViewProjection(), GPU_PushErrorCode(), growBlitBuffer(), growIndexBuffer(), i, makeContextCurrent(), prepareToRenderImage(), prepareToRenderToTarget(), GPU_Image::renderer, GPU_Target::renderer, setClipRect(), and unsetClipRect().
Referenced by GPU_BlitBatch(), and GPU_BlitBatchSeparate().
|
static |
Definition at line 3229 of file SDL_gpu_GL_common.inl.
References GPU_Renderer::BlitTransformX, GPU_ERROR_NULL_ARGUMENT, GPU_PushErrorCode(), GPU_Rect::h, GPU_Image::h, h, GPU_Rect::w, and GPU_Image::w.
Referenced by GPU_BlitRotate().
|
static |
Definition at line 3248 of file SDL_gpu_GL_common.inl.
References GPU_Renderer::BlitTransformX, GPU_ERROR_NULL_ARGUMENT, GPU_PushErrorCode(), GPU_Rect::h, GPU_Image::h, h, GPU_Rect::w, and GPU_Image::w.
Referenced by GPU_BlitScale().
|
static |
Definition at line 3267 of file SDL_gpu_GL_common.inl.
References GPU_Renderer::BlitTransformX, GPU_ERROR_NULL_ARGUMENT, GPU_PushErrorCode(), GPU_Rect::h, GPU_Image::h, h, GPU_Rect::w, and GPU_Image::w.
Referenced by GPU_BlitTransform().
|
static |
Definition at line 3501 of file SDL_gpu_GL_common.inl.
References GPU_Renderer::Blit, GPU_Renderer::FlushBlitBuffer, GPU_ERROR_NULL_ARGUMENT, GPU_ERROR_USER_ERROR, GPU_MultMatrix(), GPU_PopMatrix(), GPU_PushErrorCode(), GPU_PushMatrix(), GPU_Translate(), GPU_Image::renderer, and GPU_Target::renderer.
Referenced by GPU_BlitTransformMatrix().
|
static |
Definition at line 3286 of file SDL_gpu_GL_common.inl.
References bindFramebuffer(), bindTexture(), GPU_Image::color, GPU_Target::color, GPU_Target::context, GPU_Renderer::current_context_target, GPU_Context::data, GPU_Renderer::FlushBlitBuffer, g, GET_ALPHA, GPU_BLIT_BUFFER_COLOR_OFFSET, GPU_BLIT_BUFFER_FLOATS_PER_VERTEX, GPU_BLIT_BUFFER_TEX_COORD_OFFSET, GPU_BLIT_BUFFER_VERTEX_OFFSET, GPU_BLIT_BUFFER_VERTICES_PER_SPRITE, GPU_CONTEXT_DATA, GPU_ERROR_BACKEND_ERROR, GPU_ERROR_NULL_ARGUMENT, GPU_ERROR_USER_ERROR, GPU_PushErrorCode(), GPU_SNAP_DIMENSIONS, GPU_SNAP_POSITION, GPU_SNAP_POSITION_AND_DIMENSIONS, growBlitBuffer(), growIndexBuffer(), GPU_Rect::h, GPU_Image::h, h, M_PI, makeContextCurrent(), MIX_COLOR_COMPONENT_NORMALIZED_RESULT, prepareToRenderImage(), prepareToRenderToTarget(), GPU_Image::renderer, GPU_Target::renderer, SET_INDEXED_VERTEX, SET_TEXTURED_VERTEX_UNINDEXED, GPU_Image::snap_mode, GPU_Image::texture_h, GPU_Image::texture_w, GPU_Target::use_color, GPU_Rect::w, GPU_Image::w, GPU_Rect::x, and GPU_Rect::y.
Referenced by GPU_BlitTransformX().
|
static |
Definition at line 501 of file SDL_gpu_GL_common.inl.
References GPU_Target::context, GPU_Renderer::current_context_target, GPU_Context::data, GPU_Renderer::FlushBlitBuffer, GL_BLEND, glDisable(), glEnable(), and GPU_CONTEXT_DATA.
Referenced by prepareToRenderImage(), and prepareToRenderShapes().
|
static |
Definition at line 517 of file SDL_gpu_GL_common.inl.
References GPU_BlendMode::alpha_equation, GPU_BlendMode::color_equation, GPU_Target::context, GPU_Renderer::current_context_target, GPU_Context::data, GPU_BlendMode::dest_alpha, GPU_BlendMode::dest_color, GPU_Renderer::enabled_features, GPU_Renderer::FlushBlitBuffer, glBlendEquation, glBlendEquationSeparate, glBlendFunc(), glBlendFuncSeparate, GPU_CONTEXT_DATA, GPU_ERROR_BACKEND_ERROR, GPU_FEATURE_BLEND_EQUATIONS, GPU_FEATURE_BLEND_EQUATIONS_SEPARATE, GPU_FEATURE_BLEND_FUNC_SEPARATE, GPU_PushErrorCode(), GPU_BlendMode::source_alpha, and GPU_BlendMode::source_color.
Referenced by prepareToRenderImage(), and prepareToRenderShapes().
|
static |
Definition at line 736 of file SDL_gpu_GL_common.inl.
References applyTargetCamera().
Referenced by BlitBatch(), FlushBlitBuffer(), and TriangleBatch().
|
static |
Definition at line 483 of file SDL_gpu_GL_common.inl.
References GPU_Target::context, GPU_Renderer::current_context_target, GPU_Context::data, GPU_Renderer::FlushBlitBuffer, GET_ALPHA, glColor4f(), and GPU_CONTEXT_DATA.
Referenced by prepareToRenderImage().
|
static |
Definition at line 591 of file SDL_gpu_GL_common.inl.
References GPU_Target::context, GPU_Renderer::current_context_target, GPU_Context::data, GPU_Renderer::FlushBlitBuffer, GL_TEXTURE_2D, glDisable(), glEnable(), and GPU_CONTEXT_DATA.
Referenced by BlitBatch(), CopyImage(), CreateImage(), TriangleBatch(), UpdateImageBytes(), and UpdateSubImage().
|
static |
Definition at line 678 of file SDL_gpu_GL_common.inl.
References GPU_Target::context, GPU_Context::data, glViewport(), GPU_CONTEXT_DATA, GPU_GetContextTarget(), GPU_Rect::h, GPU_Image::h, GPU_Target::image, GPU_Target::viewport, GPU_Rect::w, GPU_Context::window_h, GPU_Rect::x, and GPU_Rect::y.
Referenced by BlitBatch(), FlushBlitBuffer(), SetWindowResolution(), and TriangleBatch().
|
static |
Definition at line 4320 of file SDL_gpu_GL_common.inl.
References bindFramebuffer(), GPU_Renderer::FlushBlitBuffer, GL_COLOR_BUFFER_BIT, glClear(), glClearColor(), isCurrentTarget(), makeContextCurrent(), GPU_Target::renderer, setClipRect(), and unsetClipRect().
|
static |
Definition at line 4343 of file SDL_gpu_GL_common.inl.
References bindFramebuffer(), GPU_Renderer::FlushBlitBuffer, GL_COLOR_BUFFER_BIT, glClear(), glClearColor(), isCurrentTarget(), makeContextCurrent(), GPU_Target::renderer, setClipRect(), and unsetClipRect().
|
static |
Definition at line 2089 of file SDL_gpu_GL_common.inl.
References GPU_Renderer::enabled_features, GL_BGR, GL_BGRA, GL_RGB, GL_RGBA, GPU_ERROR_DATA_ERROR, GPU_FEATURE_GL_ABGR, GPU_FEATURE_GL_BGR, GPU_FEATURE_GL_BGRA, and GPU_PushErrorCode().
Referenced by copySurfaceIfNeeded().
|
static |
Definition at line 4850 of file SDL_gpu_GL_common.inl.
References compiled, GL_COMPILE_STATUS, GL_FRAGMENT_SHADER, GL_GEOMETRY_SHADER, GL_VERTEX_SHADER, glCompileShader, glCreateShader, glDeleteShader, glGetShaderInfoLog, glGetShaderiv, glShaderSource, GPU_ERROR_BACKEND_ERROR, GPU_ERROR_DATA_ERROR, GPU_FRAGMENT_SHADER, GPU_GEOMETRY_SHADER, GPU_PushErrorCode(), and GPU_VERTEX_SHADER.
Referenced by CompileShader_RW().
|
static |
Definition at line 4927 of file SDL_gpu_GL_common.inl.
References GPU_Renderer::CompileShader_RW.
|
static |
Definition at line 4905 of file SDL_gpu_GL_common.inl.
References compile_shader_source(), GetShaderSource_RW(), GetShaderSourceSize_RW(), GPU_ERROR_DATA_ERROR, and GPU_PushErrorCode().
|
static |
Definition at line 2382 of file SDL_gpu_GL_common.inl.
References bindTexture(), GPU_Image::blend_mode, GPU_Renderer::Blit, changeTexturing(), GPU_Image::color, GPU_Renderer::CreateImage, CreateUninitializedImage(), GPU_Image::data, GPU_Renderer::enabled_features, GPU_Image::filter_mode, GPU_Image::format, getNearestPowerOf2(), getRawImageData(), GL_TEXTURE_2D, GL_UNPACK_ALIGNMENT, GL_UNPACK_ROW_LENGTH, GL_UNSIGNED_BYTE, glPixelStorei(), glTexImage2D(), GPU_ERROR_BACKEND_ERROR, GPU_FEATURE_NON_POWER_OF_TWO, GPU_FILTER_NEAREST, GPU_FORMAT_ALPHA, GPU_FORMAT_LUMINANCE, GPU_FORMAT_LUMINANCE_ALPHA, GPU_FORMAT_RG, GPU_FORMAT_RGB, GPU_FORMAT_RGBA, GPU_FreeImage(), GPU_GenerateMipmaps(), GPU_IMAGE_DATA, GPU_LoadTarget(), GPU_PushErrorCode(), GPU_SetBlending(), GPU_SetColor(), GPU_SetImageFilter(), GPU_SetSnapMode(), GPU_SetWrapMode(), GPU_Image::h, h, GPU_Image::has_mipmaps, isPowerOfTwo(), GPU_Target::refcount, GPU_Image::snap_mode, GPU_Image::texture_h, GPU_Image::texture_w, GPU_Image::use_blending, GPU_Image::w, GPU_Image::wrap_mode_x, and GPU_Image::wrap_mode_y.
|
static |
Definition at line 2764 of file SDL_gpu_GL_common.inl.
References GPU_Renderer::CreateImage, GPU_ERROR_NULL_ARGUMENT, GPU_FORMAT_RGB, GPU_FORMAT_RGBA, GPU_PushErrorCode(), hasColorkey(), and GPU_Renderer::UpdateImage.
|
static |
Definition at line 2796 of file SDL_gpu_GL_common.inl.
References GPU_Renderer::CopyImageFromSurface, and GPU_Renderer::CopySurfaceFromTarget.
|
static |
Definition at line 1969 of file SDL_gpu_GL_common.inl.
References AllocFormat(), GPU_Image::data, FreeFormat(), getRawImageData(), GPU_ERROR_BACKEND_ERROR, GPU_ERROR_DATA_ERROR, GPU_ERROR_NULL_ARGUMENT, GPU_IMAGE_DATA, GPU_PushErrorCode(), GPU_Image::h, and GPU_Image::w.
|
static |
Definition at line 1936 of file SDL_gpu_GL_common.inl.
References AllocFormat(), GPU_Target::data, FreeFormat(), getRawTargetData(), GPU_ERROR_BACKEND_ERROR, GPU_ERROR_DATA_ERROR, GPU_ERROR_NULL_ARGUMENT, GPU_PushErrorCode(), GPU_TARGET_DATA, GPU_Target::h, and GPU_Target::w.
|
static |
Definition at line 2286 of file SDL_gpu_GL_common.inl.
References AllocFormat(), compareFormats(), and FreeFormat().
Referenced by UpdateSubImage().
|
static |
Definition at line 1759 of file SDL_gpu_GL_common.inl.
References GPU_Image::data, GPU_IMAGE_DATA, GPU_Image::is_alias, and GPU_Image::refcount.
|
static |
Definition at line 1263 of file SDL_gpu_GL_common.inl.
References GPU_Target::data, GPU_TARGET_DATA, GPU_Target::image, GPU_Target::is_alias, GPU_Image::refcount, and GPU_Target::refcount.
|
static |
Definition at line 1678 of file SDL_gpu_GL_common.inl.
References bindTexture(), GPU_Image::bytes_per_pixel, changeTexturing(), CreateUninitializedImage(), GPU_Image::data, GPU_Renderer::enabled_features, getNearestPowerOf2(), GL_TEXTURE_2D, GL_UNPACK_ALIGNMENT, GL_UNPACK_ROW_LENGTH, GL_UNSIGNED_BYTE, glPixelStorei(), glTexImage2D(), GPU_ERROR_BACKEND_ERROR, GPU_ERROR_DATA_ERROR, GPU_FEATURE_NON_POWER_OF_TWO, GPU_IMAGE_DATA, GPU_PushErrorCode(), GPU_Image::h, h, isPowerOfTwo(), GPU_Image::texture_h, GPU_Image::texture_w, and GPU_Image::w.
|
static |
Definition at line 890 of file SDL_gpu_GL_common.inl.
References applyTargetCamera(), GPU_Target::camera, GPU_Target::clip_rect, GPU_Renderer::CompileShader, GPU_Context::context, GPU_Target::context, GPU_Renderer::current_context_target, GPU_Context::current_shader_program, GPU_Context::data, GPU_Target::data, GPU_Context::default_textured_shader_program, GPU_Context::default_untextured_shader_program, lg::err(), GPU_Context::failed, GL_ARRAY_BUFFER, GL_BLEND, GL_COLOR_BUFFER_BIT, GL_FRAMEBUFFER_BINDING, GL_ONE_MINUS_SRC_ALPHA, GL_RGBA, GL_SRC_ALPHA, GL_STREAM_DRAW, GL_TEXTURE_2D, GL_TRIANGLES, GL_VERSION, glBindBuffer, glBindVertexArray, glBlendFunc(), glBufferData, glClear(), glClearColor(), glColor4f(), glDisable(), glEnable(), GLEW_OK, glewInit(), glGenBuffers, glGenVertexArrays, glGetIntegerv(), glGetString(), glUseProgram, glViewport(), GPU_AddWindowMapping(), GPU_BLEND_NORMAL, GPU_BLIT_BUFFER_INIT_MAX_NUM_VERTICES, GPU_BLIT_BUFFER_STRIDE, GPU_CONTEXT_DATA, GPU_DEFAULT_TEXTURED_FRAGMENT_SHADER_SOURCE, GPU_DEFAULT_TEXTURED_VERTEX_SHADER_SOURCE, GPU_DEFAULT_UNTEXTURED_FRAGMENT_SHADER_SOURCE, GPU_DEFAULT_UNTEXTURED_VERTEX_SHADER_SOURCE, GPU_ERROR_BACKEND_ERROR, GPU_FEATURE_MASK, GPU_FRAGMENT_SHADER, GPU_GetBlendModeFromPreset(), GPU_GetDefaultCamera(), GPU_INIT_DISABLE_VSYNC, GPU_INIT_ENABLE_VSYNC, GPU_Renderer::GPU_init_flags, GPU_LoadShaderBlock(), GPU_MakeRect(), GPU_MatrixIdentity(), GPU_MODELVIEW, GPU_PushErrorCode(), GPU_RemoveWindowMapping(), GPU_SetShaderBlock(), GPU_TARGET_DATA, GPU_VERTEX_SHADER, GPU_Rect::h, GPU_Target::h, GPU_Renderer::id, GPU_Target::image, init_features(), GPU_Target::is_alias, GPU_Renderer::IsFeatureEnabled, GPU_Context::line_thickness, GPU_Renderer::LinkShaders, GPU_RendererID::major_version, GPU_Renderer::MakeCurrent, GPU_MatrixStack::matrix, GPU_Context::matrix_mode, GPU_RendererID::minor_version, GPU_Context::modelview_matrix, GPU_Context::projection_matrix, GPU_Target::refcount, GPU_Target::renderer, GPU_Renderer::requested_id, resources::screen, SDL_GPU_GL_MAJOR_VERSION, SDL_GPU_GLES_MAJOR_VERSION, GPU_Renderer::SetLineThickness, GPU_Context::shapes_blend_mode, GPU_Context::shapes_use_blending, GPU_MatrixStack::size, GPU_Context::stored_window_h, GPU_Context::stored_window_w, GPU_Target::use_clip_rect, GPU_Target::use_color, GPU_Context::use_texturing, GPU_Target::viewport, GPU_Rect::w, GPU_Target::w, GPU_Context::window_h, GPU_Context::window_w, GPU_Context::windowID, GPU_Rect::x, and GPU_Rect::y.
|
static |
Definition at line 1561 of file SDL_gpu_GL_common.inl.
References GPU_Image::blend_mode, GPU_Image::bytes_per_pixel, GPU_Image::color, GPU_Image::data, GPU_Image::filter_mode, flushAndBindTexture(), GPU_Image::format, GL_ALPHA, GL_CLAMP_TO_EDGE, GL_GENERATE_MIPMAP, GL_LINEAR, GL_LUMINANCE, GL_LUMINANCE_ALPHA, GL_MODULATE, GL_RG, GL_RGB, GL_RGBA, GL_TEXTURE_2D, GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_TEXTURE_MAG_FILTER, GL_TEXTURE_MIN_FILTER, GL_TEXTURE_WRAP_S, GL_TEXTURE_WRAP_T, GL_TRUE, glGenTextures(), glTexEnvf(), glTexParameteri(), GPU_BLEND_NORMAL, GPU_ERROR_BACKEND_ERROR, GPU_ERROR_DATA_ERROR, GPU_FILTER_LINEAR, GPU_FORMAT_ALPHA, GPU_FORMAT_LUMINANCE, GPU_FORMAT_LUMINANCE_ALPHA, GPU_FORMAT_RG, GPU_FORMAT_RGB, GPU_FORMAT_RGBA, GPU_FORMAT_YCbCr420P, GPU_FORMAT_YCbCr422, GPU_GetBlendModeFromPreset(), GPU_IMAGE_DATA, GPU_PushErrorCode(), GPU_SNAP_POSITION_AND_DIMENSIONS, GPU_WRAP_NONE, GPU_Image::h, h, GPU_Image::has_mipmaps, GPU_Image::is_alias, GPU_Image::num_layers, GPU_Image::refcount, GPU_Image::renderer, GPU_Image::snap_mode, GPU_Image::target, GPU_Image::texture_h, GPU_Image::texture_w, GPU_Image::use_blending, GPU_Image::w, GPU_Image::wrap_mode_x, and GPU_Image::wrap_mode_y.
Referenced by CopyImage(), and CreateImage().
|
static |
Definition at line 5054 of file SDL_gpu_GL_common.inl.
References GPU_Renderer::ActivateShaderProgram.
|
static |
Definition at line 4994 of file SDL_gpu_GL_common.inl.
References glDetachShader.
|
static |
Definition at line 615 of file SDL_gpu_GL_common.inl.
References GPU_Target::context, GPU_Renderer::current_context_target, GPU_Renderer::FlushBlitBuffer, and GPU_Context::use_texturing.
Referenced by prepareToRenderShapes().
|
static |
Definition at line 4365 of file SDL_gpu_GL_common.inl.
References GL_ARRAY_BUFFER, GL_FALSE, GL_FLOAT, GL_TEXTURE_COORD_ARRAY, GL_UNSIGNED_SHORT, GL_VERTEX_ARRAY, glBegin(), glBindBuffer, glBindVertexArray, glBufferSubData, glDisableClientState(), glDisableVertexAttribArray, glDrawElements(), glEnableClientState(), glEnableVertexAttribArray, glEnd(), glTexCoord2f(), glTexCoordPointer(), glUniformMatrix4fv, glVertex3f(), glVertexAttribPointer, glVertexPointer(), GPU_BLIT_BUFFER_COLOR_OFFSET, GPU_BLIT_BUFFER_FLOATS_PER_VERTEX, GPU_BLIT_BUFFER_STRIDE, GPU_BLIT_BUFFER_TEX_COORD_OFFSET, GPU_BLIT_BUFFER_VERTEX_OFFSET, GPU_GetModelViewProjection(), and i.
Referenced by FlushBlitBuffer().
|
static |
Definition at line 4454 of file SDL_gpu_GL_common.inl.
References GL_ARRAY_BUFFER, GL_COLOR_ARRAY, GL_FALSE, GL_FLOAT, GL_UNSIGNED_SHORT, GL_VERTEX_ARRAY, glBegin(), glBindBuffer, glBindVertexArray, glBufferSubData, glColor4f(), glColorPointer(), glDisableClientState(), glDisableVertexAttribArray, glDrawElements(), glEnableClientState(), glEnableVertexAttribArray, glEnd(), glUniformMatrix4fv, glVertex3f(), glVertexAttribPointer, glVertexPointer(), GPU_BLIT_BUFFER_COLOR_OFFSET, GPU_BLIT_BUFFER_FLOATS_PER_VERTEX, GPU_BLIT_BUFFER_STRIDE, GPU_BLIT_BUFFER_VERTEX_OFFSET, GPU_GetModelViewProjection(), and i.
Referenced by FlushBlitBuffer().
|
static |
Definition at line 606 of file SDL_gpu_GL_common.inl.
References GPU_Target::context, GPU_Renderer::current_context_target, GPU_Renderer::FlushBlitBuffer, and GPU_Context::use_texturing.
Referenced by prepareToRenderImage().
|
static |
Definition at line 731 of file SDL_gpu_GL_common.inl.
References GPU_Camera::angle, GPU_Camera::x, GPU_Camera::y, GPU_Camera::z, and GPU_Camera::zoom.
Referenced by SetCamera().
|
static |
Definition at line 243 of file SDL_gpu_GL_common.inl.
References GPU_Renderer::enabled_features, GL_FRAMEBUFFER, glBindFramebuffer, and GPU_FEATURE_RENDER_TARGETS.
Referenced by bindFramebuffer(), and flushAndBindFramebuffer().
|
static |
Definition at line 4596 of file SDL_gpu_GL_common.inl.
References GPU_Target::context, GPU_Renderer::current_context_target, GPU_Renderer::FlushBlitBuffer, makeContextCurrent(), and GPU_Context::windowID.
static_inline void flushAndBindFramebuffer | ( | GPU_Renderer * | renderer, |
GLuint | handle | ||
) |
Definition at line 318 of file SDL_gpu_GL_common.inl.
References GPU_Target::context, GPU_Renderer::current_context_target, GPU_Context::data, extBindFramebuffer(), GPU_Renderer::FlushBlitBuffer, and GPU_CONTEXT_DATA.
Referenced by LoadTarget().
static_inline void flushAndBindTexture | ( | GPU_Renderer * | renderer, |
GLuint | handle | ||
) |
Definition at line 278 of file SDL_gpu_GL_common.inl.
References GPU_Target::context, GPU_Renderer::current_context_target, GPU_Context::data, GPU_Renderer::FlushBlitBuffer, GL_TEXTURE_2D, glBindTexture(), and GPU_CONTEXT_DATA.
Referenced by CreateUninitializedImage().
static_inline void flushAndClearBlitBufferIfCurrentFramebuffer | ( | GPU_Renderer * | renderer, |
GPU_Target * | target | ||
) |
Definition at line 350 of file SDL_gpu_GL_common.inl.
References GPU_Target::context, GPU_Renderer::current_context_target, GPU_Context::data, GPU_Renderer::FlushBlitBuffer, and GPU_CONTEXT_DATA.
Referenced by FreeTarget().
static_inline void flushAndClearBlitBufferIfCurrentTexture | ( | GPU_Renderer * | renderer, |
GPU_Image * | image | ||
) |
Definition at line 335 of file SDL_gpu_GL_common.inl.
References GPU_Target::context, GPU_Renderer::current_context_target, GPU_Context::data, GPU_Renderer::FlushBlitBuffer, and GPU_CONTEXT_DATA.
Referenced by FreeImage().
|
static |
Definition at line 4539 of file SDL_gpu_GL_common.inl.
References applyTexturing(), changeCamera(), changeViewport(), GPU_Target::context, GPU_Renderer::current_context_target, GPU_Context::data, DoPartialFlush(), DoUntexturedFlush(), get_lowest_attribute_num_values(), GPU_BLIT_BUFFER_FLOATS_PER_VERTEX, GPU_CONTEXT_DATA, MAX, setClipRect(), and unsetClipRect().
static_inline void flushBlitBufferIfCurrentTexture | ( | GPU_Renderer * | renderer, |
GPU_Image * | image | ||
) |
Definition at line 327 of file SDL_gpu_GL_common.inl.
References GPU_Target::context, GPU_Renderer::current_context_target, GPU_Context::data, GPU_Renderer::FlushBlitBuffer, and GPU_CONTEXT_DATA.
Referenced by SetImageFilter(), and SetWrapMode().
|
static |
Definition at line 2280 of file SDL_gpu_GL_common.inl.
Referenced by CopySurfaceFromImage(), CopySurfaceFromTarget(), and copySurfaceIfNeeded().
|
static |
Definition at line 2812 of file SDL_gpu_GL_common.inl.
References GPU_Image::data, flushAndClearBlitBufferIfCurrentTexture(), GPU_Renderer::FreeTarget, glDeleteTextures(), GPU_IMAGE_DATA, GPU_Image::refcount, and GPU_Image::target.
|
static |
Definition at line 4973 of file SDL_gpu_GL_common.inl.
References glDeleteShader.
|
static |
Definition at line 4980 of file SDL_gpu_GL_common.inl.
References glDeleteProgram.
|
static |
Definition at line 2915 of file SDL_gpu_GL_common.inl.
References GPU_Context::context, GPU_Target::context, GPU_Renderer::current_context_target, GPU_Context::data, GPU_Target::data, GPU_Renderer::enabled_features, GPU_Context::failed, flushAndClearBlitBufferIfCurrentFramebuffer(), GPU_Renderer::FlushBlitBuffer, glDeleteBuffers, glDeleteFramebuffers, glDeleteVertexArrays, GPU_CONTEXT_DATA, GPU_FEATURE_RENDER_TARGETS, GPU_RemoveWindowMappingByTarget(), GPU_TARGET_DATA, GPU_Target::image, GPU_Target::is_alias, GPU_Target::refcount, and GPU_Image::target.
|
static |
Definition at line 4107 of file SDL_gpu_GL_common.inl.
References bindTexture(), GPU_Renderer::FlushBlitBuffer, GL_LINEAR, GL_LINEAR_MIPMAP_NEAREST, GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, glGenerateMipmap, glGetTexParameteriv(), glTexParameteri(), GPU_Image::has_mipmaps, isCurrentTarget(), and GPU_Image::target.
|
static |
Definition at line 1890 of file SDL_gpu_GL_common.inl.
Referenced by SaveImage().
|
static |
Definition at line 3642 of file SDL_gpu_GL_common.inl.
References GPU_AttributeSource::attribute, i, GPU_Attribute::location, GPU_AttributeSource::num_values, and GPU_Attribute::values.
Referenced by FlushBlitBuffer().
|
static |
Definition at line 564 of file SDL_gpu_GL_common.inl.
References GPU_Target::context, GPU_Renderer::current_context_target, and GPU_Context::default_textured_shader_program.
Referenced by GetAttributeLocation(), GetUniformfv(), GetUniformiv(), GetUniformLocation(), GetUniformuiv(), and LoadShaderBlock().
|
static |
Definition at line 5064 of file SDL_gpu_GL_common.inl.
References get_proper_program_id(), and glGetAttribLocation.
static_inline unsigned int getNearestPowerOf2 | ( | unsigned int | n | ) |
Definition at line 255 of file SDL_gpu_GL_common.inl.
Referenced by CopyImage(), and CreateImage().
static_inline Uint32 getPixel | ( | SDL_Surface * | Surface, |
int | x, | ||
int | y | ||
) |
Definition at line 2727 of file SDL_gpu_GL_common.inl.
References g.
|
static |
Definition at line 4170 of file SDL_gpu_GL_common.inl.
References bindFramebuffer(), GPU_Target::data, GPU_Renderer::FlushBlitBuffer, GET_ALPHA, GL_UNSIGNED_BYTE, glReadPixels(), GPU_TARGET_DATA, GPU_Target::h, isCurrentTarget(), GPU_Target::renderer, and GPU_Target::w.
|
static |
Definition at line 1871 of file SDL_gpu_GL_common.inl.
References GPU_Image::bytes_per_pixel, GPU_Image::data, GPU_Renderer::FlushBlitBuffer, GPU_Image::format, GPU_IMAGE_DATA, GPU_Image::h, isCurrentTarget(), readImagePixels(), GPU_Image::target, and GPU_Image::w.
Referenced by CopyImage(), CopySurfaceFromImage(), and SaveImage().
|
static |
Definition at line 1832 of file SDL_gpu_GL_common.inl.
References GPU_Image::bytes_per_pixel, GPU_Target::data, GPU_Renderer::FlushBlitBuffer, GPU_TARGET_DATA, GPU_Target::h, GPU_Target::image, isCurrentTarget(), readTargetPixels(), and GPU_Target::w.
Referenced by CopySurfaceFromTarget().
|
static |
Definition at line 5059 of file SDL_gpu_GL_common.inl.
References shader_message.
|
static |
Definition at line 4817 of file SDL_gpu_GL_common.inl.
References GetShaderSource_RW().
Referenced by GetShaderSource_RW().
|
static |
Definition at line 4727 of file SDL_gpu_GL_common.inl.
References GetShaderSource(), font::line_size(), and read_until_end_of_comment().
Referenced by CompileShader_RW(), and GetShaderSource().
|
static |
Definition at line 4832 of file SDL_gpu_GL_common.inl.
References GetShaderSourceSize_RW().
Referenced by GetShaderSourceSize_RW().
|
static |
Definition at line 4650 of file SDL_gpu_GL_common.inl.
References GetShaderSourceSize(), font::line_size(), and read_until_end_of_comment().
Referenced by CompileShader_RW(), and GetShaderSourceSize().
|
static |
Definition at line 5270 of file SDL_gpu_GL_common.inl.
References get_proper_program_id(), and glGetUniformfv.
|
static |
Definition at line 5156 of file SDL_gpu_GL_common.inl.
References get_proper_program_id(), and glGetUniformiv.
|
static |
Definition at line 5076 of file SDL_gpu_GL_common.inl.
References get_proper_program_id(), and glGetUniformLocation.
|
static |
Definition at line 5200 of file SDL_gpu_GL_common.inl.
References get_proper_program_id(), glGetUniformiv, and glGetUniformuiv.
void GPU_AddWindowMapping | ( | GPU_Target * | target | ) |
Definition at line 191 of file SDL_gpu.c.
References GPU_Target::context, GPU_ERROR_DATA_ERROR, GPU_PushErrorCode(), i, init_window_mappings(), num_window_mappings, window_mappings_size, and GPU_Context::windowID.
Referenced by CreateTargetFromWindow(), and MakeCurrent().
void GPU_RemoveWindowMapping | ( | Uint32 | windowID | ) |
Definition at line 237 of file SDL_gpu.c.
References GPU_Target::context, i, init_window_mappings(), num_window_mappings, GPU_WindowMapping::target, and GPU_Context::windowID.
Referenced by CreateTargetFromWindow(), and MakeCurrent().
void GPU_RemoveWindowMappingByTarget | ( | GPU_Target * | target | ) |
Definition at line 268 of file SDL_gpu.c.
References GPU_Target::context, i, init_window_mappings(), num_window_mappings, and GPU_Context::windowID.
Referenced by FreeTarget().
|
static |
Definition at line 360 of file SDL_gpu_GL_common.inl.
References GL_ARRAY_BUFFER, GL_STREAM_DRAW, glBindBuffer, glBindVertexArray, glBufferData, GPU_BLIT_BUFFER_ABSOLUTE_MAX_VERTICES, GPU_BLIT_BUFFER_STRIDE, and int().
Referenced by Blit(), BlitBatch(), BlitTransformX(), and TriangleBatch().
|
static |
Definition at line 405 of file SDL_gpu_GL_common.inl.
References GPU_INDEX_BUFFER_ABSOLUTE_MAX_VERTICES.
Referenced by Blit(), BlitBatch(), BlitTransformX(), and TriangleBatch().
|
static |
Definition at line 2271 of file SDL_gpu_GL_common.inl.
Referenced by CopyImageFromSurface().
|
static |
Definition at line 766 of file SDL_gpu_GL_common.inl.
References GPU_Target::context, GPU_Renderer::CreateTargetFromWindow, GPU_Renderer::current_context_target, GPU_Renderer::enabled_features, GL_VENDOR, glGetString(), GPU_ERROR_BACKEND_ERROR, GPU_GetInitWindow(), GPU_GetPreInitFlags(), GPU_INIT_DISABLE_DOUBLE_BUFFER, GPU_INIT_DISABLE_VSYNC, GPU_Renderer::GPU_init_flags, GPU_PushErrorCode(), GPU_SetInitWindow(), GPU_Target::h, GPU_RendererID::major_version, GPU_RendererID::minor_version, GPU_Renderer::requested_id, resources::screen, GPU_Renderer::SDL_init_flags, GPU_Renderer::SetVirtualResolution, GPU_Target::w, and GPU_Context::windowID.
|
static |
Definition at line 138 of file SDL_gpu_GL_common.inl.
References GPU_Renderer::enabled_features, GPU_FEATURE_BLEND_EQUATIONS, GPU_FEATURE_BLEND_EQUATIONS_SEPARATE, GPU_FEATURE_BLEND_FUNC_SEPARATE, GPU_FEATURE_FRAGMENT_SHADER, GPU_FEATURE_GEOMETRY_SHADER, GPU_FEATURE_GL_ABGR, GPU_FEATURE_GL_BGR, GPU_FEATURE_GL_BGRA, GPU_FEATURE_NON_POWER_OF_TWO, GPU_FEATURE_RENDER_TARGETS, GPU_FEATURE_VERTEX_SHADER, GPU_FEATURE_WRAP_REPEAT_MIRRORED, and isExtensionSupported().
Referenced by CreateTargetFromWindow().
static_inline Uint8 isCurrentTarget | ( | GPU_Renderer * | renderer, |
GPU_Target * | target | ||
) |
Definition at line 344 of file SDL_gpu_GL_common.inl.
References GPU_Target::context, GPU_Renderer::current_context_target, GPU_Context::data, and GPU_CONTEXT_DATA.
Referenced by Clear(), ClearRGBA(), GenerateMipmaps(), GetPixel(), getRawImageData(), getRawTargetData(), readTargetPixels(), SetCamera(), SetClip(), SetVirtualResolution(), SetWindowResolution(), UnsetClip(), UnsetVirtualResolution(), UpdateImageBytes(), and UpdateSubImage().
|
static |
Definition at line 5001 of file SDL_gpu_GL_common.inl.
References GPU_Target::context, GPU_Renderer::current_context_target, GPU_Context::default_textured_shader_program, and GPU_Context::default_untextured_shader_program.
|
static |
Definition at line 113 of file SDL_gpu_GL_common.inl.
References GL_EXTENSIONS, glewIsExtensionSupported, and glGetString().
Referenced by init_features().
|
static |
Definition at line 884 of file SDL_gpu_GL_common.inl.
References GPU_Renderer::enabled_features.
static_inline Uint8 isPowerOfTwo | ( | unsigned int | x | ) |
Definition at line 250 of file SDL_gpu_GL_common.inl.
Referenced by CopyImage(), and CreateImage().
|
static |
Definition at line 4939 of file SDL_gpu_GL_common.inl.
References GL_LINK_STATUS, glDeleteProgram, glGetProgramInfoLog, glGetProgramiv, glLinkProgram, GPU_ERROR_BACKEND_ERROR, GPU_PushErrorCode(), and linked.
|
static |
Definition at line 4959 of file SDL_gpu_GL_common.inl.
References glAttachShader, glCreateProgram, and GPU_Renderer::LinkShaderProgram.
|
static |
Definition at line 1742 of file SDL_gpu_GL_common.inl.
References GPU_Renderer::CopyImageFromSurface, GPU_ERROR_DATA_ERROR, GPU_LoadSurface(), and GPU_PushErrorCode().
|
static |
|
static |
Definition at line 2852 of file SDL_gpu_GL_common.inl.
References GPU_Target::camera, GPU_Target::clip_rect, GPU_Target::context, GPU_Image::data, GPU_Target::data, GPU_Renderer::enabled_features, flushAndBindFramebuffer(), GL_COLOR_ATTACHMENT0, GL_FRAMEBUFFER, GL_FRAMEBUFFER_COMPLETE, GL_TEXTURE_2D, glCheckFramebufferStatus, glFramebufferTexture2D, glGenFramebuffers, GPU_FEATURE_RENDER_TARGETS, GPU_GetDefaultCamera(), GPU_IMAGE_DATA, GPU_MakeRect(), GPU_TARGET_DATA, GPU_Rect::h, GPU_Image::h, GPU_Target::h, GPU_Target::image, GPU_Target::refcount, GPU_Target::renderer, GPU_Image::target, GPU_Target::use_clip_rect, GPU_Target::use_color, GPU_Target::viewport, GPU_Rect::w, GPU_Image::w, GPU_Target::w, GPU_Rect::x, and GPU_Rect::y.
|
static |
Definition at line 436 of file SDL_gpu_GL_common.inl.
References GPU_Context::context, GPU_Target::context, GPU_Renderer::current_context_target, GPU_Renderer::FlushBlitBuffer, and GPU_Context::windowID.
Referenced by Blit(), BlitBatch(), BlitTransformX(), Clear(), ClearRGBA(), Flip(), TriangleBatch(), and UnsetClip().
|
static |
Definition at line 1285 of file SDL_gpu_GL_common.inl.
References applyTargetCamera(), c, GPU_Context::context, GPU_Target::context, GPU_Renderer::current_context_target, GPU_Context::data, GPU_Renderer::FlushBlitBuffer, GPU_AddWindowMapping(), GPU_CONTEXT_DATA, GPU_RemoveWindowMapping(), GPU_Target::image, resources::screen, GPU_Context::window_h, GPU_Context::window_w, and GPU_Context::windowID.
|
static |
Definition at line 628 of file SDL_gpu_GL_common.inl.
References GPU_Renderer::ActivateShaderProgram, GPU_Image::blend_mode, changeBlending(), changeBlendMode(), changeColor(), GPU_Image::color, GPU_Target::color, GPU_Target::context, GPU_Renderer::current_context_target, GPU_Context::current_shader_program, GPU_Context::data, GPU_Context::default_textured_shader_program, GPU_Context::default_untextured_shader_program, enableTexturing(), GPU_Renderer::FlushBlitBuffer, GL_TRIANGLES, GPU_CONTEXT_DATA, MIX_COLORS, GPU_Image::use_blending, and GPU_Target::use_color.
Referenced by Blit(), BlitBatch(), BlitTransformX(), and TriangleBatch().
|
static |
Definition at line 655 of file SDL_gpu_GL_common.inl.
References GPU_Renderer::ActivateShaderProgram, changeBlending(), changeBlendMode(), GPU_Target::context, GPU_Renderer::current_context_target, GPU_Context::current_shader_program, GPU_Context::data, GPU_Context::default_textured_shader_program, GPU_Context::default_untextured_shader_program, disableTexturing(), GPU_Renderer::FlushBlitBuffer, GPU_CONTEXT_DATA, GPU_Context::shapes_blend_mode, and GPU_Context::shapes_use_blending.
|
static |
Definition at line 473 of file SDL_gpu_GL_common.inl.
References GPU_Target::camera, GPU_Renderer::SetCamera, and setClipRect().
Referenced by Blit(), BlitBatch(), BlitTransformX(), and TriangleBatch().
|
static |
Definition at line 1452 of file SDL_gpu_GL_common.inl.
References GPU_Renderer::current_context_target, and GPU_Renderer::FreeTarget.
|
static |
Definition at line 4628 of file SDL_gpu_GL_common.inl.
Referenced by GetShaderSource_RW(), and GetShaderSourceSize_RW().
|
static |
Definition at line 1795 of file SDL_gpu_GL_common.inl.
References GPU_Target::context, GPU_Renderer::current_context_target, GPU_Image::data, GPU_Context::data, GPU_Renderer::FreeTarget, GL_TEXTURE_2D, GL_UNSIGNED_BYTE, glBindTexture(), glGetTexImage(), GPU_CONTEXT_DATA, GPU_IMAGE_DATA, GPU_Renderer::LoadTarget, readTargetPixels(), and GPU_Image::target.
Referenced by getRawImageData().
|
static |
Definition at line 1779 of file SDL_gpu_GL_common.inl.
References bindFramebuffer(), GPU_Renderer::FlushBlitBuffer, GL_UNSIGNED_BYTE, glReadPixels(), GPU_Target::h, isCurrentTarget(), and GPU_Target::w.
Referenced by getRawTargetData(), and readImagePixels().
|
static |
Definition at line 1898 of file SDL_gpu_GL_common.inl.
References GPU_Image::bytes_per_pixel, get_filename_ext(), getRawImageData(), GPU_ERROR_BACKEND_ERROR, GPU_ERROR_DATA_ERROR, GPU_PushErrorCode(), GPU_Image::h, stbi_write_bmp(), stbi_write_png(), stbi_write_tga(), and GPU_Image::w.
|
static |
Definition at line 1344 of file SDL_gpu_GL_common.inl.
References GPU_Target::context, GPU_Renderer::current_context_target, GPU_Renderer::MakeCurrent, and GPU_Context::windowID.
|
static |
Definition at line 5370 of file SDL_gpu_GL_common.inl.
References GPU_Target::context, GPU_Renderer::current_context_target, GPU_Context::current_shader_program, GPU_Renderer::FlushBlitBuffer, GL_TRIANGLES, glBegin(), glEnd(), and glVertexAttrib1f.
|
static |
Definition at line 5434 of file SDL_gpu_GL_common.inl.
References GPU_Target::context, GPU_Renderer::current_context_target, GPU_Context::current_shader_program, GPU_Renderer::FlushBlitBuffer, GL_TRIANGLES, glBegin(), glEnd(), glVertexAttrib1f, glVertexAttrib2f, glVertexAttrib3f, and glVertexAttrib4f.
|
static |
Definition at line 5391 of file SDL_gpu_GL_common.inl.
References GPU_Target::context, GPU_Renderer::current_context_target, GPU_Context::current_shader_program, GPU_Renderer::FlushBlitBuffer, GL_TRIANGLES, glBegin(), glEnd(), and glVertexAttribI1i.
|
static |
Definition at line 5469 of file SDL_gpu_GL_common.inl.
References GPU_Target::context, GPU_Renderer::current_context_target, GPU_Context::current_shader_program, GPU_Renderer::FlushBlitBuffer, GL_TRIANGLES, glBegin(), glEnd(), glVertexAttribI1i, glVertexAttribI2i, glVertexAttribI3i, and glVertexAttribI4i.
|
static |
Definition at line 5539 of file SDL_gpu_GL_common.inl.
References GPU_AttributeSource::attribute, GPU_Target::context, GPU_Renderer::current_context_target, GPU_Context::data, GPU_AttributeSource::enabled, GPU_Attribute::format, GPU_CONTEXT_DATA, GPU_AttributeFormat::is_per_sprite, GPU_Attribute::location, GPU_AttributeSource::next_value, GPU_AttributeFormat::num_elems_per_value, GPU_AttributeSource::num_values, GPU_AttributeFormat::offset_bytes, GPU_AttributeSource::per_vertex_storage, GPU_AttributeSource::per_vertex_storage_offset_bytes, GPU_AttributeSource::per_vertex_storage_size, GPU_AttributeSource::per_vertex_storage_stride_bytes, GPU_AttributeFormat::stride_bytes, GPU_AttributeFormat::type, and GPU_Attribute::values.
|
static |
Definition at line 5412 of file SDL_gpu_GL_common.inl.
References GPU_Target::context, GPU_Renderer::current_context_target, GPU_Context::current_shader_program, GPU_Renderer::FlushBlitBuffer, GL_TRIANGLES, glBegin(), glEnd(), and glVertexAttribI1ui.
|
static |
Definition at line 5504 of file SDL_gpu_GL_common.inl.
References GPU_Target::context, GPU_Renderer::current_context_target, GPU_Context::current_shader_program, GPU_Renderer::FlushBlitBuffer, GL_TRIANGLES, glBegin(), glEnd(), glVertexAttribI1ui, glVertexAttribI2ui, glVertexAttribI3ui, and glVertexAttribI4ui.
|
static |
Definition at line 1531 of file SDL_gpu_GL_common.inl.
References GPU_Target::camera, equal_cameras(), GPU_Renderer::FlushBlitBuffer, GPU_ERROR_NULL_ARGUMENT, GPU_GetDefaultCamera(), GPU_PushErrorCode(), and isCurrentTarget().
|
static |
Definition at line 4129 of file SDL_gpu_GL_common.inl.
References GPU_Target::clip_rect, GPU_Renderer::FlushBlitBuffer, GPU_Rect::h, h, isCurrentTarget(), GPU_Target::use_clip_rect, GPU_Rect::w, GPU_Rect::x, and GPU_Rect::y.
|
static |
Definition at line 449 of file SDL_gpu_GL_common.inl.
References GPU_Target::clip_rect, GPU_Target::context, GPU_Renderer::current_context_target, GL_SCISSOR_TEST, glEnable(), glScissor(), GPU_Rect::h, GPU_Target::h, GPU_Target::use_clip_rect, GPU_Rect::w, GPU_Target::w, GPU_Context::window_h, GPU_Context::window_w, GPU_Rect::x, and GPU_Rect::y.
Referenced by BlitBatch(), Clear(), ClearRGBA(), FlushBlitBuffer(), prepareToRenderToTarget(), and TriangleBatch().
|
static |
Definition at line 4196 of file SDL_gpu_GL_common.inl.
References bindTexture(), GPU_Image::filter_mode, flushBlitBufferIfCurrentTexture(), GL_LINEAR, GL_LINEAR_MIPMAP_LINEAR, GL_LINEAR_MIPMAP_NEAREST, GL_NEAREST, GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_TEXTURE_MIN_FILTER, glTexParameteri(), GPU_ERROR_NULL_ARGUMENT, GPU_ERROR_USER_ERROR, GPU_FILTER_LINEAR, GPU_FILTER_LINEAR_MIPMAP, GPU_FILTER_NEAREST, GPU_PushErrorCode(), GPU_Image::has_mipmaps, and GPU_Image::renderer.
|
static |
Definition at line 5124 of file SDL_gpu_GL_common.inl.
References block(), GPU_Target::context, GPU_Renderer::current_context_target, GPU_Context::data, and GPU_CONTEXT_DATA.
|
static |
Definition at line 5131 of file SDL_gpu_GL_common.inl.
References GPU_Target::context, GPU_Renderer::current_context_target, GPU_Context::current_shader_program, GPU_Image::data, GPU_Renderer::FlushBlitBuffer, GL_TEXTURE0, GL_TEXTURE_2D, glActiveTexture, glBindTexture(), glUniform1i, and GPU_IMAGE_DATA.
|
static |
Definition at line 5279 of file SDL_gpu_GL_common.inl.
References GPU_Target::context, GPU_Renderer::current_context_target, GPU_Context::current_shader_program, GPU_Renderer::FlushBlitBuffer, and glUniform1f.
|
static |
Definition at line 5289 of file SDL_gpu_GL_common.inl.
References GPU_Target::context, GPU_Renderer::current_context_target, GPU_Context::current_shader_program, GPU_Renderer::FlushBlitBuffer, glUniform1fv, glUniform2fv, glUniform3fv, and glUniform4fv.
|
static |
Definition at line 5165 of file SDL_gpu_GL_common.inl.
References GPU_Target::context, GPU_Renderer::current_context_target, GPU_Context::current_shader_program, GPU_Renderer::FlushBlitBuffer, and glUniform1i.
|
static |
Definition at line 5175 of file SDL_gpu_GL_common.inl.
References GPU_Target::context, GPU_Renderer::current_context_target, GPU_Context::current_shader_program, GPU_Renderer::FlushBlitBuffer, glUniform1iv, glUniform2iv, glUniform3iv, and glUniform4iv.
|
static |
Definition at line 5313 of file SDL_gpu_GL_common.inl.
References GPU_Target::context, GPU_Renderer::current_context_target, GPU_Context::current_shader_program, GPU_Renderer::FlushBlitBuffer, glUniformMatrix2fv, glUniformMatrix2x3fv, glUniformMatrix2x4fv, glUniformMatrix3fv, glUniformMatrix3x2fv, glUniformMatrix3x4fv, glUniformMatrix4fv, glUniformMatrix4x2fv, glUniformMatrix4x3fv, GPU_ERROR_DATA_ERROR, and GPU_PushErrorCode().
|
static |
Definition at line 5213 of file SDL_gpu_GL_common.inl.
References GPU_Target::context, GPU_Renderer::current_context_target, GPU_Context::current_shader_program, GPU_Renderer::FlushBlitBuffer, glUniform1i, and glUniform1ui.
|
static |
Definition at line 5227 of file SDL_gpu_GL_common.inl.
References GPU_Target::context, GPU_Renderer::current_context_target, GPU_Context::current_shader_program, GPU_Renderer::FlushBlitBuffer, glUniform1iv, glUniform1uiv, glUniform2iv, glUniform2uiv, glUniform3iv, glUniform3uiv, glUniform4iv, and glUniform4uiv.
|
static |
Definition at line 1408 of file SDL_gpu_GL_common.inl.
References applyTargetCamera(), GPU_Renderer::FlushBlitBuffer, GPU_Target::h, h, isCurrentTarget(), and GPU_Target::w.
|
static |
Definition at line 1352 of file SDL_gpu_GL_common.inl.
References applyTargetCamera(), changeViewport(), GPU_Target::context, GPU_Renderer::current_context_target, GPU_Renderer::FlushBlitBuffer, GL_COLOR_BUFFER_BIT, GL_TEXTURE_2D, glClear(), glClearColor(), glEnable(), GPU_MakeRect(), GPU_UnsetClip(), GPU_Target::h, isCurrentTarget(), resources::screen, GPU_Context::stored_window_h, GPU_Context::stored_window_w, surf, GPU_Target::viewport, GPU_Target::w, GPU_Context::window_h, GPU_Context::window_w, and GPU_Context::windowID.
|
static |
Definition at line 4247 of file SDL_gpu_GL_common.inl.
References bindTexture(), GPU_Renderer::enabled_features, flushBlitBufferIfCurrentTexture(), GL_CLAMP_TO_EDGE, GL_MIRRORED_REPEAT, GL_REPEAT, GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_TEXTURE_WRAP_T, glTexParameteri(), GPU_ERROR_BACKEND_ERROR, GPU_ERROR_NULL_ARGUMENT, GPU_ERROR_USER_ERROR, GPU_FEATURE_WRAP_REPEAT_MIRRORED, GPU_PushErrorCode(), GPU_WRAP_MIRRORED, GPU_WRAP_NONE, GPU_WRAP_REPEAT, GPU_Image::renderer, GPU_Image::wrap_mode_x, and GPU_Image::wrap_mode_y.
|
static |
Definition at line 1460 of file SDL_gpu_GL_common.inl.
References GPU_Target::context, GPU_Renderer::current_context_target, h, SDL_FULLSCREEN, GPU_Renderer::SetWindowResolution, GPU_Context::stored_window_h, GPU_Context::stored_window_w, surf, GPU_Context::window_h, GPU_Context::window_w, and GPU_Context::windowID.
|
static |
Definition at line 3884 of file SDL_gpu_GL_common.inl.
References bindFramebuffer(), bindTexture(), changeCamera(), changeTexturing(), changeViewport(), GPU_Target::context, GPU_Renderer::current_context_target, GPU_Context::data, GPU_Renderer::FlushBlitBuffer, GL_ARRAY_BUFFER, GL_COLOR_ARRAY, GL_FALSE, GL_FLOAT, GL_QUADS, GL_TEXTURE_COORD_ARRAY, GL_TRIANGLES, GL_UNSIGNED_SHORT, GL_VERTEX_ARRAY, glBegin(), glBindBuffer, glBindVertexArray, glBufferSubData, glColor4f(), glColorPointer(), glDisableClientState(), glDisableVertexAttribArray, glDrawArrays(), glDrawElements(), glEnableClientState(), glEnableVertexAttribArray, glEnd(), glTexCoord2f(), glTexCoordPointer(), glUniformMatrix4fv, glVertex3f(), glVertexAttribPointer, glVertexPointer(), GPU_BLIT_BUFFER_FLOATS_PER_VERTEX, GPU_BLIT_BUFFER_STRIDE, GPU_CONTEXT_DATA, GPU_ERROR_BACKEND_ERROR, GPU_ERROR_NULL_ARGUMENT, GPU_ERROR_USER_ERROR, GPU_GetModelViewProjection(), GPU_PushErrorCode(), growBlitBuffer(), growIndexBuffer(), i, makeContextCurrent(), prepareToRenderImage(), prepareToRenderToTarget(), GPU_Image::renderer, GPU_Target::renderer, setClipRect(), and unsetClipRect().
Referenced by GPU_TriangleBatch().
|
static |
Definition at line 4152 of file SDL_gpu_GL_common.inl.
References GPU_Renderer::FlushBlitBuffer, isCurrentTarget(), makeContextCurrent(), and GPU_Target::use_clip_rect.
|
static |
Definition at line 467 of file SDL_gpu_GL_common.inl.
References GL_SCISSOR_TEST, glDisable(), and GPU_Target::use_clip_rect.
Referenced by BlitBatch(), Clear(), ClearRGBA(), FlushBlitBuffer(), and TriangleBatch().
|
static |
Definition at line 1426 of file SDL_gpu_GL_common.inl.
References applyTargetCamera(), GPU_Target::context, GPU_Renderer::FlushBlitBuffer, GPU_Image::h, GPU_Target::h, GPU_Target::image, isCurrentTarget(), GPU_Image::w, GPU_Target::w, GPU_Context::window_h, and GPU_Context::window_w.
|
static |
Definition at line 2518 of file SDL_gpu_GL_common.inl.
References GPU_Renderer::UpdateSubImage.
|
static |
Definition at line 2654 of file SDL_gpu_GL_common.inl.
References bindTexture(), GPU_Image::bytes_per_pixel, changeTexturing(), GPU_Image::data, GPU_Renderer::FlushBlitBuffer, GL_TEXTURE_2D, GL_UNPACK_ALIGNMENT, GL_UNPACK_ROW_LENGTH, GL_UNSIGNED_BYTE, glPixelStorei(), glTexSubImage2D(), GPU_ERROR_USER_ERROR, GPU_IMAGE_DATA, GPU_PushErrorCode(), GPU_Rect::h, GPU_Image::h, isCurrentTarget(), GPU_Image::target, GPU_Rect::w, GPU_Image::w, GPU_Rect::x, and GPU_Rect::y.
|
static |
Definition at line 2524 of file SDL_gpu_GL_common.inl.
References bindTexture(), changeTexturing(), copySurfaceIfNeeded(), GPU_Image::data, GPU_Renderer::FlushBlitBuffer, GL_TEXTURE_2D, GL_UNPACK_ALIGNMENT, GL_UNPACK_ROW_LENGTH, GL_UNSIGNED_BYTE, glPixelStorei(), glTexSubImage2D(), GPU_ERROR_BACKEND_ERROR, GPU_ERROR_USER_ERROR, GPU_IMAGE_DATA, GPU_PushErrorCode(), GPU_Rect::h, GPU_Image::h, isCurrentTarget(), GPU_Image::target, GPU_Rect::w, GPU_Image::w, GPU_Rect::x, and GPU_Rect::y.
|
static |
Definition at line 4847 of file SDL_gpu_GL_common.inl.
Referenced by GetShaderMessage().