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

Go to the source code of this file.

Data Structures

struct  ContextData_OpenGL_4
 
struct  ImageData_OpenGL_4
 
struct  TargetData_OpenGL_4
 

Macros

#define GPU_CONTEXT_DATA   ContextData_OpenGL_4
 
#define GPU_IMAGE_DATA   ImageData_OpenGL_4
 
#define GPU_TARGET_DATA   TargetData_OpenGL_4
 
#define GPU_DEFAULT_TEXTURED_VERTEX_SHADER_SOURCE   "#version 400\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 400\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 400\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   "#version 400\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_4

Definition at line 28 of file SDL_gpu_OpenGL_4.h.

◆ GPU_DEFAULT_TEXTURED_FRAGMENT_SHADER_SOURCE

#define GPU_DEFAULT_TEXTURED_FRAGMENT_SHADER_SOURCE   "#version 400\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 68 of file SDL_gpu_OpenGL_4.h.

◆ GPU_DEFAULT_TEXTURED_VERTEX_SHADER_SOURCE

#define GPU_DEFAULT_TEXTURED_VERTEX_SHADER_SOURCE   "#version 400\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 34 of file SDL_gpu_OpenGL_4.h.

◆ GPU_DEFAULT_UNTEXTURED_FRAGMENT_SHADER_SOURCE

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

Definition at line 83 of file SDL_gpu_OpenGL_4.h.

◆ GPU_DEFAULT_UNTEXTURED_VERTEX_SHADER_SOURCE

#define GPU_DEFAULT_UNTEXTURED_VERTEX_SHADER_SOURCE   "#version 400\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_4.h.

◆ GPU_IMAGE_DATA

#define GPU_IMAGE_DATA   ImageData_OpenGL_4

Definition at line 29 of file SDL_gpu_OpenGL_4.h.

◆ GPU_TARGET_DATA

#define GPU_TARGET_DATA   TargetData_OpenGL_4

Definition at line 30 of file SDL_gpu_OpenGL_4.h.