SDL_gpu  0.11.0
A hardware-accelerated, cross-platform 2D graphics API
Data Structures | Macros
SDL_gpu_OpenGL_3.h File Reference
#include "SDL_gpu.h"
#include "glew.h"

Go to the source code of this file.

Data Structures

struct  ContextData_OpenGL_3
 
struct  ImageData_OpenGL_3
 
struct  TargetData_OpenGL_3
 

Macros

#define GPU_CONTEXT_DATA   ContextData_OpenGL_3
 
#define GPU_IMAGE_DATA   ImageData_OpenGL_3
 
#define GPU_TARGET_DATA   TargetData_OpenGL_3
 
#define GPU_DEFAULT_TEXTURED_VERTEX_SHADER_SOURCE   "#version 130\n\\in vec2 gpu_Vertex;\n\in vec2 gpu_TexCoord;\n\in vec4 gpu_Color;\n\uniform mat4 gpu_ModelViewProjectionMatrix;\n\\out vec4 color;\n\out vec2 texCoord;\n\\void main(void)\n\{\n\ color = gpu_Color;\n\ texCoord = vec2(gpu_TexCoord);\n\ gl_Position = gpu_ModelViewProjectionMatrix * vec4(gpu_Vertex, 0.0, 1.0);\n\}"
 
#define GPU_DEFAULT_UNTEXTURED_VERTEX_SHADER_SOURCE   "#version 130\n\\in vec2 gpu_Vertex;\n\in vec4 gpu_Color;\n\uniform mat4 gpu_ModelViewProjectionMatrix;\n\\out vec4 color;\n\\void main(void)\n\{\n\ color = gpu_Color;\n\ gl_Position = gpu_ModelViewProjectionMatrix * vec4(gpu_Vertex, 0.0, 1.0);\n\}"
 
#define GPU_DEFAULT_TEXTURED_FRAGMENT_SHADER_SOURCE   "#version 130\n\\in vec4 color;\n\in vec2 texCoord;\n\\uniform sampler2D tex;\n\\void main(void)\n\{\n\ gl_FragColor = texture2D(tex, texCoord) * color;\n\}"
 
#define GPU_DEFAULT_UNTEXTURED_FRAGMENT_SHADER_SOURCE   "#version 130\n\\in vec4 color;\n\\void main(void)\n\{\n\ gl_FragColor = color;\n\}"
 
#define GPU_DEFAULT_TEXTURED_VERTEX_SHADER_SOURCE_CORE   "#version 150\n\\in vec2 gpu_Vertex;\n\in vec2 gpu_TexCoord;\n\in vec4 gpu_Color;\n\uniform mat4 gpu_ModelViewProjectionMatrix;\n\\out vec4 color;\n\out vec2 texCoord;\n\\void main(void)\n\{\n\ color = gpu_Color;\n\ texCoord = vec2(gpu_TexCoord);\n\ gl_Position = gpu_ModelViewProjectionMatrix * vec4(gpu_Vertex, 0.0, 1.0);\n\}"
 
#define GPU_DEFAULT_UNTEXTURED_VERTEX_SHADER_SOURCE_CORE   "#version 150\n\\in vec2 gpu_Vertex;\n\in vec4 gpu_Color;\n\uniform mat4 gpu_ModelViewProjectionMatrix;\n\\out vec4 color;\n\\void main(void)\n\{\n\ color = gpu_Color;\n\ gl_Position = gpu_ModelViewProjectionMatrix * vec4(gpu_Vertex, 0.0, 1.0);\n\}"
 
#define GPU_DEFAULT_TEXTURED_FRAGMENT_SHADER_SOURCE_CORE   "#version 150\n\\in vec4 color;\n\in vec2 texCoord;\n\\uniform sampler2D tex;\n\\out vec4 fragColor;\n\\void main(void)\n\{\n\ fragColor = texture(tex, texCoord) * color;\n\}"
 
#define GPU_DEFAULT_UNTEXTURED_FRAGMENT_SHADER_SOURCE_CORE   "#version 150\n\\in vec4 color;\n\\out vec4 fragColor;\n\\void main(void)\n\{\n\ fragColor = color;\n\}"
 

Macro Definition Documentation

◆ GPU_CONTEXT_DATA

#define GPU_CONTEXT_DATA   ContextData_OpenGL_3

Definition at line 28 of file SDL_gpu_OpenGL_3.h.

◆ GPU_DEFAULT_TEXTURED_FRAGMENT_SHADER_SOURCE

#define GPU_DEFAULT_TEXTURED_FRAGMENT_SHADER_SOURCE   "#version 130\n\\in vec4 color;\n\in vec2 texCoord;\n\\uniform sampler2D tex;\n\\void main(void)\n\{\n\ gl_FragColor = texture2D(tex, texCoord) * color;\n\}"

