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

Go to the source code of this file.

Data Structures

struct  ContextData_OpenGL_1
 
struct  ImageData_OpenGL_1
 
struct  TargetData_OpenGL_1
 

Macros

#define glBlendFuncSeparate   glBlendFuncSeparateEXT
 
#define glBlendEquation   glBlendEquationEXT
 
#define glBlendEquationSeparate   glBlendEquationSeparateEXT
 
#define GL_MIRRORED_REPEAT   GL_MIRRORED_REPEAT_ARB
 
#define glCreateShader   glCreateShaderObjectARB
 
#define GL_VERTEX_SHADER   GL_VERTEX_SHADER_ARB
 
#define GL_FRAGMENT_SHADER   GL_FRAGMENT_SHADER_ARB
 
#define glShaderSource   glShaderSourceARB
 
#define glCompileShader   glCompileShaderARB
 
#define glGetShaderiv   glGetObjectParameterivARB
 
#define GL_COMPILE_STATUS   GL_OBJECT_COMPILE_STATUS_ARB
 
#define glGetShaderInfoLog   glGetInfoLogARB
 
#define glDeleteShader   glDeleteObjectARB
 
#define glActiveTexture   glActiveTextureARB
 
#define GL_TEXTURE0   GL_TEXTURE0_ARB
 
#define glCreateProgram   glCreateProgramObjectARB
 
#define glAttachShader   glAttachObjectARB
 
#define glLinkProgram   glLinkProgramARB
 
#define GL_LINK_STATUS   GL_OBJECT_LINK_STATUS_ARB
 
#define glGetProgramiv   glGetObjectParameterivARB
 
#define glGetProgramInfoLog   glGetInfoLogARB
 
#define glUseProgram   glUseProgramObjectARB
 
#define glDeleteProgram   glDeleteObjectARB
 
#define glGetUniformLocation   glGetUniformLocationARB
 
#define glGetUniformiv   glGetUniformivARB
 
#define glUniform1i   glUniform1iARB
 
#define glUniform1iv   glUniform1ivARB
 
#define glUniform2iv   glUniform2ivARB
 
#define glUniform3iv   glUniform3ivARB
 
#define glUniform4iv   glUniform4ivARB
 
#define glUniform1f   glUniform1fARB
 
#define glUniform1fv   glUniform1fvARB
 
#define glUniform2fv   glUniform2fvARB
 
#define glUniform3fv   glUniform3fvARB
 
#define glUniform4fv   glUniform4fvARB
 
#define glUniformMatrix4fv   glUniformMatrix4fvARB
 
#define glGetAttribLocation   glGetAttribLocationARB
 
#define glVertexAttrib1f   glVertexAttrib1fARB
 
#define glVertexAttrib2f   glVertexAttrib2fARB
 
#define glVertexAttrib3f   glVertexAttrib3fARB
 
#define glVertexAttrib4f   glVertexAttrib4fARB
 
#define glVertexAttribI1i   glVertexAttrib1sARB
 
#define glVertexAttribI2i   glVertexAttrib2sARB
 
#define glVertexAttribI3i   glVertexAttrib3sARB
 
#define glVertexAttribI4i   glVertexAttrib4sARB
 
#define glVertexAttribI1ui   glVertexAttrib1sARB
 
#define glVertexAttribI2ui   glVertexAttrib2sARB
 
#define glVertexAttribI3ui   glVertexAttrib3sARB
 
#define glVertexAttribI4ui   glVertexAttrib4sARB
 
#define glGenBuffers   glGenBuffersARB
 
#define glDeleteBuffers   glDeleteBuffersARB
 
#define glBindBuffer   glBindBufferARB
 
#define glBufferData   glBufferDataARB
 
#define glBufferSubData   glBufferSubDataARB
 
#define GL_ARRAY_BUFFER   GL_ARRAY_BUFFER_ARB
 
#define glEnableVertexAttribArray   glEnableVertexAttribArrayARB
 
#define glDisableVertexAttribArray   glDisableVertexAttribArrayARB
 
