Fork me on GitHub

CCObj2opengl

CCObj2opengl

script to convert 3D models of OBJ files to OC/C/C++ float arrays (vertices, faces, texture) compatible with OpenGL ES glDrawArrays compatible with iPhone/iPad/macOS

CCObj2opengl come frome obj2opengl

obj2opengl –>It will not be updated for a long time. This script will be slightly adjusted later

Convert 3D models of OBJ file

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
CC # ls
CCObj2opengl.pl CCTest.obj CCTestObj.png CCTestRun.png LICENSE README.md
CC # ./CCObj2opengl.pl CCTest.obj
Input file : ./CCTest.obj
Output file : ./CCTest.h
Object name : CCTest
Center : <0, 0, 0>
Scale by : 0.5
----------------
Vertices : 8
Faces : 12
Texture Coords : 14
Normals : 6
CC # ls
CCObj2opengl.pl CCTest.h CCTest.obj CCTestObj.png CCTestRun.png LICENSE README.md
CC #

Test OBJ file

CCTestObj.png

CCSphere1.png

Test OBJ file run iPhone

CCCTestRun.png

CCSphere2.png

Test OBJ file run iPhone Device Effects

IMG_1763.JPG

IMG_1764.JPG

IMG_1767.JPG