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_CM_VALIDATE_H 17 #define GLES_CM_VALIDATE_H 18 19 #include <GLES/gl.h> 20 #include <GLcommon/GLESvalidate.h> 21 struct GLEScmValidate : public GLESvalidate 22 { 23 static bool blendSrc(GLenum s); 24 static bool blendDst(GLenum d); 25 static bool lightEnum(GLenum e,unsigned int maxLIghts); 26 static bool clipPlaneEnum(GLenum e,unsigned int maxClipPlanes); 27 static bool alphaFunc(GLenum f); 28 static bool vertexPointerParams(GLint size,GLsizei stride); 29 static bool colorPointerParams(GLint size,GLsizei stride); 30 static bool supportedArrays(GLenum arr); 31 static bool hintTargetMode(GLenum target,GLenum mode); 32 static bool capability(GLenum cap,int maxLights,int maxClipPlanes); 33 static bool texParams(GLenum target,GLenum pname); 34 static bool texCoordPointerParams(GLint size,GLsizei stride); 35 36 static bool texEnv(GLenum target,GLenum pname); 37 static bool texCompImgFrmt(GLenum format); 38 39 static bool renderbufferInternalFrmt(GLEScontext * ctx, GLenum internalformat); 40 static bool stencilOp(GLenum param); 41 static bool texGen(GLenum coord,GLenum pname); 42 43 static bool colorPointerType(GLenum type); 44 static bool normalPointerType(GLenum type); 45 static bool pointPointerType(GLenum type); 46 static bool texCoordPointerType(GLenum type); 47 static bool vertexPointerType(GLenum type); 48 }; 49 50 #endif 51