1 module spasm.webgl.functions;
2 
3 import spasm.webgl.types;
4 
5 nothrow:
6 @safe:
7 
8 extern (C) {
9   // void glActiveTexture(GLenum texture );
10   void glAttachShader(GLuint program, GLuint shader);
11     // void glBindAttribLocation ( GLuint, GLuint, const GLchar* );
12     void glBindBuffer ( GLenum target, GLuint buffer );
13     // void glBindFramebuffer ( GLenum, GLuint );
14     // void glBindRenderbuffer ( GLenum, GLuint );
15     void glBindTexture ( GLenum target, GLuint texture );
16     // void glBlendColor ( GLfloat, GLfloat, GLfloat, GLfloat );
17     // void glBlendEquation ( GLenum );
18     // void glBlendEquationSeparate ( GLenum, GLenum );
19     void glBlendFunc ( GLenum sfactor, GLenum dfactor);
20     // void glBlendFuncSeparate ( GLenum, GLenum dfactorRGB, GLenum, GLenum );
21     void glBufferData ( GLenum target, float[] buffer, GLenum usage);
22     // void glBufferSubData ( GLenum, GLintptr, GLsizeiptr, const void* );
23     // GLenum glCheckFramebufferStatus ( GLenum );
24     void glClear ( GLbitfield mask );
25     void glClearColor ( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha );
26     // void glClearDepthf ( GLfloat );
27     // void glClearStencil ( GLint );
28     // void glColorMask ( GLboolean, GLboolean, GLboolean, GLboolean );
29     void glCompileShader ( GLuint shader );
30     // void glCompressedTexImage2D ( GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const void* );
31     // void glCompressedTexSubImage2D ( GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const void* );
32     // void glCopyTexImage2D ( GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint );
33     // void glCopyTexSubImage2D ( GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei );
34     GLuint glCreateProgram (  );
35     GLuint glCreateShader ( GLenum type );
36     // void glCullFace ( GLenum );
37     // void glDeleteBuffers ( GLsizei, const GLuint* );
38     // void glDeleteFramebuffers ( GLsizei, const GLuint* );
39     // void glDeleteProgram ( GLuint );
40     // void glDeleteRenderbuffers ( GLsizei, const GLuint* );
41     // void glDeleteShader ( GLuint );
42     // void glDeleteTextures ( GLsizei, const GLuint* );
43     // void glDepthFunc ( GLenum );
44     // void glDepthMask ( GLboolean );
45     // void glDepthRangef ( GLfloat, GLfloat );
46     // void glDetachShader ( GLuint, GLuint );
47     // void glDisable ( GLenum );
48     // void glDisableVertexAttribArray ( GLuint );
49     void glDrawArrays ( GLenum mode, GLint first, GLsizei count );
50     // void glDrawElements ( GLenum, GLsizei, GLenum, const void* );
51     void glEnable ( GLenum cap );
52     void glEnableVertexAttribArray ( GLuint index );
53     // void glFinish (  );
54     // void glFlush (  );
55     // void glFramebufferRenderbuffer ( GLenum, GLenum, GLenum, GLuint );
56     // void glFramebufferTexture2D ( GLenum, GLenum, GLenum, GLuint, GLint );
57     // void glFrontFace ( GLenum );
58     // void glGenBuffers ( GLsizei, GLuint* );
59     GLuint glCreateBuffer();
60     // void glGenerateMipmap ( GLenum );
61     // void glGenFramebuffers ( GLsizei, GLuint* );
62     // void glGenRenderbuffers ( GLsizei, GLuint* );
63     // void glGenTextures ( GLsizei, GLuint* );
64     GLuint glCreateTexture();
65     // void glGetActiveAttrib ( GLuint, GLuint, GLsizei, GLsizei*, GLint*, GLenum*, GLchar* );
66     // void glGetActiveUniform ( GLuint, GLuint, GLsizei, GLsizei*, GLint*, GLenum*, GLchar* );
67     // void glGetAttachedShaders ( GLuint, GLsizei maxCount, GLsizei*, GLuint* );
68     GLint glGetAttribLocation ( GLuint program, string name);
69     // void glGetBooleanv ( GLenum, GLboolean* );
70     // void glGetBufferParameteriv ( GLenum, GLenum, GLint* );
71     // GLenum glGetError (  );
72     // void glGetFloatv ( GLenum, GLfloat* );
73     // void glGetFramebufferAttachmentParameteriv ( GLenum, GLenum, GLenum, GLint* );
74     // void glGetIntegerv ( GLenum, GLint* );
75     // void glGetProgramiv ( GLuint, GLenum, GLint* );
76     // void glGetProgramInfoLog ( GLuint, GLsizei, GLsizei*, GLchar*infoLog );
77     // void glGetRenderbufferParameteriv ( GLenum, GLenum, GLint* );
78     // void glGetShaderiv ( GLuint, GLenum, GLint* );
79     void glGetShaderInfoLog ( GLuint, GLsizei, GLsizei*, GLchar* infoLog );
80     // void glGetShaderPrecisionFormat ( GLenum, GLenum, GLint*, GLint* );
81     // void glGetShaderSource ( GLuint, GLsizei, GLsizei*, GLchar* );
82     // const char* glGetString ( GLenum );
83     // void glGetTexParameterfv ( GLenum, GLenum, GLfloat* );
84     // void glGetTexParameteriv ( GLenum, GLenum, GLint* );
85     // void glGetUniformfv ( GLuint, GLint, GLfloat* );
86     // void glGetUniformiv ( GLuint, GLint, GLint* );
87     GLint glGetUniformLocation ( GLuint program, string name );
88     // void glGetVertexAttribfv ( GLuint, GLenum, GLfloat* );
89     // void glGetVertexAttribiv ( GLuint, GLenum, GLint* );
90     // void glGetVertexAttribPointerv ( GLuint, GLenum, void** );
91     // void glHint ( GLenum, GLenum );
92     // GLboolean glIsBuffer ( GLuint );
93     // GLboolean glIsEnabled ( GLenum );
94     // GLboolean glIsFramebuffer ( GLuint );
95     // GLboolean glIsProgram ( GLuint );
96     // GLboolean glIsRenderbuffer ( GLuint );
97     // GLboolean glIsShader ( GLuint );
98     // GLboolean glIsTexture ( GLuint );
99     // void glLineWidth ( GLfloat );
100     void glLinkProgram ( GLuint program );
101     // void glPixelStorei ( GLenum, GLint );
102     // void glPolygonOffset ( GLfloat, GLfloat );
103     // void glReadPixels ( GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, void* );
104     // void glReleaseShaderCompiler (  );
105     // void glRenderbufferStorage ( GLenum, GLenum, GLsizei, GLsizei );
106     // void glSampleCoverage ( GLfloat, GLboolean );
107     // void glScissor ( GLint, GLint, GLsizei, GLsizei );
108     // void glShaderBinary ( GLsizei, const GLuint*, GLenum, const void*, GLsizei );
109     void glShaderSource ( GLuint, string source );
110     // void glStencilFunc ( GLenum, GLint, GLuint );
111     // void glStencilFuncSeparate ( GLenum, GLenum, GLint, GLuint );
112     // void glStencilMask ( GLuint );
113     // void glStencilMaskSeparate ( GLenum, GLuint );
114     // void glStencilOp ( GLenum, GLenum, GLenum );
115     // void glStencilOpSeparate ( GLenum, GLenum, GLenum, GLenum );
116     void glTexImage2D ( GLenum target, GLint level, GLint internalFormat, GLenum format, GLenum type, uint image );
117     // void glTexParameterf ( GLenum, GLenum, GLfloat );
118     // void glTexParameterfv ( GLenum, GLenum, const GLfloat* );
119     void glTexParameteri ( GLenum target, GLenum pname, GLint param );
120     // void glTexParameteriv ( GLenum, GLenum, const GLint* );
121     // void glTexSubImage2D ( GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const void* );
122     // void glUniform1f ( GLint, GLfloat v0 );
123     void glUniform1fv ( GLint location, GLfloat[] values );
124     // void glUniform1i ( GLint, GLint v0 );
125     // void glUniform1iv ( GLint, GLsizei, const GLint* );
126     // void glUniform2f ( GLint, GLfloat v0, GLfloat v1 );
127     // void glUniform2fv ( GLint, GLsizei, const GLfloat* );
128     // void glUniform2i ( GLint, GLint v0, GLint v1 );
129     // void glUniform2iv ( GLint, GLsizei, const GLint* );
130     void glUniform3f ( GLint location, GLfloat v0, GLfloat v1, GLfloat v2 );
131     // void glUniform3fv ( GLint, GLsizei, const GLfloat* );
132     // void glUniform3i ( GLint, GLint v0, GLint v1, GLint v2 );
133     // void glUniform3iv ( GLint, GLsizei, const GLint* );
134     // void glUniform4f ( GLint, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3 );
135     // void glUniform4fv ( GLint, GLsizei, const GLfloat* );
136     // void glUniform4i ( GLint, GLint v0, GLint v1, GLint v2, GLint v3 );
137     // void glUniform4iv ( GLint, GLsizei, const GLint* );
138     // void glUniformMatrix2fv ( GLint, GLsizei, GLboolean, const GLfloat* );
139     // void glUniformMatrix3fv ( GLint, GLsizei, GLboolean, const GLfloat* );
140     // void glUniformMatrix4fv ( GLint, GLsizei, GLboolean, const GLfloat* );
141     void glUseProgram ( GLuint program );
142     // void glValidateProgram ( GLuint );
143     // void glVertexAttrib1f ( GLuint, GLfloat );
144     // void glVertexAttrib1fv ( GLuint, const GLfloat* );
145     // void glVertexAttrib2f ( GLuint, GLfloat, GLfloat );
146     // void glVertexAttrib2fv ( GLuint, const GLfloat* );
147     // void glVertexAttrib3f ( GLuint, GLfloat, GLfloat, GLfloat );
148     // void glVertexAttrib3fv ( GLuint, const GLfloat* );
149     // void glVertexAttrib4f ( GLuint, GLfloat, GLfloat, GLfloat, GLfloat );
150     // void glVertexAttrib4fv ( GLuint, const GLfloat* );
151     void glVertexAttribPointer ( GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLintptr offset );
152     void glViewport ( GLint x, GLint y, GLsizei width, GLsizei height );
153 }