#define glVertexAttribPointer   glVertexAttribPointerARB
 
#define GPU_CONTEXT_DATA   ContextData_OpenGL_1
 
#define GPU_IMAGE_DATA   ImageData_OpenGL_1
 
#define GPU_TARGET_DATA   TargetData_OpenGL_1
 
#define GPU_DEFAULT_TEXTURED_VERTEX_SHADER_SOURCE   "#version 110\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 110\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 110\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 110\n\\varying vec4 color;\n\\void main(void)\n\{\n\ gl_FragColor = color;\n\}"
 

Macro Definition Documentation

◆ GL_ARRAY_BUFFER

#define GL_ARRAY_BUFFER   GL_ARRAY_BUFFER_ARB

Definition at line 141 of file SDL_gpu_OpenGL_1.h.

◆ GL_COMPILE_STATUS

#define GL_COMPILE_STATUS   GL_OBJECT_COMPILE_STATUS_ARB

Definition at line 53 of file SDL_gpu_OpenGL_1.h.

◆ GL_FRAGMENT_SHADER

#define GL_FRAGMENT_SHADER   GL_FRAGMENT_SHADER_ARB

Definition at line 49 of file SDL_gpu_OpenGL_1.h.

◆ GL_LINK_STATUS

#define GL_LINK_STATUS   GL_OBJECT_LINK_STATUS_ARB

Definition at line 70 of file SDL_gpu_OpenGL_1.h.

◆ GL_MIRRORED_REPEAT

#define GL_MIRRORED_REPEAT   GL_MIRRORED_REPEAT_ARB

Definition at line 34 of file SDL_gpu_OpenGL_1.h.

◆ GL_TEXTURE0

#define GL_TEXTURE0   GL_TEXTURE0_ARB

Definition at line 57 of file SDL_gpu_OpenGL_1.h.

◆ GL_VERTEX_SHADER

#define GL_VERTEX_SHADER   GL_VERTEX_SHADER_ARB

Definition at line 48 of file SDL_gpu_OpenGL_1.h.

◆ glActiveTexture

#define glActiveTexture   glActiveTextureARB

Definition at line 56 of file SDL_gpu_OpenGL_1.h.

◆ glAttachShader

#define glAttachShader   glAttachObjectARB

Definition at line 68 of file SDL_gpu_OpenGL_1.h.

◆ glBindBuffer

#define glBindBuffer   glBindBufferARB

Definition at line 138 of file SDL_gpu_OpenGL_1.h.

◆ glBlendEquation

#define glBlendEquation   glBlendEquationEXT

Definition at line 29 of file SDL_gpu_OpenGL_1.h.

◆ glBlendEquationSeparate

#define glBlendEquationSeparate   glBlendEquationSeparateEXT

Definition at line 31 of file SDL_gpu_OpenGL_1.h.

◆ glBlendFuncSeparate

#define glBlendFuncSeparate   glBlendFuncSeparateEXT

Definition at line 27 of file SDL_gpu_OpenGL_1.h.

◆ glBufferData

#define glBufferData   glBufferDataARB

Definition at line 139 of file SDL_gpu_OpenGL_1.h.

◆ glBufferSubData

#define glBufferSubData   glBufferSubDataARB

Definition at line 140 of file SDL_gpu_OpenGL_1.h.

◆ glCompileShader

#define glCompileShader   glCompileShaderARB

Definition at line 51 of file SDL_gpu_OpenGL_1.h.

◆ glCreateProgram

#define glCreateProgram   glCreateProgramObjectARB

Definition at line 67 of file SDL_gpu_OpenGL_1.h.

◆ glCreateShader

#define glCreateShader   glCreateShaderObjectARB

Definition at line 47 of file SDL_gpu_OpenGL_1.h.

◆ glDeleteBuffers

#define glDeleteBuffers   glDeleteBuffersARB

Definition at line 137 of file SDL_gpu_OpenGL_1.h.

◆ glDeleteProgram

