/gles_header.pas
Pascal | 819 lines | 639 code | 74 blank | 106 comment | 148 complexity | 9fe15737e8a92dbfae00918d0220c47b MD5 | raw file
Large files files are truncated, but you can click here to view the full file
- {
- Copyright (c) 2010, Carl-Philip H?nsch
- Permission to use, copy, modify, and/or distribute this software for any purpose with or
- without fee is hereby granted, provided that the above copyright notice and this permission
- notice appear in all copies.
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
- SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
- THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
- DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
- CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
- OR PERFORMANCE OF THIS SOFTWARE.
- }
- {$MODE Delphi}
- {$MACRO ON}
- {$IFDEF Windows}
- {$DEFINE extdecl := stdcall}
- {$ELSE}
- {$DEFINE extdecl := cdecl}
- {$IFDEF MorphOS}
- {$INLINE ON}
- {$DEFINE GL_UNIT}
- {$ELSE}
- //{$LINKLIB c}
- {$ENDIF}
- {$ENDIF}
- unit gles_header;
- interface
- type
- GLchar = char;
- GLenum = cardinal; PGLenum = ^GLenum;
- GLboolean = cardinal; PGLboolean = ^GLboolean;
- GLbitfield = cardinal;
- GLbyte = shortint;
- GLshort = smallint;
- GLint = integer; PGLint = ^GLint;
- GLuint = cardinal; PGLuint = ^GLuint;
- GLsizei = integer; PGLsizei = ^GLsizei;
- GLubyte = byte;
- GLfloat = single; PGLfloat = ^GLfloat;
- GLclampf = single;
- GLfixed = single;
- GLintptr = ^GLint;
- GLsizeiptr = ^GLsizei;
- const GL_ES_VERSION_2_0 = 1;
- SDL_OPENGLES = $00000040; // f?r die gepatchte SDL-Version
- // herunterladbar von https://github.com/Cpasjuste/sdl-1.2.13_gles
- { ClearBufferMask }
- GL_DEPTH_BUFFER_BIT = $00000100;
- GL_STENCIL_BUFFER_BIT = $00000400;
- GL_COLOR_BUFFER_BIT = $00004000;
- { Boolean }
- GL_FALSE = 0;
- GL_TRUE = 1;
- { BeginMode }
- GL_POINTS = $0000;
- GL_LINES = $0001;
- GL_LINE_LOOP = $0002;
- GL_LINE_STRIP = $0003;
- GL_TRIANGLES = $0004;
- GL_TRIANGLE_STRIP = $0005;
- GL_TRIANGLE_FAN = $0006;
- { AlphaFunction (not supported in ES20) }
- { GL_NEVER }
- { GL_LESS }
- { GL_EQUAL }
- { GL_LEQUAL }
- { GL_GREATER }
- { GL_NOTEQUAL }
- { GL_GEQUAL }
- { GL_ALWAYS }
- { BlendingFactorDest }
- GL_ZERO = 0;
- GL_ONE = 1;
- GL_SRC_COLOR = $0300;
- GL_ONE_MINUS_SRC_COLOR = $0301;
- GL_SRC_ALPHA = $0302;
- GL_ONE_MINUS_SRC_ALPHA = $0303;
- GL_DST_ALPHA = $0304;
- GL_ONE_MINUS_DST_ALPHA = $0305;
- { BlendingFactorSrc }
- { GL_ZERO }
- { GL_ONE }
- GL_DST_COLOR = $0306;
- GL_ONE_MINUS_DST_COLOR = $0307;
- GL_SRC_ALPHA_SATURATE = $0308;
- { GL_SRC_ALPHA }
- { GL_ONE_MINUS_SRC_ALPHA }
- { GL_DST_ALPHA }
- { GL_ONE_MINUS_DST_ALPHA }
- { BlendEquationSeparate }
- GL_FUNC_ADD = $8006;
- GL_BLEND_EQUATION = $8009;
- GL_BLEND_EQUATION_RGB = $8009; { same as BLEND_EQUATION }
- GL_BLEND_EQUATION_ALPHA = $883D;
- { BlendSubtract }
- GL_FUNC_SUBTRACT = $800A;
- GL_FUNC_REVERSE_SUBTRACT = $800B;
- { Separate Blend Functions }
- GL_BLEND_DST_RGB = $80C8;
- GL_BLEND_SRC_RGB = $80C9;
- GL_BLEND_DST_ALPHA = $80CA;
- GL_BLEND_SRC_ALPHA = $80CB;
- GL_CONSTANT_COLOR = $8001;
- GL_ONE_MINUS_CONSTANT_COLOR = $8002;
- GL_CONSTANT_ALPHA = $8003;
- GL_ONE_MINUS_CONSTANT_ALPHA = $8004;
- GL_BLEND_COLOR = $8005;
- { Buffer Objects }
- GL_ARRAY_BUFFER = $8892;
- GL_ELEMENT_ARRAY_BUFFER = $8893;
- GL_ARRAY_BUFFER_BINDING = $8894;
- GL_ELEMENT_ARRAY_BUFFER_BINDING = $8895;
- GL_STREAM_DRAW = $88E0;
- GL_STATIC_DRAW = $88E4;
- GL_DYNAMIC_DRAW = $88E8;
- GL_BUFFER_SIZE = $8764;
- GL_BUFFER_USAGE = $8765;
- GL_CURRENT_VERTEX_ATTRIB = $8626;
- { CullFaceMode }
- GL_FRONT = $0404;
- GL_BACK = $0405;
- GL_FRONT_AND_BACK = $0408;
- { DepthFunction }
- { GL_NEVER }
- { GL_LESS }
- { GL_EQUAL }
- { GL_LEQUAL }
- { GL_GREATER }
- { GL_NOTEQUAL }
- { GL_GEQUAL }
- { GL_ALWAYS }
- { EnableCap }
- GL_TEXTURE_2D = $0DE1;
- GL_CULL_FACE = $0B44;
- GL_BLEND = $0BE2;
- GL_DITHER = $0BD0;
- GL_STENCIL_TEST = $0B90;
- GL_DEPTH_TEST = $0B71;
- GL_SCISSOR_TEST = $0C11;
- GL_POLYGON_OFFSET_FILL = $8037;
- GL_SAMPLE_ALPHA_TO_COVERAGE = $809E;
- GL_SAMPLE_COVERAGE = $80A0;
- { ErrorCode }
- GL_NO_ERROR = 0;
- GL_INVALID_ENUM = $0500;
- GL_INVALID_VALUE = $0501;
- GL_INVALID_OPERATION = $0502;
- GL_OUT_OF_MEMORY = $0505;
- { FrontFaceDirection }
- GL_CW = $0900;
- GL_CCW = $0901;
- { GetPName }
- GL_LINE_WIDTH = $0B21;
- GL_ALIASED_POINT_SIZE_RANGE = $846D;
- GL_ALIASED_LINE_WIDTH_RANGE = $846E;
- GL_CULL_FACE_MODE = $0B45;
- GL_FRONT_FACE = $0B46;
- GL_DEPTH_RANGE = $0B70;
- GL_DEPTH_WRITEMASK = $0B72;
- GL_DEPTH_CLEAR_VALUE = $0B73;
- GL_DEPTH_FUNC = $0B74;
- GL_STENCIL_CLEAR_VALUE = $0B91;
- GL_STENCIL_FUNC = $0B92;
- GL_STENCIL_FAIL = $0B94;
- GL_STENCIL_PASS_DEPTH_FAIL = $0B95;
- GL_STENCIL_PASS_DEPTH_PASS = $0B96;
- GL_STENCIL_REF = $0B97;
- GL_STENCIL_VALUE_MASK = $0B93;
- GL_STENCIL_WRITEMASK = $0B98;
- GL_STENCIL_BACK_FUNC = $8800;
- GL_STENCIL_BACK_FAIL = $8801;
- GL_STENCIL_BACK_PASS_DEPTH_FAIL = $8802;
- GL_STENCIL_BACK_PASS_DEPTH_PASS = $8803;
- GL_STENCIL_BACK_REF = $8CA3;
- GL_STENCIL_BACK_VALUE_MASK = $8CA4;
- GL_STENCIL_BACK_WRITEMASK = $8CA5;
- GL_VIEWPORT = $0BA2;
- GL_SCISSOR_BOX = $0C10;
- { GL_SCISSOR_TEST }
- GL_COLOR_CLEAR_VALUE = $0C22;
- GL_COLOR_WRITEMASK = $0C23;
- GL_UNPACK_ALIGNMENT = $0CF5;
- GL_PACK_ALIGNMENT = $0D05;
- GL_MAX_TEXTURE_SIZE = $0D33;
- GL_MAX_VIEWPORT_DIMS = $0D3A;
- GL_SUBPIXEL_BITS = $0D50;
- GL_RED_BITS = $0D52;
- GL_GREEN_BITS = $0D53;
- GL_BLUE_BITS = $0D54;
- GL_ALPHA_BITS = $0D55;
- GL_DEPTH_BITS = $0D56;
- GL_STENCIL_BITS = $0D57;
- GL_POLYGON_OFFSET_UNITS = $2A00;
- { GL_POLYGON_OFFSET_FILL }
- GL_POLYGON_OFFSET_FACTOR = $8038;
- GL_TEXTURE_BINDING_2D = $8069;
- GL_SAMPLE_BUFFERS = $80A8;
- GL_SAMPLES = $80A9;
- GL_SAMPLE_COVERAGE_VALUE = $80AA;
- GL_SAMPLE_COVERAGE_INVERT = $80AB;
- { GetTextureParameter }
- { GL_TEXTURE_MAG_FILTER }
- { GL_TEXTURE_MIN_FILTER }
- { GL_TEXTURE_WRAP_S }
- { GL_TEXTURE_WRAP_T }
- GL_NUM_COMPRESSED_TEXTURE_FORMATS =$86A2;
- GL_COMPRESSED_TEXTURE_FORMATS =$86A3;
- { HintMode }
- GL_DONT_CARE = $1100;
- GL_FASTEST = $1101;
- GL_NICEST = $1102;
- { HintTarget }
- GL_GENERATE_MIPMAP_HINT = $8192;
- { DataType }
- GL_BYTE = $1400;
- GL_UNSIGNED_BYTE = $1401;
- GL_SHORT = $1402;
- GL_UNSIGNED_SHORT = $1403;
- GL_INT = $1404;
- GL_UNSIGNED_INT = $1405;
- GL_FLOAT = $1406;
- GL_FIXED = $140C;
- { PixelFormat }
- GL_DEPTH_COMPONENT = $1902;
- GL_ALPHA = $1906;
- GL_RGB = $1907;
- GL_RGBA = $1908;
- GL_LUMINANCE = $1909;
- GL_LUMINANCE_ALPHA = $190A;
- { PixelType }
- { GL_UNSIGNED_BYTE }
- GL_UNSIGNED_SHORT_4_4_4_4 = $8033;
- GL_UNSIGNED_SHORT_5_5_5_1 = $8034;
- GL_UNSIGNED_SHORT_5_6_5 = $8363;
- { Shaders }
- GL_FRAGMENT_SHADER = $8B30;
- GL_VERTEX_SHADER = $8B31;
- GL_MAX_VERTEX_ATTRIBS = $8869;
- GL_MAX_VERTEX_UNIFORM_VECTORS = $8DFB;
- GL_MAX_VARYING_VECTORS = $8DFC;
- GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS =$8B4D;
- GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS = $8B4C;
- GL_MAX_TEXTURE_IMAGE_UNITS = $8872;
- GL_MAX_FRAGMENT_UNIFORM_VECTORS = $8DFD;
- GL_SHADER_TYPE = $8B4F;
- GL_DELETE_STATUS = $8B80;
- GL_LINK_STATUS = $8B82;
- GL_VALIDATE_STATUS = $8B83;
- GL_ATTACHED_SHADERS = $8B85;
- GL_ACTIVE_UNIFORMS = $8B86;
- GL_ACTIVE_UNIFORM_MAX_LENGTH = $8B87;
- GL_ACTIVE_ATTRIBUTES = $8B89;
- GL_ACTIVE_ATTRIBUTE_MAX_LENGTH = $8B8A;
- GL_SHADING_LANGUAGE_VERSION = $8B8C;
- GL_CURRENT_PROGRAM = $8B8D;
- { StencilFunction }
- GL_NEVER = $0200;
- GL_LESS = $0201;
- GL_EQUAL = $0202;
- GL_LEQUAL = $0203;
- GL_GREATER = $0204;
- GL_NOTEQUAL = $0205;
- GL_GEQUAL = $0206;
- GL_ALWAYS = $0207;
- { StencilOp }
- { GL_ZERO }
- GL_KEEP = $1E00;
- GL_REPLACE = $1E01;
- GL_INCR = $1E02;
- GL_DECR = $1E03;
- GL_INVERT = $150A;
- GL_INCR_WRAP = $8507;
- GL_DECR_WRAP = $8508;
- { StringName }
- GL_VENDOR = $1F00;
- GL_RENDERER = $1F01;
- GL_VERSION = $1F02;
- GL_EXTENSIONS = $1F03;
- { TextureMagFilter }
- GL_NEAREST = $2600;
- GL_LINEAR = $2601;
- { TextureMinFilter }
- { GL_NEAREST }
- { GL_LINEAR }
- GL_NEAREST_MIPMAP_NEAREST = $2700;
- GL_LINEAR_MIPMAP_NEAREST = $2701;
- GL_NEAREST_MIPMAP_LINEAR = $2702;
- GL_LINEAR_MIPMAP_LINEAR = $2703;
- { TextureParameterName }
- GL_TEXTURE_MAG_FILTER = $2800;
- GL_TEXTURE_MIN_FILTER = $2801;
- GL_TEXTURE_WRAP_S = $2802;
- GL_TEXTURE_WRAP_T = $2803;
- { TextureTarget }
- { GL_TEXTURE_2D }
- GL_TEXTURE = $1702;
- GL_TEXTURE_CUBE_MAP = $8513;
- GL_TEXTURE_BINDING_CUBE_MAP = $8514;
- GL_TEXTURE_CUBE_MAP_POSITIVE_X = $8515;
- GL_TEXTURE_CUBE_MAP_NEGATIVE_X = $8516;
- GL_TEXTURE_CUBE_MAP_POSITIVE_Y = $8517;
- GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = $8518;
- GL_TEXTURE_CUBE_MAP_POSITIVE_Z = $8519;
- GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = $851A;
- GL_MAX_CUBE_MAP_TEXTURE_SIZE = $851C;
- { TextureUnit }
- GL_TEXTURE0 = $84C0;
- GL_TEXTURE1 = $84C1;
- GL_TEXTURE2 = $84C2;
- GL_TEXTURE3 = $84C3;
- GL_TEXTURE4 = $84C4;
- GL_TEXTURE5 = $84C5;
- GL_TEXTURE6 = $84C6;
- GL_TEXTURE7 = $84C7;
- GL_TEXTURE8 = $84C8;
- GL_TEXTURE9 = $84C9;
- GL_TEXTURE10 = $84CA;
- GL_TEXTURE11 = $84CB;
- GL_TEXTURE12 = $84CC;
- GL_TEXTURE13 = $84CD;
- GL_TEXTURE14 = $84CE;
- GL_TEXTURE15 = $84CF;
- GL_TEXTURE16 = $84D0;
- GL_TEXTURE17 = $84D1;
- GL_TEXTURE18 = $84D2;
- GL_TEXTURE19 = $84D3;
- GL_TEXTURE20 = $84D4;
- GL_TEXTURE21 = $84D5;
- GL_TEXTURE22 = $84D6;
- GL_TEXTURE23 = $84D7;
- GL_TEXTURE24 = $84D8;
- GL_TEXTURE25 = $84D9;
- GL_TEXTURE26 = $84DA;
- GL_TEXTURE27 = $84DB;
- GL_TEXTURE28 = $84DC;
- GL_TEXTURE29 = $84DD;
- GL_TEXTURE30 = $84DE;
- GL_TEXTURE31 = $84DF;
- GL_ACTIVE_TEXTURE = $84E0;
- { TextureWrapMode }
- GL_REPEAT = $2901;
- GL_CLAMP_TO_EDGE = $812F;
- GL_MIRRORED_REPEAT = $8370;
- { Uniform Types }
- GL_FLOAT_VEC2 = $8B50;
- GL_FLOAT_VEC3 = $8B51;
- GL_FLOAT_VEC4 = $8B52;
- GL_INT_VEC2 = $8B53;
- GL_INT_VEC3 = $8B54;
- GL_INT_VEC4 = $8B55;
- GL_BOOL = $8B56;
- GL_BOOL_VEC2 = $8B57;
- GL_BOOL_VEC3 = $8B58;
- GL_BOOL_VEC4 = $8B59;
- GL_FLOAT_MAT2 = $8B5A;
- GL_FLOAT_MAT3 = $8B5B;
- GL_FLOAT_MAT4 = $8B5C;
- GL_SAMPLER_2D = $8B5E;
- GL_SAMPLER_CUBE = $8B60;
- { Vertex Arrays }
- GL_VERTEX_ATTRIB_ARRAY_ENABLED = $8622;
- GL_VERTEX_ATTRIB_ARRAY_SIZE = $8623;
- GL_VERTEX_ATTRIB_ARRAY_STRIDE = $8624;
- GL_VERTEX_ATTRIB_ARRAY_TYPE = $8625;
- GL_VERTEX_ATTRIB_ARRAY_NORMALIZED = $886A;
- GL_VERTEX_ATTRIB_ARRAY_POINTER = $8645;
- GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING =$889F;
- { Read Format }
- GL_IMPLEMENTATION_COLOR_READ_TYPE = $8B9A;
- GL_IMPLEMENTATION_COLOR_READ_FORMAT =$8B9B;
- { Shader Source }
- GL_COMPILE_STATUS = $8B81;
- GL_INFO_LOG_LENGTH = $8B84;
- GL_SHADER_SOURCE_LENGTH = $8B88;
- GL_SHADER_COMPILER = $8DFA;
- { Shader Binary }
- GL_SHADER_BINARY_FORMATS = $8DF8;
- GL_NUM_SHADER_BINARY_FORMATS = $8DF9;
- { Shader Precision-Specified Types }
- GL_LOW_FLOAT = $8DF0;
- GL_MEDIUM_FLOAT = $8DF1;
- GL_HIGH_FLOAT = $8DF2;
- GL_LOW_INT = $8DF3;
- GL_MEDIUM_INT = $8DF4;
- GL_HIGH_INT = $8DF5;
- { Framebuffer Object. }
- GL_FRAMEBUFFER = $8D40;
- GL_RENDERBUFFER = $8D41;
- GL_RGBA4 = $8056;
- GL_RGB5_A1 = $8057;
- GL_RGB565 = $8D62;
- GL_DEPTH_COMPONENT16 = $81A5;
- GL_STENCIL_INDEX = $1901;
- GL_STENCIL_INDEX8 = $8D48;
- GL_RENDERBUFFER_WIDTH = $8D42;
- GL_RENDERBUFFER_HEIGHT = $8D43;
- GL_RENDERBUFFER_INTERNAL_FORMAT = $8D44;
- GL_RENDERBUFFER_RED_SIZE = $8D50;
- GL_RENDERBUFFER_GREEN_SIZE = $8D51;
- GL_RENDERBUFFER_BLUE_SIZE = $8D52;
- GL_RENDERBUFFER_ALPHA_SIZE = $8D53;
- GL_RENDERBUFFER_DEPTH_SIZE = $8D54;
- GL_RENDERBUFFER_STENCIL_SIZE = $8D55;
- GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = $8CD0;
- GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = $8CD1;
- GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = $8CD2;
- GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE =$8CD3;
- GL_COLOR_ATTACHMENT0 = $8CE0;
- GL_DEPTH_ATTACHMENT = $8D00;
- GL_STENCIL_ATTACHMENT = $8D20;
- GL_NONE = 0;
- GL_FRAMEBUFFER_COMPLETE = $8CD5;
- GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = $8CD6;
- GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT =$8CD7;
- GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS = $8CD9;
- GL_FRAMEBUFFER_UNSUPPORTED = $8CDD;
- GL_FRAMEBUFFER_BINDING = $8CA6;
- GL_RENDERBUFFER_BINDING = $8CA7;
- GL_MAX_RENDERBUFFER_SIZE = $84E8;
- GL_INVALID_FRAMEBUFFER_OPERATION= $0506;
-
- var
- {-------------------------------------------------------------------------
- * GL core functions.
- *-----------------------------------------------------------------------}
-
- glActiveTexture: procedure (texture: GLenum); extdecl;
- glAttachShader: procedure (prog: GLuint; shader: GLuint); extdecl;
- glBindAttribLocation: procedure (prog: GLuint; index: GLuint; name: pchar); extdecl;
- glBindBuffer: procedure (target: GLenum; buffer: GLuint); extdecl;
- glBindFramebuffer: procedure (target: GLenum; framebuffer: GLuint); extdecl;
- glBindRenderbuffer: procedure (target: GLenum; renderbuffer: GLuint); extdecl;
- glBindTexture: procedure (target: GLenum; texture: GLuint); extdecl;
- glBlendColor: procedure (red: GLclampf; green: GLclampf; blue: GLclampf; alpha: GLclampf); extdecl;
- glBlendEquation: procedure (mode: GLenum); extdecl;
- glBlendEquationSeparate: procedure (modeRGB: GLenum; modeAlpha: GLenum); extdecl;
- glBlendFunc: procedure (sfactor: GLenum; dfactor: GLenum); extdecl;
- glBlendFuncSeparate: procedure (srcRGB: GLenum; dstRGB: GLenum; srcAlpha: GLenum; dstAlpha: GLenum); extdecl;
- glBufferData: procedure (target: GLenum; size: GLsizeiptr; data: pointer; usage: GLenum); extdecl;
- glBufferSubData: procedure (target: GLenum; offset: GLintptr; size: GLsizeiptr; data: pointer); extdecl;
- glCheckFramebufferStatus: function (target: GLenum): GLenum; extdecl;
- glClear: procedure (mask: GLbitfield); extdecl;
- glClearColor: procedure (red: GLclampf; green: GLclampf; blue: GLclampf; alpha: GLclampf); extdecl;
- glClearDepthf: procedure (depth: GLclampf); extdecl;
- glClearStencil: procedure (s: GLint); extdecl;
- glColorMask: procedure (red: GLboolean; green: GLboolean; blue: GLboolean; alpha: GLboolean); extdecl;
- glCompileShader: procedure (shader: GLuint); extdecl;
- glCompressedTexImage2D: procedure (target: GLenum; level: GLint; internalformat: GLenum; width: GLsizei; height: GLsizei; border: GLint; imageSize: GLsizei; data: pointer); extdecl;
- glCompressedTexSubImage2D: procedure (target: GLenum; level: GLint; xoffset: GLint; yoffset: GLint; width: GLsizei; height: GLsizei; format: GLenum; imageSize: GLsizei; data: pointer); extdecl;
- glCopyTexImage2D: procedure (target: GLenum; level: GLint; internalformat: GLenum; x: GLint; y: GLint; width: GLsizei; height: GLsizei; border: GLint); extdecl;
- glCopyTexSubImage2D: procedure (target: GLenum; level: GLint; xoffset: GLint; yoffset: GLint; x: GLint; y: GLint; width: GLsizei; height: GLsizei); extdecl;
- glCreateProgram: function: GLuint; extdecl;
- glCreateShader: function (typ: GLenum): GLuint; extdecl;
- glCullFace: procedure (mode: GLenum); extdecl;
- glDeleteBuffers: procedure (n: GLsizei; const buffers: PGLuint); extdecl;
- glDeleteFramebuffers: procedure (n: GLsizei; const framebuffers: PGLuint); extdecl;
- glDeleteProgram: procedure (prog: GLuint); extdecl;
- glDeleteRenderbuffers: procedure (n: GLsizei; const renderbuffers: PGLuint); extdecl;
- glDeleteShader: procedure (shader: GLuint); extdecl;
- glDeleteTextures: procedure (n: GLsizei; const textures: PGLuint); extdecl;
- glDepthFunc: procedure (func: GLenum); extdecl;
- glDepthMask: procedure (flag: GLboolean); extdecl;
- glDepthRangef: procedure (zNear: GLclampf; zFar: GLclampf); extdecl;
- glDetachShader: procedure (prog: GLuint; shader: GLuint); extdecl;
- glDisable: procedure (cap: GLenum); extdecl;
- glDisableVertexAttribArray: procedure (index: GLuint); extdecl;
- glDrawArrays: procedure (mode: GLenum; first: GLint; count: GLsizei); extdecl;
- glDrawElements: procedure (mode: GLenum; count: GLsizei; typ: GLenum; const indices: PGLuint); extdecl;
- glEnable: procedure (cap: GLenum); extdecl;
- glEnableVertexAttribArray: procedure (index: GLuint); extdecl;
- glFinish: procedure; extdecl;
- glFlush: procedure; extdecl;
- glFramebufferRenderbuffer: procedure (target: GLenum; attachment: GLenum; renderbuffertarget: GLenum; renderbuffer: GLuint); extdecl;
- glFramebufferTexture2D: procedure (target: GLenum; attachment: GLenum; textarget: GLenum; texture: GLuint; level: GLint); extdecl;
- glFrontFace: procedure (mode: GLenum); extdecl;
- glGenBuffers: procedure (n: GLsizei; buffers: PGLuint); extdecl;
- glGenerateMipmap: procedure (target: GLenum); extdecl;
- glGenFramebuffers: procedure (n: GLsizei; framebuffers: PGLuint); extdecl;
- glGenRenderbuffers: procedure (n: GLsizei; renderbuffers: PGLuint); extdecl;
- glGenTextures: procedure (n: GLsizei; textures: PGLuint); extdecl;
- glGetActiveAttrib: procedure (prog: GLuint; index: GLuint; bufsize: GLsizei; length: PGLsizei; size: PGLint; typ: PGLenum; name: pchar); extdecl;
- glGetActiveUniform: procedure (prog: GLuint; index: GLuint; bufsize: GLsizei; length: PGLsizei; size: PGLint; typ: PGLenum; name: pchar); extdecl;
- glGetAttachedShaders: procedure (prog: GLuint; maxcount: GLsizei; count: PGLsizei; shaders: GLuint); extdecl;
- glGetAttribLocation: function (prog: GLuint; name: pchar): integer; extdecl;
- glGetBooleanv: procedure (pname: GLenum; params: PGLboolean); extdecl;
- glGetBufferParameteriv: procedure (target: GLenum; pname: GLenum; params: PGLint); extdecl;
- glGetError: function: GLenum; extdecl;
- glGetFloatv: procedure (pname: GLenum; params: PGLfloat); extdecl;
- glGetFramebufferAttachmentParameteriv: procedure (target: GLenum; attachment: GLenum; pname: GLenum; params: PGLint); extdecl;
- glGetIntegerv: procedure (pname: GLenum; params: PGLint); extdecl;
- glGetProgramiv: procedure (prog: GLuint; pname: GLenum; params: PGLint); extdecl;
- glGetProgramInfoLog: procedure (prog: GLuint; bufsize: GLsizei; length: PGLsizei; infolog: pchar); extdecl;
- glGetRenderbufferParameteriv: procedure (target: GLenum; pname: GLenum; params: PGLint); extdecl;
- glGetShaderiv: procedure (shader: GLuint; pnname: GLenum; params: PGLint); extdecl;
- glGetShaderInfoLog: procedure (shader: GLuint; bufsize: GLsizei; length: PGLsizei; infolog: pchar); extdecl;
- glGetShaderPrecisionFormat: procedure (shadertype: GLenum; precisiontype: GLenum; range: PGLint; precision: PGLint); extdecl;
- glGetShaderSource: procedure (shader: GLuint; bufsize: GLsizei; length: PGLsizei; source: pchar); extdecl;
- glGetString: function (name: GLenum): pchar; extdecl;
- glGetTexParameterfv: procedure (target: GLenum; pname: GLenum; params: PGLfloat); extdecl;
- glGetTexParameteriv: procedure (target: GLenum; pname: GLenum; params: GLint); extdecl;
- glGetUniformfv: procedure (prog: GLuint; location: GLint; params: PGLfloat); extdecl;
- glGetUniformiv: procedure (prog: GLuint; location: GLint; params: PGLint); extdecl;
- glGetUniformLocation: function (prog: GLuint; name: pchar): integer; extdecl;
- glGetVertexAttribfv: procedure (index: GLuint; pname: GLenum; params: PGLfloat); extdecl;
- glGetVertexAttribiv: procedure (index: GLuint; pname: GLenum; params: PGLint); extdecl;
- glGetVertexAttribPointerv: procedure (index: GLuint; pname: GLenum; data: pointer); extdecl;
- glHint: procedure (target: GLenum; mode: GLenum); extdecl;
- glIsBuffer: function (buffer: GLuint): GLboolean; extdecl;
- glIsEnabled: function (cap: GLenum): GLboolean; extdecl;
- glIsFramebuffer: function (framebuffer: GLuint): GLboolean; extdecl;
- glIsProgram: function (prog: GLuint): GLboolean; extdecl;
- glIsRenderbuffer: function (renderbuffer: GLuint): GLboolean; extdecl;
- glIsShader: function (shader: GLuint): GLboolean; extdecl;
- glIsTexture: function (texture: GLuint): GLboolean; extdecl;
- glLineWidth: procedure (width: GLfloat); extdecl;
- glLinkProgram: procedure (prog: GLuint); extdecl;
- glPixelStorei: procedure (pname: GLenum; param: GLint); extdecl;
- glPolygonOffset: procedure (factor: GLfloat; units: GLfloat); extdecl;
- glReadPixels: procedure (x: GLint; y: GLint; width: GLsizei; height: GLsizei; format: GLenum; typ: GLenum; pixels: pointer); extdecl;
- glReleaseShaderCompiler: procedure ; extdecl;
- glRenderbufferStorage: procedure (target: GLenum; internalformat: GLenum; width: GLsizei; height: GLsizei); extdecl;
- glSampleCoverage: procedure (value: GLclampf; invert: GLboolean); extdecl;
- glScissor: procedure (x: GLint; y: GLint; width: GLsizei; height: GLsizei); extdecl;
- glShaderBinary: procedure (n: GLsizei; shaders: PGLuint; binaryformat: GLenum; binary: pointer; length: GLsizei); extdecl;
- glShaderSource: procedure (shader: GLuint; count: GLsizei; str: ppchar; length: PGLint); extdecl;
- glStencilFunc: procedure (func: GLenum; ref: GLint; mask: GLuint); extdecl;
- glStencilFuncSeparate: procedure (face: GLenum; func: GLenum; ref: GLint; mask: GLuint); extdecl;
- glStencilMask: procedure (mask: GLuint); extdecl;
- glStencilMaskSeparate: procedure (face: GLenum; mask: GLuint); extdecl;
- glStencilOp: procedure (fail: GLenum; zfail: GLenum; zpass: GLenum); extdecl;
- glStencilOpSeparate: procedure (face: GLenum; fail: GLenum; zfail: GLenum; zpass: GLenum); extdecl;
- glTexImage2D: procedure (target: GLenum; level: GLint; internalformat: GLint; width: GLsizei; height: GLsizei; border: GLint; format: GLenum; typ: GLenum; pixels: pointer); extdecl;
- glTexParameterf: procedure (target: GLenum; pname: GLenum; param: GLfloat); extdecl;
- glTexParameterfv: procedure (target: GLenum; pname: GLenum; const params: PGLfloat); extdecl;
- glTexParameteri: procedure (target: GLenum; pname: GLenum; param: GLint); extdecl;
- glTexParameteriv: procedure (target: GLenum; pname: GLenum; const params: PGLint); extdecl;
- glTexSubImage2D: procedure (target: GLenum; level: GLint; xoffset: GLint; yoffset: GLint; width: GLsizei; height: GLsizei; format: GLenum; typ: GLenum; const pixels: pointer); extdecl;
- glUniform1f: procedure (location: GLint; x: GLfloat); extdecl;
- glUniform1fv: procedure (location: GLint; count: GLsizei; const v: PGLfloat); extdecl;
- glUniform1i: procedure (location: GLint; x: GLint); extdecl;
- glUniform1iv: procedure (location: GLint; count: GLsizei; const v: PGLint); extdecl;
- glUniform2f: procedure (location: GLint; x: GLfloat; y: GLfloat); extdecl;
- glUniform2fv: procedure (location: GLint; count: GLsizei; const v: PGLfloat); extdecl;
- glUniform2i: procedure (location: GLint; x: GLint; y: GLint); extdecl;
- glUniform2iv: procedure (location: GLint; count: GLsizei; const v: PGLint); extdecl;
- glUniform3f: procedure (location: GLint; x: GLfloat; y: GLfloat; z: GLfloat); extdecl;
- glUniform3fv: procedure (location: GLint; count: GLsizei; const v: PGLfloat); extdecl;
- glUniform3i: procedure (location: GLint; x: GLint; y: GLint; z: GLint); extdecl;
- glUniform3iv: procedure (location: GLint; count: GLsizei; const v: GLint); extdecl;
- glUniform4f: procedure (location: GLint; x: GLfloat; y: GLfloat; z: GLfloat; w: GLfloat); extdecl;
- glUniform4fv: procedure (location: GLint; count: GLsizei; const v: PGLfloat); extdecl;
- glUniform4i: procedure (location: GLint; x: GLint; y: GLint; z: GLint; w: GLint); extdecl;
- glUniform4iv: procedure (location: GLint; count: GLsizei; const v: PGLint); extdecl;
- glUniformMatrix2fv: procedure (location: GLint; count: GLsizei; transpose: GLboolean; const value: PGLfloat); extdecl;
- glUniformMatrix3fv: procedure (location: GLint; count: GLsizei; transpose: GLboolean; const value: PGLfloat); extdecl;
- glUniformMatrix4fv: procedure (location: GLint; count: GLsizei; transpose: GLboolean; const value: PGLfloat); extdecl;
- glUseProgram: procedure (prog: GLuint); extdecl;
- glValidateProgram: procedure (prog: GLuint); extdecl;
- glVertexAttrib1f: procedure (indx: GLuint; x: GLfloat); extdecl;
- glVertexAttrib1fv: procedure (indx: GLuint; const values: PGLfloat); extdecl;
- glVertexAttrib2f: procedure (indx: GLuint; x: GLfloat; y: GLfloat); extdecl;
- glVertexAttrib2fv: procedure (indx: GLuint; const values: PGLfloat); extdecl;
- glVertexAttrib3f: procedure (indx: GLuint; x: GLfloat; y: GLfloat; z: GLfloat); extdecl;
- glVertexAttrib3fv: procedure (indx: GLuint; const values: PGLfloat); extdecl;
- glVertexAttrib4f: procedure (indx: GLuint; x: GLfloat; y: GLfloat; z: GLfloat; w: GLfloat); extdecl;
- glVertexAttrib4fv: procedure (indx: GLuint; const values: PGLfloat); extdecl;
- glVertexAttribPointer: procedure (indx: GLuint; size: GLint; typ: GLenum; normalized: GLboolean; stride: GLsizei; const ptr: pointer); extdecl;
- glViewport: procedure (x: GLint; y: GLint; width: GLsizei; height: GLsizei); extdecl;
- function gles_GetProcAddress(name: pchar): pointer;
- function InitOpenGL(extrafunctions: boolean): string;
- var GetProcAddress: function (name: pchar): pointer = @gles_GetProcAddress;
- implementation
- uses dynlibs, sysutils;
- var gles_lib: TLibHandle;
- const gles_libname = 'libGLESv2.so';
- procedure initialize_gles;
- begin
- (*if fileexists(gles_libname)
- then gles_lib:=LoadLibrary(gles_libname)
- else gles_lib:=LoadLibrary('libGL.so.1');*)
- gles_lib:=LoadLibrary(gles_libname);
- if gles_lib=nilhandle then writeln(stderr, 'cannot find GL library');
- end;
- function gles_GetProcAddress(name: pchar): pointer;
- begin
- result:=GetProcedureAddress(gles_lib, name);
- end;
- function InitOpenGL(extrafunctions: boolean): string;
- begin
- initialize_gles;
- glActiveTexture:=GetProcAddress('glActiveTexture'); if @glActiveTexture=nil then Exit('Error loading GL ES 2.0: Function not found "glActiveTexture"');
- glAttachShader:=GetProcAddress('glAttachShader'); if @glAttachShader=nil then Exit('Error loading GL ES 2.0: Function not found "glAttachShader"');
- glBindAttribLocation:=GetProcAddress('glBindAttribLocation'); if @glBindAttribLocation=nil then Exit('Error loading GL ES 2.0: Function not found "glBindAttribLocation"');
- glBindBuffer:=GetProcAddress('glBindBuffer'); if @glBindBuffer=nil then Exit('Error loading GL ES 2.0: Function not found "glBindBuffer"');
- glBindFramebuffer:=GetProcAddress('glBindFramebuffer'); if @glBindFramebuffer=nil then Exit('Error loading GL ES 2.0: Function not found "glBindFramebuffer"');
- glBindRenderbuffer:=GetProcAddress('glBindRenderbuffer'); if @glBindRenderbuffer=nil then Exit('Error loading GL ES 2.0: Function not found "glBindRenderbuffer"');
- glBindTexture:=GetProcAddress('glBindTexture'); if @glBindTexture=nil then Exit('Error loading GL ES 2.0: Function not found "glBindTexture"');
- glBlendColor:=GetProcAddress('glBlendColor'); if @glBlendColor=nil then Exit('Error loading GL ES 2.0: Function not found "glBlendColor"');
- glBlendEquation:=GetProcAddress('glBlendEquation'); if @glBlendEquation=nil then Exit('Error loading GL ES 2.0: Function not found "glBlendEquation"');
- glBlendEquationSeparate:=GetProcAddress('glBlendEquationSeparate'); if @glBlendEquationSeparate=nil then Exit('Error loading GL ES 2.0: Function not found "glBlendEquationSeparate"');
- glBlendFunc:=GetProcAddress('glBlendFunc'); if @glBlendFunc=nil then Exit('Error loading GL ES 2.0: Function not found "glBlendFunc"');
- glBlendFuncSeparate:=GetProcAddress('glBlendFuncSeparate'); if @glBlendFuncSeparate=nil then Exit('Error loading GL ES 2.0: Function not found "glBlendFuncSeparate"');
- glBufferData:=GetProcAddress('glBufferData'); if @glBufferData=nil then Exit('Error loading GL ES 2.0: Function not found "glBufferData"');
- glBufferSubData:=GetProcAddress('glBufferSubData'); if @glBufferSubData=nil then Exit('Error loading GL ES 2.0: Function not found "glBufferSubData"');
- glCheckFramebufferStatus:=GetProcAddress('glCheckFramebufferStatus'); if @glCheckFramebufferStatus=nil then Exit('Error loading GL ES 2.0: Function not found "glCheckFramebufferStatus"');
- glClear:=GetProcAddress('glClear'); if @glClear=nil then Exit('Error loading GL ES 2.0: Function not found "glClear"');
- glClearColor:=GetProcAddress('glClearColor'); if @glClearColor=nil then Exit('Error loading GL ES 2.0: Function not found "glClearColor"');
- if extrafunctions then begin
- glClearDepthf:=GetProcAddress('glClearDepthf'); if @glClearDepthf=nil then Exit('Error loading GL ES 2.0: Function not found "glClearDepthf"');
- end;
- glClearStencil:=GetProcAddress('glClearStencil'); if @glClearStencil=nil then Exit('Error loading GL ES 2.0: Function not found "glClearStencil"');
- glColorMask:=GetProcAddress('glColorMask'); if @glColorMask=nil then Exit('Error loading GL ES 2.0: Function not found "glColorMask"');
- glCompileShader:=GetProcAddress('glCompileShader'); if @glCompileShader=nil then Exit('Error loading GL ES 2.0: Function not found "glCompileShader"');
- glCompressedTexImage2D:=GetProcAddress('glCompressedTexImage2D'); if @glCompressedTexImage2D=nil then Exit('Error loading GL ES 2.0: Function not found "glCompressedTexImage2D"');
- glCompressedTexSubImage2D:=GetProcAddress('glCompressedTexSubImage2D'); if @glCompressedTexSubImage2D=nil then Exit('Error loading GL ES 2.0: Function not found "glCompressedTexSubImage2D"');
- glCopyTexImage2D:=GetProcAddress('glCopyTexImage2D'); if @glCopyTexImage2D=nil then Exit('Error loading GL ES 2.0: Function not found "glCopyTexImage2D"');
- glCopyTexSubImage2D:=GetProcAddress('glCopyTexSubImage2D'); if @glCopyTexSubImage2D=nil then Exit('Error loading GL ES 2.0: Function not found "glCopyTexSubImage2D"');
- glCreateProgram:=GetProcAddress('glCreateProgram'); if @glCreateProgram=nil then Exit('Error loading GL ES 2.0: Function not found "glCreateProgram"');
- glCreateShader:=GetProcAddress('glCreateShader'); if @glCreateShader=nil then Exit('Error loading GL ES 2.0: Function not found "glCreateShader"');
- glCullFace:=GetProcAddress('glCullFace'); if @glCullFace=nil then Exit('Error loading GL ES 2.0: Function not found "glCullFace"');
- glDeleteBuffers:=GetProcAddress('glDeleteBuffers'); if @glDeleteBuffers=nil then Exit('Error loading GL ES 2.0: Function not found "glDeleteBuffers"');
- glDeleteFramebuffers:=GetProcAddress('glDeleteFramebuffers'); if @glDeleteFramebuffers=nil then Exit('Error loading GL ES 2.0: Function not found "glDeleteFramebuffers"');
- glDeleteProgram:=GetProcAddress('glDeleteProgram'); if @glDeleteProgram=nil then Exit('Error loading GL ES 2.0: Function not found "glDeleteProgram"');
- glDeleteRenderbuffers:=GetProcAddress('glDeleteRenderbuffers'); if @glDeleteRenderbuffers=nil then Exit('Error loading GL ES 2.0: Function not found "glDeleteRenderbuffers"');
- glDeleteShader:=GetProcAddress('glDeleteShader'); if @glDeleteShader=nil then Exit('Error loading GL ES 2.0: Function not found "glDeleteShader"');
- glDeleteTextures:=GetProcAddress('glDeleteTextures'); if @glDeleteTextures=nil then Exit('Error loading GL ES 2.0: Function not found "glDeleteTextures"');
- glDepthFunc:=GetProcAddress('glDepthFunc'); if @glDepthFunc=nil then Exit('Error loading GL ES 2.0: Function not found "glDepthFunc"');
- glDepthMask:=GetProcAddress('glDepthMask'); if @glDepthMask=nil then Exit('Error loading GL ES 2.0: Function not found "glDepthMask"');
- if extrafunctions then begin
- glDepthRangef:=GetProcAddress('glDepthRangef'); if @glDepthRangef=nil then Exit('Error loading GL ES 2.0: Function not found "glDepthRangef"');
- end;
- glDetachShader:=GetProcAddress('glDetachShader'); if @glDetachShader=nil then Exit('Error loading GL ES 2.0: Function not found "glDetachShader"');
- glDisable:=GetProcAddress('glDisable'); if @glDisable=nil then Exit('Error loading GL ES 2.0: Function not found "glDisable"');
- glDisableVertexAttribArray:=GetProcAddress('glDisableVertexAttribArray'); if @glDisableVertexAttribArray=nil then Exit('Error loading GL ES 2.0: Function not found "glDisableVertexAttribArray"');
- glDrawArrays:=GetProcAddress('glDrawArrays'); if @glDrawArrays=nil then Exit('Error loading GL ES 2.0: Function not found "glDrawArrays"');
- glDrawElements:=GetProcAddress('glDrawElements'); if @glDrawElements=nil then Exit('Error loading GL ES 2.0: Function not found "glDrawElements"');
- glEnable:=GetProcAddress('glEnable'); if @glEnable=nil then Exit('Error loading GL ES 2.0: Function not found "glEnable"');
- glEnableVertexAttribArray:=GetProcAddress('glEnableVertexAttribArray'); if @glEnableVertexAttribArray=nil then Exit('Error loading GL ES 2.0: Function not found "glEnableVertexAttribArray"');
- glFinish:=GetProcAddress('glFinish'); if @glFinish=nil then Exit('Error loading GL ES 2.0: Function not found "glFinish"');
- glFlush:=GetProcAddress('glFlush'); if @glFlush=nil then Exit('Error loading GL ES 2.0: Function not found "glFlush"');
- glFramebufferRenderbuffer:=GetProcAddress('glFramebufferRenderbuffer'); if @glFramebufferRenderbuffer=nil then Exit('Error loading GL ES 2.0: Function not found "glFramebufferRenderbuffer"');
- glFramebufferTexture2D:=GetProcAddress('glFramebufferTexture2D'); if @glFramebufferTexture2D=nil then Exit('Error loading GL ES 2.0: Function not found "glFramebufferTexture2D"');
- glFrontFace:=GetProcAddress('glFrontFace'); if @glFrontFace=nil then Exit('Error loading GL ES 2.0: Function not found "glFrontFace"');
- glGenBuffers:=GetProcAddress('glGenBuffers'); if @glGenBuffers=nil then Exit('Error loading GL ES 2.0: Function not found "glGenBuffers"');
- glGenerateMipmap:=GetProcAddress('glGenerateMipmap'); if @glGenerateMipmap=nil then Exit('Error loading GL ES 2.0: Function not found "glGenerateMipmap"');
- glGenFramebuffers:=GetProcAddress('glGenFramebuffers'); if @glGenFramebuffers=nil then Exit('Error loading GL ES 2.0: Function not found "glGenFramebuffers"');
- glGenRenderbuffers:=GetProcAddress('glGenRenderbuffers'); if @glGenRenderbuffers=nil then Exit('Error loading GL ES 2.0: Function not found "glGenRenderbuffers"');
- glGenTextures:=GetProcAddress('glGenTextures'); if @glGenTextures=nil then Exit('Error loading GL ES 2.0: Function not found "glGenTextures"');
- glGetActiveAttrib:=GetProcAddress('glGetActiveAttrib'); if @glGetActiveAttrib=nil then Exit('Error loading GL ES 2.0: Function not found "glGetActiveAttrib"');
- glGetActiveUniform:=GetProcAddress('glGetActiveUniform'); if @glGetActiveUniform=nil then Exit('Error loading GL ES 2.0: Function not found "glGetActiveUniform"');
- glGetAttachedShaders:=GetProcAddress('glGetAttachedShaders'); if @glGetAttachedShaders=nil then Exit('Error loading GL ES 2.0: Function not found "glGetAttachedShaders"');
- glGetAttribLocation:=GetProcAddress('glGetAttribLocation'); if @glGetAttribLocation=nil then Exit('Error loading GL ES 2.0: Function not found "glGetAttribLocation"');
- glGetBooleanv:=GetProcAddress('glGetBooleanv'); if @glGetBooleanv=nil then Exit('Error loading GL ES 2.0: Function not found "glGetBooleanv"');
- glGetBufferParameteriv:=GetProcAddress('glGetBufferParameteriv'); if @glGetBufferParameteriv=nil then Exit('Error loading GL ES 2.0: Function not found "glGetBufferParameteriv"');
- glGetError:=GetProcAddress('glGetError'); if @glGetError=nil then Exit('Error loading GL ES 2.0: Function not found "glGetError"');
- glGetFloatv:=GetProcAddress('glGetFloatv'); if @glGetFloatv=nil then Exit('Error loading GL ES 2.0: Function not found "glGetFloatv"');
- glGetFramebufferAttachmentParameteriv:=GetProcAddress('glGetFramebufferAttachmentParameteriv'); if @glGetFramebufferAttachmentParameteriv=nil then Exit('Error loading GL ES 2.0: Function not found "glGetFramebufferAttachmentParameteriv"');
- glGetIntegerv:=GetProcAddress('glGetIntegerv'); if @glGetIntegerv=nil then Exit('Error loading GL ES 2.0: Function not found "glGetIntegerv"');
- glGetProgramiv:=GetProcAddress('glGetProgramiv'); if @glGetProgramiv=nil then Exit('Error loading GL ES 2.0: Function not found "glGetProgramiv"');
- glGetProgramInfoLog:=GetProcAddress('glGetProgramInfoLog'); if @glGetProgramInfoLog=nil then Exit('Error loading GL ES 2.0: Function not found "glGetProgramInfoLog"');
- glGetRenderbufferParameteriv:=GetProcAddress('glGetRenderbufferParameteriv'); if @glGetRenderbufferParameteriv=nil then Exit('Error loading GL ES 2.0: Function not found "glGetRenderbufferParameteriv"');
- glGetShaderiv:=GetProcAddress('glGetShaderiv'); if @glGetShaderiv=nil then Exit('Error loading GL ES 2.0: Function not found "glGetShaderiv"');
- glGetShaderInfoLog:=GetProcAddress('glGetShaderInfoLog'); if @glGetShaderInfoLog=nil then Exit('Error loading GL ES 2.0: Function not found "glGetShaderInfoLog"');
- if extrafunctions then begin
- glGetShaderPrecisionFormat:=GetProcAddress('glGetShaderPrecisionFormat'); if @glGetShaderPrecisionFormat=nil then Exit('Error loading GL ES 2.0: Function not found "glGetShaderPrecisionFormat"');
- end;
- glGetShaderSource:=GetProcAddress('glGetShaderSource'); if @glGetShaderSource=nil then Exit('Error loading GL ES 2.0: Function not found "glGetShaderSource"');
- glGetString:=GetProcAddress('glGetString'); if @glGetString=nil then Exit('Error loading GL ES 2.0: Function not found "glGetString"');
- glGetTexParameterfv:=GetProcAddress('glGetTexParameterfv'); if @glGetTexParameterfv=nil then Exit('Error loading GL ES 2.0: Function not found "glGetTexParameterfv"');
- glGetTexParameteriv:=GetProcAddress('glGetTexParameteriv'); if @glGetTexParameteriv=nil then Exit('Error loading GL ES 2.0: Function not found "glGetTexParameteriv"');
- glGetUniformfv:=GetProcAddress('glGetUniformfv'); if @glGetUniformfv=nil then Exit('Error loading GL ES 2.0: Function not found "glGetUniformfv"');
- glGetUniformiv:=GetProcAddress('glGetUniformiv'); if @glGetUniformiv=nil then Exit('Error loading GL ES 2.0: Function not found "glGetUniformiv"');
- glGetUniformLocation:=GetProcAddress('glGetUniformLocation'); if @glGetUniformLocation=nil then Exit('Error loading GL ES 2.0: Function not found "glGetUniformLocation"');
- glGetVertexAttribfv:=GetProcAddress('glGetVertexAttribfv'); if @glGetVertexAttribfv=nil then Exit('Error loading GL ES 2.0: Function not found "glGetVertexAttribfv"');
- glGetVertexAttribiv:=GetProcAddress('glGetVertexAttribiv'); if @glGetVertexAttribiv=nil then Exit('Error loading GL ES 2.0: Function not found "glGetVertexAttribiv"');
- glGetVertexAttribPointerv:=GetProcAddress('glGetVertexAttribPointerv'); if @glGetVertexAttribPointerv=nil then Exit('Error loading GL ES 2.0: Function not found "glGetVertexAttribPointerv"');
- glHint:=GetProcAddress('glHint'); if @glHint=nil then Exit('Error loading GL ES 2.0: Function not found "glHint"');
- glIsBuffer:=GetProcAddress('glIsBuffer'); if @glIsBuffer=nil then Exit('Error loading GL ES 2.0: Function not found "glIsBuffer"');
- glIsEnabled:=GetProcAddress('glIsEnabled'); if @glIsEnabled=nil then Exit('Error loading GL ES 2.0: Function not found "glIsEnabled"');
- glIsFramebuffer:=GetProcAddress('glIsFramebuffer'); if @glIsFramebuffer=nil then Exit('Error loading GL ES 2.0: Function not found "glIsFramebuffer"');
- glIsProgram:=GetProcAddress('glIsProgram'); if @glIsProgram=nil then Exit('Error loading GL ES 2.0: Function not found "glIsProgram"');
- glIsRenderbuffer:=GetProcAddress('glIsRenderbuffer'); if @glIsRenderbuffer=nil then Exit('Error loading GL ES 2.0: Function not found "glIsRenderbuffer"');
- glIsShader:=GetProcAddress('glIsShader'); if @glIsShader=nil then Exit('Error loading GL ES 2.0: Function not found "glIsShader"');
- glIsTexture:=GetProcAddress('glIsTexture'); if @glIsTexture=nil then Exit('Error loading GL ES 2.0: Function not found "glIsTexture"');
- glLineWidth:=GetProcAddress('glLineWidth'); if @glLineWidth=nil then Exit('Error loading GL ES 2.0: Function not found "glLineWidth"');
- glLinkProgram:=GetProcAddress('glLinkProgram'); if @glLinkProgram=nil then Exit('Error loading GL ES 2.0: Function not found "glLinkProgram"');
- glPixelStorei:=GetProcAddress('glPixelStorei'); if @glPixelStorei=nil then Exit('Error loading GL ES 2.0: Function not found "glPixelStorei"');
- glPolygonOffset:=GetProcAddress('glPolygonOffset'); if @glPolygonOffset=nil then Exit('Error loading GL ES 2.0: Function not found "glPolygonOffset"');
- glReadPixels:=GetProcAddress('glReadPixels'); if @glReadPixels=nil then Exit('Error loading GL ES 2.0: Function not found "glReadPixels"');
- if extrafunctions then begin
- glReleaseShaderCompiler:=GetProcAddress('glReleaseShaderCompiler'); if @glReleaseShaderCompiler=nil then Exit('Error loading GL ES 2.0: Function not found "glReleaseShaderCompiler"');
- end;
- glRenderbufferStorage:=GetProcAddress('glRenderbufferStorage'); if @glRenderbufferStorage=nil then Exit('Error loading GL ES 2.0: Function not found "glRenderbufferStorage"');
- glSampleCoverage:=GetProcAddress('glSampleCoverage'); if @glSampleCoverage=nil then Exit('Error loading GL ES 2.0: Function not found "glSampleCoverage"');
- glScissor:=GetProcAddress('glScissor'); if @glScissor=nil then Exit('Error loading GL ES 2.0: Function not found "glScissor"');
- if extrafunctions then begin
- glShaderBinary:=GetProcAddress('glShaderBinary'); if @glShaderBinary=nil then Exit('Error loading GL ES 2.0: Function not found "glShaderBinary"');
- end;
- glShaderSource:=GetProcAddress('glShaderSource'); if @glShaderSource=nil then Exit('Error loading GL ES 2.0: Function not found "glShaderSource"');
- glStencilFunc:=GetProcAddress('glStencilFunc'); if @glStencilFunc=nil then Exit('Error loading GL ES 2.0: Function not found "glStencilFunc"');
- glStencilFuncSeparate:=GetProcAddress('glStencilFuncSeparate'); if @glStencilFuncSeparate=nil then Exit('Error loading GL ES 2.0: Function not found "glStencilFuncSeparate"');
- glStencilMask:=GetProcAddress('glStencilMask'); if @glStencilMask=nil then Exit('Error loading GL ES 2.0: Function not found "glStencilMask"');
- glStencilMaskSeparate:=GetProcAddress('glStencilMaskSeparate'); if @glStencilMaskSeparate=nil then Exit('Error loading GL ES 2.0: Function not found "glStencilMaskSeparate"');
- glStencilOp:=GetProcAddress('glStencilOp'); if @glStencilOp=nil then Exit('Error loading GL ES 2.0: Function not found "glStencilOp"');
- glStencilOpSeparate:=GetProcAddress('glStencilOpSeparate'); if @glStencilOpSeparate=nil then Exit('Error loading GL ES 2.0: Function not found "glStencilOpSeparate"');
- glTexImage2D:=GetProcAddress('glTexImage2D'); if @glTexImage2D=nil then Exit('Error loading GL ES 2.0: Function not found "glTexImage2D"');
- glTexParameterf:=GetProcAddress('glTexParameterf'); if @glTexParameterf=nil then Exit('Error loading GL ES 2.0: Function not found "glTexParameterf"');
- glTexParameterfv:=GetProcAddress('glTexParameterfv'); if @glTexParameterfv=nil then Exit('Error loading GL ES 2.0: Function not found "glTexParameterfv"');
- glTexParameteri:=GetProcAddress('glTexParameteri'); if @glTexParameteri=nil then Exit('Error loading GL ES 2.0: Function not found "glTexParameteri"');
- glTexParameteriv:=GetProcAddress('glTexParameteriv'); if @glTexParameteriv=nil then Exit('Error loading GL ES 2.0: Function not found "glTexParameteriv"');
- glTexSubImage2D:=GetProcAddress('glTexSubImage2D'); if @glTexSubImage2D=nil then Exit('Error loading GL ES 2.0: Function not found "glTexSubImage2D"');
- glUniform1f:=GetProcAddress('glUniform1f'); if @glUniform1f=nil then Exit('Error loading GL ES 2.0: Function not found "glUniform1f"');
- glUniform1fv:=GetProcAddress('glUniform1fv'); if @glUniform1fv=nil then Exit('Error loading GL ES 2.0: Function not found "glUniform1fv"');
- glUniform1i:=GetProcAddress('glUniform1i'); if @glUniform1i=nil then Exit('Error loading GL ES 2.0: Function not found "glUniform1i"');
- glUniform1iv:=GetProcAddress('glUniform1iv'); if @glUniform1iv=nil then Exit('Error loading GL ES 2.0: Function not found "glUniform1iv"');
- glUniform2f:=GetProcAddress('glUniform2f'); if @glUniform2f=nil then Exit('Error loading GL ES 2.0: Function not found "glUniform2f"');
- glUniform2fv:=GetProcAddress('glUniform2fv'); if @glUniform2fv=nil then Exit('Error loading GL ES 2.0: Function not found "glUniform2fv"');
- glUniform2i:=GetProcAddress('glUniform2i'); if @glUniform2i=nil then Exit('Error loading GL ES 2.0: Function not found "glUniform2i"');
- glUniform2iv:=GetProcAddress('glUniform2iv'); if @glUniform2iv=nil then Exit('Error loading GL ES 2.0: Function not found "glUniform2iv"');
- glUniform3f:=GetProcAddress('glUniform3f'); if @glUniform3f=nil then Exit('Error loading GL ES 2.0: Function not found "glUniform3f"');
- glUniform3fv:=GetProcAddress('glUniform3fv'); if @glUniform3fv=nil then Exit('Error loading GL ES 2.0: Function not found "glUniform3fv"');
- glUniform3i:=GetProcAddress('glUniform3i'); if @glUniform3i=nil then Exit('Error loading GL ES 2.0: Function not found "glUniform3i"');
- glUniform3iv:=GetProcAddress('glUniform3iv'); if @glUniform3iv=nil then Exit('Error loading GL ES 2.0: Function not found "glUniform3iv"');
- glUniform4f:=GetProcAddress('glUniform4f'); if @glUniform4f=nil then Exit('Error loading GL ES 2.0: Function not found "glUniform4f"');
- glUniform4fv:=GetProcAddress('glUniform4fv'); if @glUniform4fv=nil then Exit('Error loading GL ES 2.0: Function not found "glUniform4fv"');
- glUniform4i:=GetProcAddress('glUniform4i'); if @glUniform4i=nil then Exit('Error loading GL ES 2.0: Function not found "glUniform4i"');
- glUniform4iv:=GetProcAddress('glUniform4iv'); if @glUniform4iv=nil then Exit('Error loading GL ES 2.0: Function not found "glUniform4iv"');
- glUniformMatrix2fv:=GetProcAddress('glUniformMatrix2fv'); if @glUniformMatrix2fv=nil then Exit('Error loading GL ES 2.0: Function not found "glUniformMatrix2fv"');
- glUniformMatrix3fv:=GetProcAddress('glUniformMatrix3fv'); if @glUniformMatrix3fv=nil then Exit('Error loading GL ES 2.0: Function not found "glUniformMatrix3fv"');
- glUniformMatrix4fv:=GetProcAddress('glUniformMatrix4fv'); if @glUniformMatrix4fv=nil then Exit('Error loading GL ES 2.0: Function not found "glUniformMatrix4fv"');
- glUseProgram:=GetProcAddress('glUseProgram'); if @glUseProgram=nil then Exit('Error loading GL ES 2.0: Function not found "glUseProgram"');
- glValidateProgram:=GetProcAddress('glValidateProgram'); if @glValidateProgram=nil then Exit('Error loading GL ES 2.0: Function not found "glValidateProgram"');
- glVertexAttrib1f:=GetProcAddress('glVertexAttrib1f'); if @glVertexAttrib1f=nil then Exit('Error loading GL ES 2.0: Function not found "glVertexAttrib1f"');
- glVertexAttrib1fv:=GetProcAddress('glVertexAttrib1fv'); if @glVertexAttrib1fv=nil then Exit('Error …
Large files files are truncated, but you can click here to view the full file