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

Go to the source code of this file.

Data Structures

struct  ContextData_OpenGL_2
 
struct  ImageData_OpenGL_2
 
struct  TargetData_OpenGL_2
 

Macros

#define GPU_CONTEXT_DATA   ContextData_OpenGL_2
 
#define GPU_IMAGE_DATA   ImageData_OpenGL_2
 
#define GPU_TARGET_DATA   TargetData_OpenGL_2
 
#define GPU_DEFAULT_TEXTURED_VERTEX_SHADER_SOURCE   "#version 120\n\\attribute vec2 gpu_Vertex;\n\attribute vec2 gpu_TexCoord;\n\attribute vec4 gpu_Color;\n\uniform mat4 gpu_ModelViewProjectionMatrix;\n\\varying vec4 color;\n\varying 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 120\n\\attribute vec2 gpu_Vertex;\n\attribute vec4 gpu_Color;\n\uniform mat4 gpu_ModelViewProjectionMatrix;\n\\varying 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 120\n\\varying vec4 color;\n\varying 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 120\n\\varying vec4 color;\n\\void main(void)\n\{\n\ gl_FragColor = color;\n\}"
 

Macro Definition Documentation

◆ GPU_CONTEXT_DATA

#define GPU_CONTEXT_DATA   ContextData_OpenGL_2

Definition at line 29 of file SDL_gpu_OpenGL_2.h.

◆ GPU_DEFAULT_TEXTURED_FRAGMENT_SHADER_SOURCE

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

Definition at line 70 of file SDL_gpu_OpenGL_2.h.

◆ GPU_DEFAULT_TEXTURED_VERTEX_SHADER_SOURCE

#define GPU_DEFAULT_TEXTURED_VERTEX_SHADER_SOURCE   "#version 120\n\\attribute vec2 gpu_Vertex;\n\attribute vec2 gpu_TexCoord;\n\attribute vec4 gpu_Color;\n\uniform mat4 gpu_ModelViewProjectionMatrix;\n\\varying vec4 color;\n\varying 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 35 of file SDL_gpu_OpenGL_2.h.

◆ GPU_DEFAULT_UNTEXTURED_FRAGMENT_SHADER_SOURCE

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

Definition at line 83 of file SDL_gpu_OpenGL_2.h.

◆ GPU_DEFAULT_UNTEXTURED_VERTEX_SHADER_SOURCE

#define GPU_DEFAULT_UNTEXTURED_VERTEX_SHADER_SOURCE   "#version 120\n\\attribute vec2 gpu_Vertex;\n\attribute vec4 gpu_Color;\n\uniform mat4 gpu_ModelViewProjectionMatrix;\n\\varying 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 54 of file SDL_gpu_OpenGL_2.h.

◆ GPU_IMAGE_DATA

#define GPU_IMAGE_DATA   ImageData_OpenGL_2

Definition at line 30 of file SDL_gpu_OpenGL_2.h.

◆ GPU_TARGET_DATA

#define GPU_TARGET_DATA   TargetData_OpenGL_2

Definition at line 31 of file SDL_gpu_OpenGL_2.h.