• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2 * Copyright 2011 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 
17 #ifndef GLES_V2_VALIDATE_H
18 #define GLES_V2_VALIDATE_H
19 
20 #include <GLES2/gl2.h>
21 #include <GLES2/gl2ext.h>
22 #include <GLES3/gl3.h>
23 #include <GLES3/gl31.h>
24 #include <GLcommon/GLESvalidate.h>
25 
26 struct GLESv2Validate : public GLESvalidate {
27 
28     static bool renderbufferParam(GLEScontext* ctx, GLenum param);
29     static bool framebufferTarget(GLEScontext* ctx, GLenum target);
30     static bool framebufferAttachment(GLEScontext* ctx, GLenum attachment);
31     static bool bufferTarget(GLEScontext* ctx, GLenum target);
32     static bool bufferUsage(GLEScontext* ctx, GLenum usage);
33     static bool bufferParam(GLEScontext* ctx, GLenum pname);
34     static bool blendEquationMode(GLEScontext* ctx, GLenum mode);
35     static bool blendSrc(GLenum s);
36     static bool blendDst(GLenum d);
37     static bool textureTarget(GLEScontext* ctx, GLenum param);
38     static bool textureParams(GLEScontext* ctx, GLenum param);
39     static bool hintTargetMode(GLenum target,GLenum mode);
40     static bool capability(GLenum cap);
41     static bool pixelStoreParam(GLEScontext* ctx, GLenum param);
42     static bool readPixelFrmt(GLenum format);
43     static bool shaderType(GLEScontext* ctx, GLenum type);
44     static bool precisionType(GLenum type);
45     static bool arrayIndex(GLEScontext * ctx,GLuint index);
46     static bool pixelType(GLEScontext * ctx,GLenum type);
47     static bool pixelFrmt(GLEScontext* ctx,GLenum format);
48     static bool pixelItnlFrmt(GLEScontext* ctx, GLenum internalformat);
49     static bool pixelSizedFrmt(GLEScontext* ctx, GLenum internalformat,
50             GLenum format, GLenum type);
51     static bool isCompressedFormat(GLenum format);
52     static void getCompatibleFormatTypeForInternalFormat(GLenum internalformat, GLenum* format_out, GLenum* type_out);
53     static bool attribName(const GLchar* name);
54     static bool attribIndex(int index, int max);
55     static bool programParam(GLEScontext* ctx, GLenum pname);
56     static bool textureIsCubeMap(GLenum target);
57     static bool textureTargetEx(GLEScontext* ctx, GLenum textarget);
58 
59     static int sizeOfType(GLenum type);
60 };
61 
62 #endif
63