1 #ifndef DALI_INTEGRATION_GL_ABSTRACTION_H
2 #define DALI_INTEGRATION_GL_ABSTRACTION_H
5 * Copyright (c) 2024 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
21 #include <dali/devel-api/rendering/renderer-devel.h>
25 * This file is based on gl3.h, the following licence is included for conformance.
28 ** Copyright (c) 2007-2012 The Khronos Group Inc.
30 ** Permission is hereby granted, free of charge, to any person obtaining a
31 ** copy of this software and/or associated documentation files (the
32 ** "Materials"), to deal in the Materials without restriction, including
33 ** without limitation the rights to use, copy, modify, merge, publish,
34 ** distribute, sublicense, and/or sell copies of the Materials, and to
35 ** permit persons to whom the Materials are furnished to do so, subject to
36 ** the following conditions:
38 ** The above copyright notice and this permission notice shall be included
39 ** in all copies or substantial portions of the Materials.
41 ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
42 ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
43 ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
44 ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
45 ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
46 ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
47 ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
50 #include <dali/integration-api/graphics-config.h>
58 * These types are equivalent to those in the GLES2 API.
59 * Dali objects should only access GL indirectly, through the Context API.
66 using GLenum = unsigned int;
67 using GLboolean = unsigned char;
68 using GLbitfield = unsigned int;
69 using GLbyte = int8_t;
70 using GLshort = short;
73 using GLubyte = uint8_t;
74 using GLushort = unsigned short;
75 using GLuint = unsigned int;
76 using GLfloat = float;
77 using GLclampf = float;
79 using GLintptr = long;
80 using GLsizeiptr = long;
84 using GLhalf = unsigned short;
85 using GLint64 = int64_t;
86 using GLuint64 = uint64_t;
87 using GLsync = __GLsync*;
92 * GlAbstraction is an abstract interface, used to access OpenGL services.
93 * A concrete implementation must be created for each platform, and provided when creating the
94 * Dali::Integration::Core object.
96 class GlAbstraction : public GraphicsConfig
99 // Protected construction & deletion
100 GlAbstraction() = default; ///< Protected constructor so an instance of this class cannot be created.
101 virtual ~GlAbstraction() = default; ///< Virtual protected destructor, no deletion through this interface.
104 // Not copyable but movable
105 GlAbstraction(const GlAbstraction&) = delete; ///< Deleted copy constructor.
106 GlAbstraction(GlAbstraction&&) = default; ///< Default move constructor.
107 GlAbstraction& operator=(const GlAbstraction&) = delete; ///< Deleted copy assignment operator.
108 GlAbstraction& operator=(GlAbstraction&&) = default; ///< Default move assignment operator.
111 * Invoked by Render thread before Core::Render.
113 virtual void PreRender() = 0;
116 * Invoked by Render thread after Core::Render
117 * Inform the gl implementation that the rendering in this frame has finished,
118 * and how much time was spent.
120 virtual void PostRender() = 0;
123 * Returns current gles can support surfaceless context
124 * @Return true current gles support surfaceless context
126 virtual bool IsSurfacelessContextSupported() const = 0;
129 * Returns current gles can support advanced blend equation
130 * @Return true current gles support advanced blend equation
132 virtual bool IsAdvancedBlendEquationSupported() = 0;
135 * Returns current gles can support multisampled render to texture
136 * @Return true current gles support multisampled render to texture
138 virtual bool IsMultisampledRenderToTextureSupported() = 0;
141 * Returns current gles can support the blend equation
142 * @Return true current gles support the blend equation
144 virtual bool IsBlendEquationSupported(DevelBlendEquation::Type blendEquation) = 0;
147 * Returns shader prefix of shading language version.
148 * @Return shader prefix of shading language version.
150 virtual std::string GetShaderVersionPrefix() = 0;
153 * Returns vertex shader prefix including shading language version.
154 * @Return vertex shader prefix including shading language version.
156 virtual std::string GetVertexShaderPrefix() = 0;
159 * Returns fragment shader prefix including shading language version and extension information.
160 * @Return fragment shader prefix including shading language version and extension information.
162 virtual std::string GetFragmentShaderPrefix() = 0;
165 * Determine whether to convert pixel format or not.
166 * @param[in] imageGlFormat GLformat of input image.
167 * @param[in] textureGlFormat GLformat of Texture.
168 * @param[in] isSubImage Boolian value for the whether the image is subimage or not
169 * @return Whether the texture will be convert or not.
171 virtual bool TextureRequiresConverting(const GLenum imageGlFormat, const GLenum textureGlFormat, const bool isSubImage) const = 0;
174 * The number of texture units an implementation supports is implementation dependent, but must be at least 8.
176 static const unsigned int MIN_TEXTURE_UNIT_LIMIT = 16;
180 virtual void ActiveTexture (GLenum texture) = 0;
181 virtual void AttachShader (GLuint program, GLuint shader) = 0;
182 virtual void BindAttribLocation (GLuint program, GLuint index, const char* name) = 0;
183 virtual void BindBuffer (GLenum target, GLuint buffer) = 0;
184 virtual void BindFramebuffer (GLenum target, GLuint framebuffer) = 0;
185 virtual void BindRenderbuffer (GLenum target, GLuint renderbuffer) = 0;
186 virtual void BindTexture (GLenum target, GLuint texture) = 0;
187 virtual void BlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) = 0;
188 virtual void BlendEquation ( GLenum mode ) = 0;
189 virtual void BlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha) = 0;
190 virtual void BlendFunc (GLenum sfactor, GLenum dfactor) = 0;
191 virtual void BlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) = 0;
192 virtual void BufferData (GLenum target, GLsizeiptr size, const void* data, GLenum usage) = 0;
193 virtual void BufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void* data) = 0;
194 virtual GLenum CheckFramebufferStatus (GLenum target) = 0;
195 virtual void Clear (GLbitfield mask) = 0;
196 virtual void ClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) = 0;
197 virtual void ClearDepthf (GLclampf depth) = 0;
198 virtual void ClearStencil (GLint s) = 0;
199 virtual void ColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) = 0;
200 virtual void CompileShader (GLuint shader) = 0;
201 virtual void CompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data) = 0;
202 virtual void CompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data) = 0;
203 virtual void CopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) = 0;
204 virtual void CopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) = 0;
205 virtual GLuint CreateProgram (void) = 0;
206 virtual GLuint CreateShader (GLenum type) = 0;
207 virtual void CullFace (GLenum mode) = 0;
208 virtual void DeleteBuffers (GLsizei n, const GLuint* buffers) = 0;
209 virtual void DeleteFramebuffers (GLsizei n, const GLuint* framebuffers) = 0;
210 virtual void DeleteProgram (GLuint program) = 0;
211 virtual void DeleteRenderbuffers (GLsizei n, const GLuint* renderbuffers) = 0;
212 virtual void DeleteShader (GLuint shader) = 0;
213 virtual void DeleteTextures (GLsizei n, const GLuint* textures) = 0;
214 virtual void DepthFunc (GLenum func) = 0;
215 virtual void DepthMask (GLboolean flag) = 0;
216 virtual void DepthRangef (GLclampf zNear, GLclampf zFar) = 0;
217 virtual void DetachShader (GLuint program, GLuint shader) = 0;
218 virtual void Disable (GLenum cap) = 0;
219 virtual void DisableVertexAttribArray (GLuint index) = 0;
220 virtual void DrawArrays (GLenum mode, GLint first, GLsizei count) = 0;
221 virtual void DrawElements (GLenum mode, GLsizei count, GLenum type, const void* indices) = 0;
222 virtual void Enable (GLenum cap) = 0;
223 virtual void EnableVertexAttribArray (GLuint index) = 0;
224 virtual void Finish (void) = 0;
225 virtual void Flush (void) = 0;
226 virtual void FramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) = 0;
227 virtual void FramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) = 0;
228 virtual void FrontFace (GLenum mode) = 0;
229 virtual void GenBuffers (GLsizei n, GLuint* buffers) = 0;
230 virtual void GenerateMipmap (GLenum target) = 0;
231 virtual void GenFramebuffers (GLsizei n, GLuint* framebuffers) = 0;
232 virtual void GenRenderbuffers (GLsizei n, GLuint* renderbuffers) = 0;
233 virtual void GenTextures (GLsizei n, GLuint* textures) = 0;
234 virtual void GetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name) = 0;
235 virtual void GetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name) = 0;
236 virtual void GetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) = 0;
237 virtual GLint GetAttribLocation (GLuint program, const char* name) = 0;
238 virtual void GetBooleanv (GLenum pname, GLboolean* params) = 0;
239 virtual void GetBufferParameteriv (GLenum target, GLenum pname, GLint* params) = 0;
240 virtual GLenum GetError (void) = 0;
241 virtual void GetFloatv (GLenum pname, GLfloat* params) = 0;
242 virtual void GetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params) = 0;
243 virtual void GetIntegerv (GLenum pname, GLint* params) = 0;
244 virtual void GetProgramiv (GLuint program, GLenum pname, GLint* params) = 0;
245 virtual void GetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, char* infolog) = 0;
246 virtual void GetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params) = 0;
247 virtual void GetShaderiv (GLuint shader, GLenum pname, GLint* params) = 0;
248 virtual void GetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog) = 0;
249 virtual void GetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) = 0;
250 virtual void GetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, char* source) = 0;
251 virtual const GLubyte* GetString (GLenum name) = 0;
252 virtual void GetTexParameterfv (GLenum target, GLenum pname, GLfloat* params) = 0;
253 virtual void GetTexParameteriv (GLenum target, GLenum pname, GLint* params) = 0;
254 virtual void GetUniformfv (GLuint program, GLint location, GLfloat* params) = 0;
255 virtual void GetUniformiv (GLuint program, GLint location, GLint* params) = 0;
256 virtual GLint GetUniformLocation (GLuint program, const char* name) = 0;
257 virtual void GetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params) = 0;
258 virtual void GetVertexAttribiv (GLuint index, GLenum pname, GLint* params) = 0;
259 virtual void GetVertexAttribPointerv (GLuint index, GLenum pname, void** pointer) = 0;
260 virtual void Hint (GLenum target, GLenum mode) = 0;
261 virtual GLboolean IsBuffer (GLuint buffer) = 0;
262 virtual GLboolean IsEnabled (GLenum cap) = 0;
263 virtual GLboolean IsFramebuffer (GLuint framebuffer) = 0;
264 virtual GLboolean IsProgram (GLuint program) = 0;
265 virtual GLboolean IsRenderbuffer (GLuint renderbuffer) = 0;
266 virtual GLboolean IsShader (GLuint shader) = 0;
267 virtual GLboolean IsTexture (GLuint texture) = 0;
268 virtual void LineWidth (GLfloat width) = 0;
269 virtual void LinkProgram (GLuint program) = 0;
270 virtual void PixelStorei (GLenum pname, GLint param) = 0;
271 virtual void PolygonOffset (GLfloat factor, GLfloat units) = 0;
272 virtual void ReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pixels) = 0;
273 virtual void ReleaseShaderCompiler (void) = 0;
274 virtual void RenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height) = 0;
275 virtual void SampleCoverage (GLclampf value, GLboolean invert) = 0;
276 virtual void Scissor (GLint x, GLint y, GLsizei width, GLsizei height) = 0;
277 virtual void ShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length) = 0;
278 virtual void ShaderSource (GLuint shader, GLsizei count, const char** string, const GLint* length) = 0;
279 virtual void StencilFunc (GLenum func, GLint ref, GLuint mask) = 0;
280 virtual void StencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask) = 0;
281 virtual void StencilMask (GLuint mask) = 0;
282 virtual void StencilMaskSeparate (GLenum face, GLuint mask) = 0;
283 virtual void StencilOp (GLenum fail, GLenum zfail, GLenum zpass) = 0;
284 virtual void StencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass) = 0;
285 virtual void TexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void* pixels) = 0;
286 virtual void TexParameterf (GLenum target, GLenum pname, GLfloat param) = 0;
287 virtual void TexParameterfv (GLenum target, GLenum pname, const GLfloat* params) = 0;
288 virtual void TexParameteri (GLenum target, GLenum pname, GLint param) = 0;
289 virtual void TexParameteriv (GLenum target, GLenum pname, const GLint* params) = 0;
290 virtual void TexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels) = 0;
291 virtual void Uniform1f (GLint location, GLfloat x) = 0;
292 virtual void Uniform1fv (GLint location, GLsizei count, const GLfloat* v) = 0;
293 virtual void Uniform1i (GLint location, GLint x) = 0;
294 virtual void Uniform1iv (GLint location, GLsizei count, const GLint* v) = 0;
295 virtual void Uniform2f (GLint location, GLfloat x, GLfloat y) = 0;
296 virtual void Uniform2fv (GLint location, GLsizei count, const GLfloat* v) = 0;
297 virtual void Uniform2i (GLint location, GLint x, GLint y) = 0;
298 virtual void Uniform2iv (GLint location, GLsizei count, const GLint* v) = 0;
299 virtual void Uniform3f (GLint location, GLfloat x, GLfloat y, GLfloat z) = 0;
300 virtual void Uniform3fv (GLint location, GLsizei count, const GLfloat* v) = 0;
301 virtual void Uniform3i (GLint location, GLint x, GLint y, GLint z) = 0;
302 virtual void Uniform3iv (GLint location, GLsizei count, const GLint* v) = 0;
303 virtual void Uniform4f (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) = 0;
304 virtual void Uniform4fv (GLint location, GLsizei count, const GLfloat* v) = 0;
305 virtual void Uniform4i (GLint location, GLint x, GLint y, GLint z, GLint w) = 0;
306 virtual void Uniform4iv (GLint location, GLsizei count, const GLint* v) = 0;
307 virtual void UniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) = 0;
308 virtual void UniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) = 0;
309 virtual void UniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) = 0;
310 virtual void UseProgram (GLuint program) = 0;
311 virtual void ValidateProgram (GLuint program) = 0;
312 virtual void VertexAttrib1f (GLuint indx, GLfloat x) = 0;
313 virtual void VertexAttrib1fv (GLuint indx, const GLfloat* values) = 0;
314 virtual void VertexAttrib2f (GLuint indx, GLfloat x, GLfloat y) = 0;
315 virtual void VertexAttrib2fv (GLuint indx, const GLfloat* values) = 0;
316 virtual void VertexAttrib3f (GLuint indx, GLfloat x, GLfloat y, GLfloat z) = 0;
317 virtual void VertexAttrib3fv (GLuint indx, const GLfloat* values) = 0;
318 virtual void VertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) = 0;
319 virtual void VertexAttrib4fv (GLuint indx, const GLfloat* values) = 0;
320 virtual void VertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr) = 0;
321 virtual void Viewport (GLint x, GLint y, GLsizei width, GLsizei height) = 0;
325 virtual void ReadBuffer (GLenum mode) = 0;
326 virtual void DrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid* indices) = 0;
327 virtual void TexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels) = 0;
328 virtual void TexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels) = 0;
329 virtual void CopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) = 0;
330 virtual void CompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data) = 0;
331 virtual void CompressedTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data) = 0;
332 virtual void GenQueries (GLsizei n, GLuint* ids) = 0;
333 virtual void DeleteQueries (GLsizei n, const GLuint* ids) = 0;
334 virtual GLboolean IsQuery (GLuint id) = 0;
335 virtual void BeginQuery (GLenum target, GLuint id) = 0;
336 virtual void EndQuery (GLenum target) = 0;
337 virtual void GetQueryiv (GLenum target, GLenum pname, GLint* params) = 0;
338 virtual void GetQueryObjectuiv (GLuint id, GLenum pname, GLuint* params) = 0;
339 virtual GLboolean UnmapBuffer (GLenum target) = 0;
340 virtual void GetBufferPointerv (GLenum target, GLenum pname, GLvoid** params) = 0;
341 virtual void DrawBuffers (GLsizei n, const GLenum* bufs) = 0;
342 virtual void UniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) = 0;
343 virtual void UniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) = 0;
344 virtual void UniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) = 0;
345 virtual void UniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) = 0;
346 virtual void UniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) = 0;
347 virtual void UniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) = 0;
348 virtual void BlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) = 0;
349 virtual void RenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) = 0;
350 virtual void FramebufferTexture2DMultisample(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples) = 0;
351 virtual void FramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer) = 0;
352 virtual GLvoid* MapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access) = 0;
353 virtual void FlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length) = 0;
354 virtual void BindVertexArray (GLuint array) = 0;
355 virtual void DeleteVertexArrays (GLsizei n, const GLuint* arrays) = 0;
356 virtual void GenVertexArrays (GLsizei n, GLuint* arrays) = 0;
357 virtual GLboolean IsVertexArray (GLuint array) = 0;
358 virtual void GetIntegeri_v (GLenum target, GLuint index, GLint* data) = 0;
359 virtual void BeginTransformFeedback (GLenum primitiveMode) = 0;
360 virtual void EndTransformFeedback (void) = 0;
361 virtual void BindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size) = 0;
362 virtual void BindBufferBase (GLenum target, GLuint index, GLuint buffer) = 0;
363 virtual void TransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar* const* varyings, GLenum bufferMode) = 0;
364 virtual void GetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLsizei* size, GLenum* type, GLchar* name) = 0;
365 virtual void VertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid* pointer) = 0;
366 virtual void GetVertexAttribIiv (GLuint index, GLenum pname, GLint* params) = 0;
367 virtual void GetVertexAttribIuiv (GLuint index, GLenum pname, GLuint* params) = 0;
368 virtual void VertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w) = 0;
369 virtual void VertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w) = 0;
370 virtual void VertexAttribI4iv (GLuint index, const GLint* v) = 0;
371 virtual void VertexAttribI4uiv (GLuint index, const GLuint* v) = 0;
372 virtual void GetUniformuiv (GLuint program, GLint location, GLuint* params) = 0;
373 virtual GLint GetFragDataLocation (GLuint program, const GLchar *name) = 0;
374 virtual void Uniform1ui (GLint location, GLuint v0) = 0;
375 virtual void Uniform2ui (GLint location, GLuint v0, GLuint v1) = 0;
376 virtual void Uniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2) = 0;
377 virtual void Uniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) = 0;
378 virtual void Uniform1uiv (GLint location, GLsizei count, const GLuint* value) = 0;
379 virtual void Uniform2uiv (GLint location, GLsizei count, const GLuint* value) = 0;
380 virtual void Uniform3uiv (GLint location, GLsizei count, const GLuint* value) = 0;
381 virtual void Uniform4uiv (GLint location, GLsizei count, const GLuint* value) = 0;
382 virtual void ClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint* value) = 0;
383 virtual void ClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint* value) = 0;
384 virtual void ClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat* value) = 0;
385 virtual void ClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil) = 0;
386 virtual const GLubyte* GetStringi (GLenum name, GLuint index) = 0;
387 virtual void CopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size) = 0;
388 virtual void GetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar* const* uniformNames, GLuint* uniformIndices) = 0;
389 virtual void GetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint* uniformIndices, GLenum pname, GLint* params) = 0;
390 virtual GLuint GetUniformBlockIndex (GLuint program, const GLchar* uniformBlockName) = 0;
391 virtual void GetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint* params) = 0;
392 virtual void GetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformBlockName) = 0;
393 virtual void UniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding) = 0;
394 virtual void DrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei instanceCount) = 0;
395 virtual void DrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const GLvoid* indices, GLsizei instanceCount) = 0;
396 virtual GLsync FenceSync (GLenum condition, GLbitfield flags) = 0;
397 virtual GLboolean IsSync (GLsync sync) = 0;
398 virtual void DeleteSync (GLsync sync) = 0;
399 virtual GLenum ClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout) = 0;
400 virtual void WaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout) = 0;
401 virtual void GetInteger64v (GLenum pname, GLint64* params) = 0;
402 virtual void GetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values) = 0;
403 virtual void GetInteger64i_v (GLenum target, GLuint index, GLint64* data) = 0;
404 virtual void GetBufferParameteri64v (GLenum target, GLenum pname, GLint64* params) = 0;
405 virtual void GenSamplers (GLsizei count, GLuint* samplers) = 0;
406 virtual void DeleteSamplers (GLsizei count, const GLuint* samplers) = 0;
407 virtual GLboolean IsSampler (GLuint sampler) = 0;
408 virtual void BindSampler (GLuint unit, GLuint sampler) = 0;
409 virtual void SamplerParameteri (GLuint sampler, GLenum pname, GLint param) = 0;
410 virtual void SamplerParameteriv (GLuint sampler, GLenum pname, const GLint* param) = 0;
411 virtual void SamplerParameterf (GLuint sampler, GLenum pname, GLfloat param) = 0;
412 virtual void SamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat* param) = 0;
413 virtual void GetSamplerParameteriv (GLuint sampler, GLenum pname, GLint* params) = 0;
414 virtual void GetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat* params) = 0;
415 virtual void VertexAttribDivisor (GLuint index, GLuint divisor) = 0;
416 virtual void BindTransformFeedback (GLenum target, GLuint id) = 0;
417 virtual void DeleteTransformFeedbacks (GLsizei n, const GLuint* ids) = 0;
418 virtual void GenTransformFeedbacks (GLsizei n, GLuint* ids) = 0;
419 virtual GLboolean IsTransformFeedback (GLuint id) = 0;
420 virtual void PauseTransformFeedback (void) = 0;
421 virtual void ResumeTransformFeedback (void) = 0;
422 virtual void GetProgramBinary (GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, GLvoid* binary) = 0;
423 virtual void ProgramBinary (GLuint program, GLenum binaryFormat, const GLvoid* binary, GLsizei length) = 0;
424 virtual void ProgramParameteri (GLuint program, GLenum pname, GLint value) = 0;
425 virtual void InvalidateFramebuffer (GLenum target, GLsizei numAttachments, const GLenum* attachments) = 0;
426 virtual void InvalidateSubFramebuffer (GLenum target, GLsizei numAttachments, const GLenum* attachments, GLint x, GLint y, GLsizei width, GLsizei height) = 0;
427 virtual void TexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) = 0;
428 virtual void TexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) = 0;
429 virtual void GetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint* params) = 0;
430 virtual void BlendBarrier (void) = 0;
434 } // namespace Integration
438 #endif // DALI_INTEGRATION_GL_ABSTRACTION_H