/*
* CC3OpenGLES11Intercept.c
*
* cocos3d 0.6.5
* Author: Bill Hollings
* Copyright (c) 2010-2011 The Brenwill Workshop Ltd. All rights reserved.
* http://www.brenwill.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* http://en.wikipedia.org/wiki/MIT_License
*
* See header file CC3OpenGLES11Intercept.h for full API documentation.
*/
#include <OpenGLES/ES1/gl.h>
#include <OpenGLES/ES1/glext.h>
#include "CC3OpenGLES11Utility.h"
// This file deliberately does NOT include the CC3OpenGLES11Intercept.h file
// because doing so would swap out the actual gl* calls! This implementation
// file must have access to the actual gl* functions.
#ifndef kPrintGLDataVertexCount
# define kPrintGLDataVertexCount 8
#endif
#ifndef kPrintGLDataBufferDataCount
# define kPrintGLDataBufferDataCount 64
#endif
#ifndef kMinGLPointerAddress
# define kMinGLPointerAddress 8192
#endif
void PrintGLData(GLint elemSize, GLenum dataType, GLsizei stride, GLuint elemCount, const GLvoid* pointer) {
if (pointer > (GLvoid*)kMinGLPointerAddress && elemCount) {
size_t dataTypeSize = GLElementTypeSize(dataType);
if (dataTypeSize == 0) {
printf("Illegal GL data type %u", dataType);
}
GLsizei dataTypeStride = stride ? (stride / dataTypeSize) : elemSize;
GLvoid* p = (GLvoid*)pointer;
GLuint printCount = elemCount * dataTypeStride;
printf("\t(");
for (GLuint i = 0; i < printCount; i++, p += dataTypeSize) {
if (i > 0) printf(", ");
if (dataTypeStride > 1 && (i % dataTypeStride == 0)) {
printf("[");
}
switch (dataType) {
case GL_BYTE:
printf("%i", *(GLbyte*)p);
break;
case GL_UNSIGNED_BYTE:
printf("%u", *(GLubyte*)p);
break;
case GL_SHORT:
printf("%i", *(GLshort*)p);
break;
case GL_UNSIGNED_SHORT:
printf("%u", *(GLushort*)p);
break;
case GL_FLOAT:
printf("%.4f", *(GLfloat*)p);
break;
case GL_FIXED:
printf("%i", *(GLfixed*)p);
break;
default:
printf("Cannot print data from illegal data type %u", dataType);
}
if (dataTypeStride > 1 && (i % dataTypeStride == (elemSize - 1))) {
printf("]");
}
}
printf("...)\n");
}
}
#pragma mark OpenGLES base
void glAlphaFuncLogged(GLenum func, GLclampf ref) {
printf("glAlphaFunc(%s, %.2f)\n", GLEnumName(func), ref);
glAlphaFunc(func, ref);
}
void glClearColorLogged(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) {
printf("glClearColor(%.2f, %.2f, %.2f, %.2f)\n", red, green, blue, alpha);
glClearColor(red, green, blue, alpha);
}
void glClearDepthfLogged(GLclampf depth) {
printf("glClearDepthf(%.2f)\n", depth);
glClearDepthf(depth);
}
void glClipPlanefLogged(GLenum plane, const GLfloat *equation) {
printf("glClipPlanef(%s, %p)\n", GLEnumName(plane), equation);
glClipPlanef(plane, equation);
}
void glColor4fLogged(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) {
printf("glColor4f(%.2f, %.2f, %.2f, %.2f)\n", red, green, blue, alpha);
glColor4f(red, green, blue, alpha);
}
void glDepthRangefLogged(GLclampf zNear, GLclampf zFar) {
printf("glDepthRangef(%.2f, %.2f)\n", zNear, zFar);
glDepthRangef(zNear, zFar);
}
void glFogfLogged(GLenum pname, GLfloat param) {
printf("glFogf(%s, %.2f)\n", GLEnumName(pname), param);
glFogf(pname, param);
}
void glFogfvLogged(GLenum pname, const GLfloat *params) {
printf("glFogfv(%s, %p)\n", GLEnumName(pname), params);
glFogfv(pname, params);
}
void glFrustumfLogged(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) {
printf("glFrustumf(%.2f, %.2f, %.2f, %.2f, %.2f, %.2f)\n", left, right, bottom, top, zNear, zFar);
glFrustumf(left, right, bottom, top, zNear, zFar);
}
void glGetClipPlanefLogged(GLenum pname, GLfloat *equation) {
printf("glGetClipPlanef(%s, %p)\n", GLEnumName(pname), equation);
glGetClipPlanef(pname, equation);
}
void glGetFloatvLogged(GLenum pname, GLfloat *params) {
printf("glGetFloatv(%s, %p)\n", GLEnumName(pname), params);
glGetFloatv(pname, params);
}
void glGetLightfvLogged(GLenum light, GLenum pname, GLfloat *params) {
printf("glGetLightfv(%s, %s, %p)\n", GLEnumName(light), GLEnumName(pname), params);
glGetLightfv(light, pname, params);
}
void glGetMaterialfvLogged(GLenum face, GLenum pname, GLfloat *params) {
printf("glGetMaterialfv(%s, %s, %p)\n", GLEnumName(face), GLEnumName(pname), params);
glGetMaterialfv(face, pname, params);
}
void glGetTexEnvfvLogged(GLenum env, GLenum pname, GLfloat *params) {
printf("glGetTexEnvfv(%s, %s, %p)\n", GLEnumName(env), GLEnumName(pname), params);
glGetTexEnvfv(env, pname, params);
}
void glGetTexParameterfvLogged(GLenum target, GLenum pname, GLfloat *params) {
printf("glGetTexParameterfv(%s, %s, %p)\n", GLEnumName(target), GLEnumName(pname), params);
glGetTexParameterfv(target, pname, params);
}
void glLightModelfLogged(GLenum pname, GLfloat param) {
printf("glLightModelf(%s, %.2f)\n", GLEnumName(pname), param);
glLightModelf(pname, param);
}
void glLightModelfvLogged(GLenum pname, const GLfloat *params) {
printf("glLightModelfv(%s, %p)\n", GLEnumName(pname), params);
glLightModelfv(pname, params);
}
void glLightfLogged(GLenum light, GLenum pname, GLfloat param) {
printf("glLightf(%s, %s, %.2f)\n", GLEnumName(light), GLEnumName(pname), param);
glLightf(light, pname, param);
}
void glLightfvLogged(GLenum light, GLenum pname, const GLfloat *params) {
printf("glLightfv(%s, %s, %p)\n", GLEnumName(light), GLEnumName(pname), params);
PrintGLData(1, GL_FLOAT, 0, 4, params);
glLightfv(light, pname, params);
}
void glLineWidthLogged(GLfloat width) {
printf("glLineWidth(%.2f)\n", width);
glLineWidth(width);
}
void glLoadMatrixfLogged(const GLfloat *m) {
printf("glLoadMatrixf(%p)\n", m);
glLoadMatrixf(m);
}
void glMaterialfLogged(GLenum face, GLenum pname, GLfloat param) {
printf("glMaterialf(%s, %s, %.2f)\n", GLEnumName(face), GLEnumName(pname), param);
glMaterialf(face, pname, param);
}
void glMaterialfvLogged(GLenum face, GLenum pname, const GLfloat *params) {
printf("glMaterialfv(%s, %s, %p)\n", GLEnumName(face), GLEnumName(pname), params);
PrintGLData(1, GL_FLOAT, 0, 4, params);
glMaterialfv(face, pname, params);
}
void glMultMatrixfLogged(const GLfloat *m) {
printf("glMultMatrixf(%p)\n", m);
glMultMatrixf(m);
}
void glMultiTexCoord4fLogged(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) {
printf("glMultiTexCoord4f(%s, %.2f, %.2f, %.2f, %.2f)\n", GLEnumName(target), s, t, r, q);
glMultiTexCoord4f(target, s, t, r, q);
}
void glNormal3fLogged(GLfloat nx, GLfloat ny, GLfloat nz) {
printf("glNormal3f(%.2f, %.2f, %.2f)\n", nx, ny, nz);
glNormal3f(nx, ny, nz);
}
void glOrthofLogged(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) {
printf("glOrthof(%.2f, %.2f, %.2f, %.2f, %.2f, %.2f)\n", left, right, bottom, top, zNear, zFar);
glOrthof(left, right, bottom, top, zNear, zFar);
}
void glPointParameterfLogged(GLenum pname, GLfloat
没有合适的资源?快使用搜索试试~ 我知道了~
iOS游戏应用源代码——fishyman8u-THE_KEY-fe34aef.zip
共1460个文件
svn-base:640个
h:426个
cpp:173个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 196 浏览量
2023-07-02
15:48:02
上传
评论
收藏 3.37MB ZIP 举报
温馨提示
iOS游戏应用源代码——fishyman8u-THE_KEY-fe34aef.zip
资源推荐
资源详情
资源评论
收起资源包目录
iOS游戏应用源代码——fishyman8u-THE_KEY-fe34aef.zip (1460个子文件)
all-wcprops 11KB
all-wcprops 8KB
all-wcprops 5KB
all-wcprops 5KB
all-wcprops 4KB
all-wcprops 4KB
all-wcprops 3KB
all-wcprops 3KB
all-wcprops 2KB
all-wcprops 734B
all-wcprops 600B
all-wcprops 578B
all-wcprops 303B
all-wcprops 202B
all-wcprops 200B
all-wcprops 198B
all-wcprops 192B
CC3OpenGLES11Intercept.c 35KB
CC3OpenGLES11Utility.c 16KB
glu.c 3KB
base64.c 2KB
ccUtils.c 366B
PVRTModelPOD.cpp 160KB
btSoftBody.cpp 83KB
btConvexHullComputer.cpp 59KB
PVRTString.cpp 57KB
btSerializer.cpp 54KB
btCollisionWorld.cpp 52KB
btSequentialImpulseConstraintSolver.cpp 50KB
btQuantizedBvh.cpp 49KB
btDiscreteDynamicsWorld.cpp 40KB
btDbvt.cpp 35KB
btConeTwistConstraint.cpp 35KB
btHingeConstraint.cpp 32KB
btGeneric6DofConstraint.cpp 32KB
btConvexHull.cpp 28KB
btSoftBodyHelpers.cpp 28KB
PVRTMatrixF.cpp 27KB
btInternalEdgeUtility.cpp 25KB
btSliderConstraint.cpp 25KB
btGjkEpa2.cpp 24KB
b2World.cpp 24KB
PVRTVertex.cpp 23KB
btConvexConvexAlgorithm.cpp 23KB
PVRTBoneBatch.cpp 22KB
btGImpactCollisionAlgorithm.cpp 21KB
btDbvtBroadphase.cpp 21KB
btRaycastVehicle.cpp 21KB
btBoxBoxDetector.cpp 21KB
btKinematicCharacterController.cpp 19KB
b2ContactSolver.cpp 18KB
btVoronoiSimplexSolver.cpp 17KB
btMultiSapBroadphase.cpp 17KB
btQuickprof.cpp 16KB
PVRTVector.cpp 16KB
gim_tri_collision.cpp 16KB
b2PrismaticJoint.cpp 16KB
btOverlappingPairCache.cpp 15KB
btStridingMeshInterface.cpp 15KB
PVRTTrans.cpp 15KB
b2LineJoint.cpp 15KB
btBvhTriangleMeshShape.cpp 14KB
btGjkPairDetector.cpp 14KB
PVRTglesExt.cpp 13KB
Bullet-C-API.cpp 13KB
btPolyhedralContactClipping.cpp 13KB
btGImpactQuantizedBvh.cpp 13KB
b2Distance.cpp 13KB
btConvexShape.cpp 13KB
btRigidBody.cpp 13KB
b2Island.cpp 13KB
b2RevoluteJoint.cpp 13KB
btSimulationIslandManager.cpp 13KB
btSoftBodyConcaveCollisionAlgorithm.cpp 13KB
btCompoundCollisionAlgorithm.cpp 13KB
btOptimizedBvh.cpp 12KB
btBox2dBox2dCollisionAlgorithm.cpp 12KB
b2TimeOfImpact.cpp 12KB
btGImpactBvh.cpp 12KB
btMinkowskiPenetrationDepthSolver.cpp 12KB
btDefaultCollisionConfiguration.cpp 11KB
btSoftRigidDynamicsWorld.cpp 11KB
b2PolygonShape.cpp 11KB
b2PulleyJoint.cpp 11KB
PVRTResourceFile.cpp 11KB
btCompoundShape.cpp 11KB
btHeightfieldTerrainShape.cpp 11KB
btConvexConcaveCollisionAlgorithm.cpp 10KB
b2Body.cpp 10KB
btPolyhedralConvexShape.cpp 10KB
btSimpleBroadphase.cpp 9KB
btCollisionDispatcher.cpp 9KB
PVRTQuaternionF.cpp 9KB
b2CollidePolygon.cpp 9KB
btConvex2dConvex2dAlgorithm.cpp 8KB
b2DynamicTree.cpp 8KB
btConvexTriangleMeshShape.cpp 8KB
btConvexPolyhedron.cpp 8KB
btSphereBoxCollisionAlgorithm.cpp 8KB
btSolve2LinearConstraint.cpp 8KB
共 1460 条
- 1
- 2
- 3
- 4
- 5
- 6
- 15
资源评论
快乐无限出发
- 粉丝: 1131
- 资源: 7269
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功