1 /* 2 * Copyright (C) 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 #ifndef GLES_VALIDATE_H 17 #define GLES_VALIDATE_H 18 19 #include <GLES/gl.h> 20 #include "GLEScontext.h" 21 struct GLESvalidate 22 { 23 static bool textureEnum(GLenum e,unsigned int maxTex); 24 static bool pixelType(GLEScontext * ctx,GLenum type); 25 static bool pixelOp(GLenum format,GLenum type); 26 static bool pixelFrmt(GLEScontext* ctx , GLenum format); 27 static bool bufferTarget(GLenum target); 28 static bool bufferUsage(GLenum usage); 29 static bool bufferParam(GLenum param); 30 static bool drawMode(GLenum mode); 31 static bool drawType(GLenum mode); 32 static bool textureTarget(GLenum target); 33 static bool textureTargetLimited(GLenum target); 34 static bool textureTargetEx(GLenum target); 35 static bool texImgDim(GLsizei width,GLsizei height,int maxTexSize); 36 static bool blendEquationMode(GLenum mode); 37 static bool framebufferTarget(GLenum target); 38 static bool framebufferAttachment(GLenum attachment); 39 static bool framebufferAttachmentParams(GLenum pname); 40 static bool renderbufferTarget(GLenum target); 41 static bool renderbufferParams(GLenum pname); 42 }; 43 44 #endif 45