Definition at line 68 of file SDL_gpu_OpenGL_3.h.

◆ GPU_DEFAULT_TEXTURED_FRAGMENT_SHADER_SOURCE_CORE

#define GPU_DEFAULT_TEXTURED_FRAGMENT_SHADER_SOURCE_CORE   "#version 150\n\\in vec4 color;\n\in vec2 texCoord;\n\\uniform sampler2D tex;\n\\out vec4 fragColor;\n\\void main(void)\n\{\n\ fragColor = texture(tex, texCoord) * color;\n\}"

Definition at line 130 of file SDL_gpu_OpenGL_3.h.

◆ GPU_DEFAULT_TEXTURED_VERTEX_SHADER_SOURCE

#define GPU_DEFAULT_TEXTURED_VERTEX_SHADER_SOURCE   "#version 130\n\\in vec2 gpu_Vertex;\n\in vec2 gpu_TexCoord;\n\in vec4 gpu_Color;\n\uniform mat4 gpu_ModelViewProjectionMatrix;\n\\out vec4 color;\n\out vec2 texCoord;\n\\void main(void)\n\{\n\ color = gpu_Color;\n\ texCoord = vec2(gpu_TexCoord);\n\ gl_Position = gpu_ModelViewProjectionMatrix * vec4(gpu_Vertex, 0.0, 1.0);\n\}"

Definition at line 33 of file SDL_gpu_OpenGL_3.h.

◆ GPU_DEFAULT_TEXTURED_VERTEX_SHADER_SOURCE_CORE

#define GPU_DEFAULT_TEXTURED_VERTEX_SHADER_SOURCE_CORE   "#version 150\n\\in vec2 gpu_Vertex;\n\in vec2 gpu_TexCoord;\n\in vec4 gpu_Color;\n\uniform mat4 gpu_ModelViewProjectionMatrix;\n\\out vec4 color;\n\out vec2 texCoord;\n\\void main(void)\n\{\n\ color = gpu_Color;\n\ texCoord = vec2(gpu_TexCoord);\n\ gl_Position = gpu_ModelViewProjectionMatrix * vec4(gpu_Vertex, 0.0, 1.0);\n\}"

Definition at line 96 of file SDL_gpu_OpenGL_3.h.

◆ GPU_DEFAULT_UNTEXTURED_FRAGMENT_SHADER_SOURCE

#define GPU_DEFAULT_UNTEXTURED_FRAGMENT_SHADER_SOURCE   "#version 130\n\\in vec4 color;\n\\void main(void)\n\{\n\ gl_FragColor = color;\n\}"

Definition at line 81 of file SDL_gpu_OpenGL_3.h.

◆ GPU_DEFAULT_UNTEXTURED_FRAGMENT_SHADER_SOURCE_CORE

#define GPU_DEFAULT_UNTEXTURED_FRAGMENT_SHADER_SOURCE_CORE   "#version 150\n\\in vec4 color;\n\\out vec4 fragColor;\n\\void main(void)\n\{\n\ fragColor = color;\n\}"

Definition at line 145 of file SDL_gpu_OpenGL_3.h.

◆ GPU_DEFAULT_UNTEXTURED_VERTEX_SHADER_SOURCE

#define GPU_DEFAULT_UNTEXTURED_VERTEX_SHADER_SOURCE   "#version 130\n\\in vec2 gpu_Vertex;\n\in vec4 gpu_Color;\n\uniform mat4 gpu_ModelViewProjectionMatrix;\n\\out vec4 color;\n\\void main(void)\n\{\n\ color = gpu_Color;\n\ gl_Position = gpu_ModelViewProjectionMatrix * vec4(gpu_Vertex, 0.0, 1.0);\n\}"

Definition at line 52 of file SDL_gpu_OpenGL_3.h.

◆ GPU_DEFAULT_UNTEXTURED_VERTEX_SHADER_SOURCE_CORE

#define GPU_DEFAULT_UNTEXTURED_VERTEX_SHADER_SOURCE_CORE   "#version 150\n\\in vec2 gpu_Vertex;\n\in vec4 gpu_Color;\n\uniform mat4 gpu_ModelViewProjectionMatrix;\n\\out vec4 color;\n\\void main(void)\n\{\n\ color = gpu_Color;\n\ gl_Position = gpu_ModelViewProjectionMatrix * vec4(gpu_Vertex, 0.0, 1.0);\n\}"

Definition at line 114 of file SDL_gpu_OpenGL_3.h.

◆ GPU_IMAGE_DATA

#define GPU_IMAGE_DATA   ImageData_OpenGL_3

Definition at line 29 of file SDL_gpu_OpenGL_3.h.

◆ GPU_TARGET_DATA

#define GPU_TARGET_DATA   TargetData_OpenGL_3

Definition at line 30 of file SDL_gpu_OpenGL_3.h.