#define glDeleteProgram   glDeleteObjectARB

Definition at line 74 of file SDL_gpu_OpenGL_1.h.

◆ glDeleteShader

#define glDeleteShader   glDeleteObjectARB

Definition at line 55 of file SDL_gpu_OpenGL_1.h.

◆ glDisableVertexAttribArray

#define glDisableVertexAttribArray   glDisableVertexAttribArrayARB

Definition at line 148 of file SDL_gpu_OpenGL_1.h.

◆ glEnableVertexAttribArray

#define glEnableVertexAttribArray   glEnableVertexAttribArrayARB

Definition at line 147 of file SDL_gpu_OpenGL_1.h.

◆ glGenBuffers

#define glGenBuffers   glGenBuffersARB

Definition at line 136 of file SDL_gpu_OpenGL_1.h.

◆ glGetAttribLocation

#define glGetAttribLocation   glGetAttribLocationARB

Definition at line 116 of file SDL_gpu_OpenGL_1.h.

◆ glGetProgramInfoLog

#define glGetProgramInfoLog   glGetInfoLogARB

Definition at line 72 of file SDL_gpu_OpenGL_1.h.

◆ glGetProgramiv

#define glGetProgramiv   glGetObjectParameterivARB

Definition at line 71 of file SDL_gpu_OpenGL_1.h.

◆ glGetShaderInfoLog

#define glGetShaderInfoLog   glGetInfoLogARB

Definition at line 54 of file SDL_gpu_OpenGL_1.h.

◆ glGetShaderiv

#define glGetShaderiv   glGetObjectParameterivARB

Definition at line 52 of file SDL_gpu_OpenGL_1.h.

◆ glGetUniformiv

#define glGetUniformiv   glGetUniformivARB

Definition at line 90 of file SDL_gpu_OpenGL_1.h.

◆ glGetUniformLocation

#define glGetUniformLocation   glGetUniformLocationARB

Definition at line 89 of file SDL_gpu_OpenGL_1.h.

◆ glLinkProgram

#define glLinkProgram   glLinkProgramARB

Definition at line 69 of file SDL_gpu_OpenGL_1.h.

◆ glShaderSource

#define glShaderSource   glShaderSourceARB

Definition at line 50 of file SDL_gpu_OpenGL_1.h.

◆ glUniform1f

#define glUniform1f   glUniform1fARB

Definition at line 96 of file SDL_gpu_OpenGL_1.h.

◆ glUniform1fv

#define glUniform1fv   glUniform1fvARB

Definition at line 97 of file SDL_gpu_OpenGL_1.h.

◆ glUniform1i

#define glUniform1i   glUniform1iARB

Definition at line 91 of file SDL_gpu_OpenGL_1.h.

◆ glUniform1iv

#define glUniform1iv   glUniform1ivARB

Definition at line 92 of file SDL_gpu_OpenGL_1.h.

◆ glUniform2fv

#define glUniform2fv   glUniform2fvARB

Definition at line 98 of file SDL_gpu_OpenGL_1.h.

◆ glUniform2iv

#define glUniform2iv   glUniform2ivARB

Definition at line 93 of file SDL_gpu_OpenGL_1.h.

◆ glUniform3fv

#define glUniform3fv   glUniform3fvARB

Definition at line 99 of file SDL_gpu_OpenGL_1.h.

◆ glUniform3iv

#define glUniform3iv   glUniform3ivARB

Definition at line 94 of file SDL_gpu_OpenGL_1.h.

◆ glUniform4fv

#define glUniform4fv   glUniform4fvARB

Definition at line 100 of file SDL_gpu_OpenGL_1.h.

◆ glUniform4iv

#define glUniform4iv   glUniform4ivARB

Definition at line 95 of file SDL_gpu_OpenGL_1.h.

◆ glUniformMatrix4fv

#define glUniformMatrix4fv   glUniformMatrix4fvARB

Definition at line 101 of file SDL_gpu_OpenGL_1.h.

◆ glUseProgram

