Home | History | Annotate | Download | only in libGLESv2
      1 //
      2 // Copyright (c) 2013 The ANGLE Project Authors. All rights reserved.
      3 // Use of this source code is governed by a BSD-style license that can be
      4 // found in the LICENSE file.
      5 //
      6 
      7 // validationES.h: Validation functions for generic OpenGL ES entry point parameters
      8 
      9 #ifndef LIBGLESV2_VALIDATION_ES_H
     10 #define LIBGLESV2_VALIDATION_ES_H
     11 
     12 namespace gl
     13 {
     14 
     15 class Context;
     16 
     17 bool ValidCap(const Context *context, GLenum cap);
     18 bool ValidTextureTarget(const Context *context, GLenum target);
     19 bool ValidTexture2DDestinationTarget(const Context *context, GLenum target);
     20 bool ValidFramebufferTarget(GLenum target);
     21 bool ValidBufferTarget(const Context *context, GLenum target);
     22 bool ValidBufferParameter(const Context *context, GLenum pname);
     23 bool ValidMipLevel(const Context *context, GLenum target, GLint level);
     24 bool ValidImageSize(const gl::Context *context, GLenum target, GLint level, GLsizei width, GLsizei height, GLsizei depth);
     25 bool ValidCompressedImageSize(const gl::Context *context, GLenum internalFormat, GLsizei width, GLsizei height);
     26 bool ValidQueryType(const gl::Context *context, GLenum queryType);
     27 bool ValidProgram(const gl::Context *context, GLuint id);
     28 
     29 bool ValidateRenderbufferStorageParameters(const gl::Context *context, GLenum target, GLsizei samples,
     30                                            GLenum internalformat, GLsizei width, GLsizei height,
     31                                            bool angleExtension);
     32 bool ValidateFramebufferRenderbufferParameters(gl::Context *context, GLenum target, GLenum attachment,
     33                                                GLenum renderbuffertarget, GLuint renderbuffer);
     34 
     35 bool ValidateBlitFramebufferParameters(gl::Context *context, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
     36                                        GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask,
     37                                        GLenum filter, bool fromAngleExtension);
     38 
     39 bool ValidateGetVertexAttribParameters(GLenum pname, int clientVersion);
     40 
     41 bool ValidateTexParamParameters(gl::Context *context, GLenum pname, GLint param);
     42 
     43 bool ValidateSamplerObjectParameter(GLenum pname);
     44 
     45 bool ValidateReadPixelsParameters(gl::Context *context, GLint x, GLint y, GLsizei width, GLsizei height,
     46                                   GLenum format, GLenum type, GLsizei *bufSize, GLvoid *pixels);
     47 
     48 bool ValidateBeginQuery(gl::Context *context, GLenum target, GLuint id);
     49 bool ValidateEndQuery(gl::Context *context, GLenum target);
     50 
     51 bool ValidateUniform(gl::Context *context, GLenum uniformType, GLint location, GLsizei count);
     52 bool ValidateUniformMatrix(gl::Context *context, GLenum matrixType, GLint location, GLsizei count,
     53                            GLboolean transpose);
     54 
     55 bool ValidateStateQuery(gl::Context *context, GLenum pname, GLenum *nativeType, unsigned int *numParams);
     56 
     57 bool ValidateCopyTexImageParametersBase(gl::Context* context, GLenum target, GLint level, GLenum internalformat, bool isSubImage,
     58                                         GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height,
     59                                         GLint border, GLenum *textureInternalFormatOut);
     60 
     61 }
     62 
     63 #endif // LIBGLESV2_VALIDATION_ES_H
     64