레이블이 Graphics인 게시물을 표시합니다. 모든 게시물 표시
레이블이 Graphics인 게시물을 표시합니다. 모든 게시물 표시

2014년 2월 11일 화요일

CC3Mesh in Cocos3D

/*
 * /cocos3d/cocos3d/Meshes/
 * CC3Mesh is an abstract class. Subclasses can be created for loading and managing
 * meshes from different sources and third-party libraries.
 */

@interface CC3Mesh : CC3Identifiable {
CC3FaceArray* _faces;
CC3VertexLocations* _vertexLocations;
CC3VertexNormals* _vertexNormals;
CC3VertexTangents* _vertexTangents;
CC3VertexTangents* _vertexBitangents;
CC3VertexColors* _vertexColors;
CC3VertexTextureCoordinates* _vertexTextureCoordinates;
CCArray* _overlayTextureCoordinates;
CC3VertexMatrixIndices* _vertexMatrixIndices;
CC3VertexWeights* _vertexWeights;
CC3VertexPointSizes* _vertexPointSizes;
CC3VertexIndices* _vertexIndices;
GLfloat _capacityExpansionFactor;
BOOL _shouldInterleaveVertices : 1;

}

...


2012년 2월 10일 금요일

When glBindTexture doesn't work... (multiple texture image)

glBindTexture 를 했는데, (glGenTextures 로 값도 잘 얻어 왔는데..)
texture가 안 붙으면..  (texture file 이 여러 개인경우..)

glBegin(GL_TRIANGLES (or..) ) 밖에서 되었는지 확인.
상식적으로 생각해보면 texture는 geometry 를 어떻게 할지 시작하기전에 이루어져야함.
glBegin = delimit the vertices of a primitive or a group of like primitives


찾아보니 아래와 같네..
무조건 받아들이는 거보다 왜 저것만 되는지 생각해보면 납득 OK

You can use only a subset of OpenGL functions between glBegin and glEnd. The functions you can use are:
glVertex
glColor
glIndex
glNormal
glTexCoord
glEvalCoord
glEvalPoint
glMaterial
glEdgeFlag

http://www.gamedev.net/topic/83150-glbindtexture-inside-of-glbegin/