#define glUseProgram   glUseProgramObjectARB

Definition at line 73 of file SDL_gpu_OpenGL_1.h.

◆ glVertexAttrib1f

#define glVertexAttrib1f   glVertexAttrib1fARB

Definition at line 117 of file SDL_gpu_OpenGL_1.h.

◆ glVertexAttrib2f

#define glVertexAttrib2f   glVertexAttrib2fARB

Definition at line 118 of file SDL_gpu_OpenGL_1.h.

◆ glVertexAttrib3f

#define glVertexAttrib3f   glVertexAttrib3fARB

Definition at line 119 of file SDL_gpu_OpenGL_1.h.

◆ glVertexAttrib4f

#define glVertexAttrib4f   glVertexAttrib4fARB

Definition at line 120 of file SDL_gpu_OpenGL_1.h.

◆ glVertexAttribI1i

#define glVertexAttribI1i   glVertexAttrib1sARB

Definition at line 121 of file SDL_gpu_OpenGL_1.h.

◆ glVertexAttribI1ui

#define glVertexAttribI1ui   glVertexAttrib1sARB

Definition at line 125 of file SDL_gpu_OpenGL_1.h.

◆ glVertexAttribI2i

#define glVertexAttribI2i   glVertexAttrib2sARB

Definition at line 122 of file SDL_gpu_OpenGL_1.h.

◆ glVertexAttribI2ui

#define glVertexAttribI2ui   glVertexAttrib2sARB

Definition at line 126 of file SDL_gpu_OpenGL_1.h.

◆ glVertexAttribI3i

#define glVertexAttribI3i   glVertexAttrib3sARB

Definition at line 123 of file SDL_gpu_OpenGL_1.h.

◆ glVertexAttribI3ui

#define glVertexAttribI3ui   glVertexAttrib3sARB

Definition at line 127 of file SDL_gpu_OpenGL_1.h.

◆ glVertexAttribI4i

#define glVertexAttribI4i   glVertexAttrib4sARB

Definition at line 124 of file SDL_gpu_OpenGL_1.h.

◆ glVertexAttribI4ui

#define glVertexAttribI4ui   glVertexAttrib4sARB

Definition at line 128 of file SDL_gpu_OpenGL_1.h.

◆ glVertexAttribPointer

#define glVertexAttribPointer   glVertexAttribPointerARB

Definition at line 149 of file SDL_gpu_OpenGL_1.h.

◆ GPU_CONTEXT_DATA

#define GPU_CONTEXT_DATA   ContextData_OpenGL_1

Definition at line 155 of file SDL_gpu_OpenGL_1.h.

◆ GPU_DEFAULT_TEXTURED_FRAGMENT_SHADER_SOURCE

#define GPU_DEFAULT_TEXTURED_FRAGMENT_SHADER_SOURCE   "#version 110\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 197 of file SDL_gpu_OpenGL_1.h.

◆ GPU_DEFAULT_TEXTURED_VERTEX_SHADER_SOURCE

#define GPU_DEFAULT_TEXTURED_VERTEX_SHADER_SOURCE   "#version 110\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 162 of file SDL_gpu_OpenGL_1.h.

◆ GPU_DEFAULT_UNTEXTURED_FRAGMENT_SHADER_SOURCE

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

Definition at line 210 of file SDL_gpu_OpenGL_1.h.

◆ GPU_DEFAULT_UNTEXTURED_VERTEX_SHADER_SOURCE

#define GPU_DEFAULT_UNTEXTURED_VERTEX_SHADER_SOURCE   "#version 110\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 181 of file SDL_gpu_OpenGL_1.h.

◆ GPU_IMAGE_DATA

#define GPU_IMAGE_DATA   ImageData_OpenGL_1

Definition at line 156 of file SDL_gpu_OpenGL_1.h.

◆ GPU_TARGET_DATA

#define GPU_TARGET_DATA   TargetData_OpenGL_1

Definition at line 157 of file SDL_gpu_OpenGL_1.h.