├── .gitignore ├── OS X examples └── README.md ├── README.md ├── group projects ├── OpenGLES_Ch3_1_MKY-1 │ ├── Default-568h@2x.png │ ├── OpenGLES_Ch3_1.xcodeproj │ │ └── project.pbxproj │ ├── OpenGLES_Ch3_1 │ │ ├── OpenGLES_Ch3_1-Info.plist │ │ ├── OpenGLES_Ch3_1-Prefix.pch │ │ ├── OpenGLES_Ch3_1AppDelegate.h │ │ ├── OpenGLES_Ch3_1AppDelegate.m │ │ ├── OpenGLES_Ch3_1ViewController.h │ │ ├── OpenGLES_Ch3_1ViewController.m │ │ ├── en.lproj │ │ │ ├── InfoPlist.strings │ │ │ ├── MainStoryboard_iPad.storyboard │ │ │ └── MainStoryboard_iPhone.storyboard │ │ ├── leaves.gif │ │ └── main.m │ ├── OpenGL_ES_for_iOS_114x114.png │ ├── OpenGL_ES_for_iOS_57x57.png │ └── OpenGL_ES_for_iOS_72x72.png ├── OpenGLES_Ch4_1_light │ ├── Default-568h@2x.png │ ├── OpenGLES_Ch4_1.xcodeproj │ │ └── project.pbxproj │ ├── OpenGLES_Ch4_1 │ │ ├── OpenGLES_Ch4_1-Info.plist │ │ ├── OpenGLES_Ch4_1-Prefix.pch │ │ ├── OpenGLES_Ch4_1AppDelegate.h │ │ ├── OpenGLES_Ch4_1AppDelegate.m │ │ ├── OpenGLES_Ch4_1ViewController.h │ │ ├── OpenGLES_Ch4_1ViewController.m │ │ ├── en.lproj │ │ │ ├── InfoPlist.strings │ │ │ ├── MainStoryboard_iPad.storyboard │ │ │ └── MainStoryboard_iPhone.storyboard │ │ └── main.m │ ├── OpenGL_ES_for_iOS_114x114.png │ ├── OpenGL_ES_for_iOS_57x57.png │ └── OpenGL_ES_for_iOS_72x72.png └── README.md └── iOS examples ├── AGLKit ├── AGLKAxisAllignedBoundingBox.h ├── AGLKCollision.h ├── AGLKCollision.m ├── AGLKContext.h ├── AGLKContext.m ├── AGLKFilters.h ├── AGLKFilters.m ├── AGLKFrustum.h ├── AGLKFrustum.m ├── AGLKPointParticleEffect.h ├── AGLKPointParticleEffect.m ├── AGLKSkyboxEffect.h ├── AGLKSkyboxEffect.m ├── AGLKTextureLoader.h ├── AGLKTextureLoader.m ├── AGLKTextureTransformBaseEffect.h ├── AGLKTextureTransformBaseEffect.m ├── AGLKVertexAttribArrayBuffer.h ├── AGLKVertexAttribArrayBuffer.m ├── AGLKView.h ├── AGLKView.m ├── AGLKViewController.h ├── AGLKViewController.m └── Shaders │ ├── AGLKPointParticleShader.fsh │ ├── AGLKPointParticleShader.vsh │ ├── AGLKSkyboxShader.fsh │ ├── AGLKSkyboxShader.vsh │ ├── AGLKTextureMatrix2PointLightShader.fsh │ └── AGLKTextureMatrix2PointLightShader.vsh ├── Resources └── trail.binary ├── Utility ├── Shaders │ ├── UtilityArmaturePointLightShader.fsh │ ├── UtilityArmaturePointLightShader.vsh │ ├── UtilityBillboardParticleShader.fsh │ ├── UtilityBillboardParticleShader.vsh │ ├── UtilityModelShader.fsh │ ├── UtilityModelShader.vsh │ ├── UtilityPickTerrainShader.fsh │ ├── UtilityPickTerrainShader.vsh │ ├── UtilityTerrainShader.fsh │ └── UtilityTerrainShader.vsh ├── UtilityArmatureBaseEffect.h ├── UtilityArmatureBaseEffect.m ├── UtilityBillboard.h ├── UtilityBillboard.m ├── UtilityBillboardManager+viewAdditions.h ├── UtilityBillboardManager+viewAdditions.m ├── UtilityBillboardManager.h ├── UtilityBillboardManager.m ├── UtilityBillboardParticle.h ├── UtilityBillboardParticle.m ├── UtilityBillboardParticleEffect.h ├── UtilityBillboardParticleEffect.m ├── UtilityBillboardParticleManager+viewAdditions.h ├── UtilityBillboardParticleManager+viewAdditions.m ├── UtilityBillboardParticleManager.h ├── UtilityBillboardParticleManager.m ├── UtilityCamera.h ├── UtilityCamera.m ├── UtilityEffect.h ├── UtilityEffect.m ├── UtilityJoint.h ├── UtilityJoint.m ├── UtilityMesh+skinning.h ├── UtilityMesh+skinning.m ├── UtilityMesh+viewAdditions.h ├── UtilityMesh+viewAdditions.m ├── UtilityMesh.h ├── UtilityMesh.m ├── UtilityModel+skinning.h ├── UtilityModel+skinning.m ├── UtilityModel+viewAdditions.h ├── UtilityModel+viewAdditions.m ├── UtilityModel.h ├── UtilityModel.m ├── UtilityModelEffect.h ├── UtilityModelEffect.m ├── UtilityModelManager+skinning.h ├── UtilityModelManager+skinning.m ├── UtilityModelManager.h ├── UtilityModelManager.m ├── UtilityPickTerrainEffect.h ├── UtilityPickTerrainEffect.m ├── UtilityTerrainEffect.h ├── UtilityTerrainEffect.m ├── UtilityTextureInfo+viewAdditions.h ├── UtilityTextureInfo+viewAdditions.m ├── UtilityTextureInfo.h └── UtilityTextureInfo.m ├── ch02_EXAMPLES ├── OpenGLES_Ch2_1 │ ├── Default-568h@2x.png │ ├── OpenGLES_Ch2_1.xcodeproj │ │ └── project.pbxproj │ ├── OpenGLES_Ch2_1 │ │ ├── OpenGLES_Ch2_1-Info.plist │ │ ├── OpenGLES_Ch2_1-Prefix.pch │ │ ├── OpenGLES_Ch2_1AppDelegate.h │ │ ├── OpenGLES_Ch2_1AppDelegate.m │ │ ├── OpenGLES_Ch2_1ViewController.h │ │ ├── OpenGLES_Ch2_1ViewController.m │ │ ├── en.lproj │ │ │ ├── InfoPlist.strings │ │ │ ├── MainStoryboard_iPad.storyboard │ │ │ └── MainStoryboard_iPhone.storyboard │ │ └── main.m │ ├── OpenGL_ES_for_iOS_114x114.png │ ├── OpenGL_ES_for_iOS_57x57.png │ └── OpenGL_ES_for_iOS_72x72.png ├── OpenGLES_Ch2_2 │ ├── Default-568h@2x.png │ ├── OpenGLES_Ch2_2.xcodeproj │ │ └── project.pbxproj │ ├── OpenGLES_Ch2_2 │ │ ├── OpenGLES_Ch2_2-Info.plist │ │ ├── OpenGLES_Ch2_2-Prefix.pch │ │ ├── OpenGLES_Ch2_2AppDelegate.h │ │ ├── OpenGLES_Ch2_2AppDelegate.m │ │ ├── OpenGLES_Ch2_2ViewController.h │ │ ├── OpenGLES_Ch2_2ViewController.m │ │ ├── en.lproj │ │ │ ├── InfoPlist.strings │ │ │ ├── MainStoryboard_iPad.storyboard │ │ │ └── MainStoryboard_iPhone.storyboard │ │ └── main.m │ ├── OpenGL_ES_for_iOS_114x114.png │ ├── OpenGL_ES_for_iOS_57x57.png │ └── OpenGL_ES_for_iOS_72x72.png └── OpenGLES_Ch2_3 │ ├── Default-568h@2x.png │ ├── OpenGLES_Ch2_3.xcodeproj │ └── project.pbxproj │ ├── OpenGLES_Ch2_3 │ ├── OpenGLES_Ch2_3-Info.plist │ ├── OpenGLES_Ch2_3-Prefix.pch │ ├── OpenGLES_Ch2_3AppDelegate.h │ ├── OpenGLES_Ch2_3AppDelegate.m │ ├── OpenGLES_Ch2_3ViewController.h │ ├── OpenGLES_Ch2_3ViewController.m │ ├── en.lproj │ │ ├── InfoPlist.strings │ │ ├── MainStoryboard_iPad.storyboard │ │ └── MainStoryboard_iPhone.storyboard │ └── main.m │ ├── OpenGL_ES_for_iOS_114x114.png │ ├── OpenGL_ES_for_iOS_57x57.png │ └── OpenGL_ES_for_iOS_72x72.png ├── ch03_EXAMPLES ├── OpenGLES_Ch3_1 │ ├── Default-568h@2x.png │ ├── OpenGLES_Ch3_1.xcodeproj │ │ └── project.pbxproj │ ├── OpenGLES_Ch3_1 │ │ ├── OpenGLES_Ch3_1-Info.plist │ │ ├── OpenGLES_Ch3_1-Prefix.pch │ │ ├── OpenGLES_Ch3_1AppDelegate.h │ │ ├── OpenGLES_Ch3_1AppDelegate.m │ │ ├── OpenGLES_Ch3_1ViewController.h │ │ ├── OpenGLES_Ch3_1ViewController.m │ │ ├── en.lproj │ │ │ ├── InfoPlist.strings │ │ │ ├── MainStoryboard_iPad.storyboard │ │ │ └── MainStoryboard_iPhone.storyboard │ │ ├── leaves.gif │ │ └── main.m │ ├── OpenGL_ES_for_iOS_114x114.png │ ├── OpenGL_ES_for_iOS_57x57.png │ └── OpenGL_ES_for_iOS_72x72.png ├── OpenGLES_Ch3_2 │ ├── Default-568h@2x.png │ ├── OpenGLES_Ch3_2.xcodeproj │ │ └── project.pbxproj │ ├── OpenGLES_Ch3_2 │ │ ├── OpenGLES_Ch3_2-Info.plist │ │ ├── OpenGLES_Ch3_2-Prefix.pch │ │ ├── OpenGLES_Ch3_2AppDelegate.h │ │ ├── OpenGLES_Ch3_2AppDelegate.m │ │ ├── OpenGLES_Ch3_2ViewController.h │ │ ├── OpenGLES_Ch3_2ViewController.m │ │ ├── en.lproj │ │ │ ├── InfoPlist.strings │ │ │ ├── MainStoryboard_iPad.storyboard │ │ │ └── MainStoryboard_iPhone.storyboard │ │ ├── leaves.gif │ │ └── main.m │ ├── OpenGL_ES_for_iOS_114x114.png │ ├── OpenGL_ES_for_iOS_57x57.png │ └── OpenGL_ES_for_iOS_72x72.png ├── OpenGLES_Ch3_3 │ ├── Default-568h@2x.png │ ├── OpenGLES_Ch3_3.xcodeproj │ │ └── project.pbxproj │ ├── OpenGLES_Ch3_3 │ │ ├── OpenGLES_Ch3_3-Info.plist │ │ ├── OpenGLES_Ch3_3-Prefix.pch │ │ ├── OpenGLES_Ch3_3AppDelegate.h │ │ ├── OpenGLES_Ch3_3AppDelegate.m │ │ ├── OpenGLES_Ch3_3ViewController.h │ │ ├── OpenGLES_Ch3_3ViewController.m │ │ ├── en.lproj │ │ │ ├── InfoPlist.strings │ │ │ ├── MainStoryboard_iPad.storyboard │ │ │ └── MainStoryboard_iPhone.storyboard │ │ ├── grid.png │ │ └── main.m │ ├── OpenGL_ES_for_iOS_114x114.png │ ├── OpenGL_ES_for_iOS_57x57.png │ └── OpenGL_ES_for_iOS_72x72.png ├── OpenGLES_Ch3_4 │ ├── Default-568h@2x.png │ ├── OpenGLES_Ch3_4.xcodeproj │ │ └── project.pbxproj │ ├── OpenGLES_Ch3_4 │ │ ├── OpenGLES_Ch3_4-Info.plist │ │ ├── OpenGLES_Ch3_4-Prefix.pch │ │ ├── OpenGLES_Ch3_4AppDelegate.h │ │ ├── OpenGLES_Ch3_4AppDelegate.m │ │ ├── OpenGLES_Ch3_4ViewController.h │ │ ├── OpenGLES_Ch3_4ViewController.m │ │ ├── beetle.png │ │ ├── en.lproj │ │ │ ├── InfoPlist.strings │ │ │ ├── MainStoryboard_iPad.storyboard │ │ │ └── MainStoryboard_iPhone.storyboard │ │ ├── leaves.gif │ │ └── main.m │ ├── OpenGL_ES_for_iOS_114x114.png │ ├── OpenGL_ES_for_iOS_57x57.png │ └── OpenGL_ES_for_iOS_72x72.png ├── OpenGLES_Ch3_5 │ ├── Default-568h@2x.png │ ├── OpenGLES_Ch3_5.xcodeproj │ │ └── project.pbxproj │ ├── OpenGLES_Ch3_5 │ │ ├── OpenGLES_Ch3_5-Info.plist │ │ ├── OpenGLES_Ch3_5-Prefix.pch │ │ ├── OpenGLES_Ch3_5AppDelegate.h │ │ ├── OpenGLES_Ch3_5AppDelegate.m │ │ ├── OpenGLES_Ch3_5ViewController.h │ │ ├── OpenGLES_Ch3_5ViewController.m │ │ ├── beetle.png │ │ ├── en.lproj │ │ │ ├── InfoPlist.strings │ │ │ ├── MainStoryboard_iPad.storyboard │ │ │ └── MainStoryboard_iPhone.storyboard │ │ ├── leaves.gif │ │ └── main.m │ ├── OpenGL_ES_for_iOS_114x114.png │ ├── OpenGL_ES_for_iOS_57x57.png │ └── OpenGL_ES_for_iOS_72x72.png └── OpenGLES_Ch3_6 │ ├── Default-568h@2x.png │ ├── OpenGLES_Ch3_6.xcodeproj │ └── project.pbxproj │ ├── OpenGLES_Ch3_6 │ ├── OpenGLES_Ch3_6-Info.plist │ ├── OpenGLES_Ch3_6-Prefix.pch │ ├── OpenGLES_Ch3_6AppDelegate.h │ ├── OpenGLES_Ch3_6AppDelegate.m │ ├── OpenGLES_Ch3_6ViewController.h │ ├── OpenGLES_Ch3_6ViewController.m │ ├── Shaders │ │ ├── Shader.fsh │ │ └── Shader.vsh │ ├── beetle.png │ ├── en.lproj │ │ ├── InfoPlist.strings │ │ ├── MainStoryboard_iPad.storyboard │ │ └── MainStoryboard_iPhone.storyboard │ ├── leaves.gif │ └── main.m │ ├── OpenGL_ES_for_iOS_114x114.png │ ├── OpenGL_ES_for_iOS_57x57.png │ └── OpenGL_ES_for_iOS_72x72.png ├── ch04_EXAMPLES ├── OpenGLES_Ch4_1 │ ├── Default-568h@2x.png │ ├── OpenGLES_Ch4_1.xcodeproj │ │ └── project.pbxproj │ ├── OpenGLES_Ch4_1 │ │ ├── OpenGLES_Ch4_1-Info.plist │ │ ├── OpenGLES_Ch4_1-Prefix.pch │ │ ├── OpenGLES_Ch4_1AppDelegate.h │ │ ├── OpenGLES_Ch4_1AppDelegate.m │ │ ├── OpenGLES_Ch4_1ViewController.h │ │ ├── OpenGLES_Ch4_1ViewController.m │ │ ├── en.lproj │ │ │ ├── InfoPlist.strings │ │ │ ├── MainStoryboard_iPad.storyboard │ │ │ └── MainStoryboard_iPhone.storyboard │ │ └── main.m │ ├── OpenGL_ES_for_iOS_114x114.png │ ├── OpenGL_ES_for_iOS_57x57.png │ └── OpenGL_ES_for_iOS_72x72.png └── OpenGLES_Ch4_2 │ ├── Default-568h@2x.png │ ├── OpenGLES_Ch4_2.xcodeproj │ └── project.pbxproj │ ├── OpenGLES_Ch4_2 │ ├── Lighting256x256.png │ ├── LightingDetail256x256.png │ ├── OpenGLES_Ch4_2-Info.plist │ ├── OpenGLES_Ch4_2-Prefix.pch │ ├── OpenGLES_Ch4_2AppDelegate.h │ ├── OpenGLES_Ch4_2AppDelegate.m │ ├── OpenGLES_Ch4_2ViewController.h │ ├── OpenGLES_Ch4_2ViewController.m │ ├── en.lproj │ │ ├── InfoPlist.strings │ │ ├── MainStoryboard_iPad.storyboard │ │ └── MainStoryboard_iPhone.storyboard │ ├── grid.png │ └── main.m │ ├── OpenGL_ES_for_iOS_114x114.png │ ├── OpenGL_ES_for_iOS_57x57.png │ └── OpenGL_ES_for_iOS_72x72.png ├── ch05_EXAMPLES ├── OpenGLES_Ch5_1 │ ├── Default-568h@2x.png │ ├── OpenGLES_Ch5_1.xcodeproj │ │ └── project.pbxproj │ ├── OpenGLES_Ch5_1 │ │ ├── Earth512x256.jpg │ │ ├── OpenGLES_Ch5_1-Info.plist │ │ ├── OpenGLES_Ch5_1-Prefix.pch │ │ ├── OpenGLES_Ch5_1AppDelegate.h │ │ ├── OpenGLES_Ch5_1AppDelegate.m │ │ ├── OpenGLES_Ch5_1ViewController.h │ │ ├── OpenGLES_Ch5_1ViewController.m │ │ ├── en.lproj │ │ │ ├── InfoPlist.strings │ │ │ ├── MainStoryboard_iPad.storyboard │ │ │ └── MainStoryboard_iPhone.storyboard │ │ └── main.m │ ├── OpenGL_ES_for_iOS_114x114.png │ ├── OpenGL_ES_for_iOS_57x57.png │ └── OpenGL_ES_for_iOS_72x72.png ├── OpenGLES_Ch5_2 │ ├── Default-568h@2x.png │ ├── OpenGLES_Ch5_2.xcodeproj │ │ └── project.pbxproj │ ├── OpenGLES_Ch5_2 │ │ ├── Earth512x256.jpg │ │ ├── OpenGLES_Ch5_2-Info.plist │ │ ├── OpenGLES_Ch5_2-Prefix.pch │ │ ├── OpenGLES_Ch5_2AppDelegate.h │ │ ├── OpenGLES_Ch5_2AppDelegate.m │ │ ├── OpenGLES_Ch5_2ViewController.h │ │ ├── OpenGLES_Ch5_2ViewController.m │ │ ├── en.lproj │ │ │ ├── InfoPlist.strings │ │ │ ├── MainStoryboard_iPad.storyboard │ │ │ └── MainStoryboard_iPhone.storyboard │ │ └── main.m │ ├── OpenGL_ES_for_iOS_114x114.png │ ├── OpenGL_ES_for_iOS_57x57.png │ └── OpenGL_ES_for_iOS_72x72.png ├── OpenGLES_Ch5_3 │ ├── Default-568h@2x.png │ ├── OpenGLES_Ch5_3.xcodeproj │ │ └── project.pbxproj │ ├── OpenGLES_Ch5_3 │ │ ├── Earth512x256.jpg │ │ ├── OpenGLES_Ch5_3-Info.plist │ │ ├── OpenGLES_Ch5_3-Prefix.pch │ │ ├── OpenGLES_Ch5_3AppDelegate.h │ │ ├── OpenGLES_Ch5_3AppDelegate.m │ │ ├── OpenGLES_Ch5_3ViewController.h │ │ ├── OpenGLES_Ch5_3ViewController.m │ │ ├── en.lproj │ │ │ ├── InfoPlist.strings │ │ │ ├── MainStoryboard_iPad.storyboard │ │ │ └── MainStoryboard_iPhone.storyboard │ │ └── main.m │ ├── OpenGL_ES_for_iOS_114x114.png │ ├── OpenGL_ES_for_iOS_57x57.png │ └── OpenGL_ES_for_iOS_72x72.png ├── OpenGLES_Ch5_4 │ ├── Default-568h@2x.png │ ├── OpenGLES_Ch5_4.xcodeproj │ │ └── project.pbxproj │ ├── OpenGLES_Ch5_4 │ │ ├── OpenGLES_Ch5_4-Info.plist │ │ ├── OpenGLES_Ch5_4-Prefix.pch │ │ ├── OpenGLES_Ch5_4AppDelegate.h │ │ ├── OpenGLES_Ch5_4AppDelegate.m │ │ ├── OpenGLES_Ch5_4ViewController.h │ │ ├── OpenGLES_Ch5_4ViewController.m │ │ ├── en.lproj │ │ │ ├── InfoPlist.strings │ │ │ ├── MainStoryboard_iPad.storyboard │ │ │ └── MainStoryboard_iPhone.storyboard │ │ └── main.m │ ├── OpenGL_ES_for_iOS_114x114.png │ ├── OpenGL_ES_for_iOS_57x57.png │ └── OpenGL_ES_for_iOS_72x72.png ├── OpenGLES_Ch5_5 │ ├── Default-568h@2x.png │ ├── OpenGLES_Ch5_5.xcodeproj │ │ └── project.pbxproj │ ├── OpenGLES_Ch5_5 │ │ ├── OpenGLES_Ch5_5-Info.plist │ │ ├── OpenGLES_Ch5_5-Prefix.pch │ │ ├── OpenGLES_Ch5_5AppDelegate.h │ │ ├── OpenGLES_Ch5_5AppDelegate.m │ │ ├── OpenGLES_Ch5_5ViewController.h │ │ ├── OpenGLES_Ch5_5ViewController.m │ │ ├── beetle.png │ │ ├── en.lproj │ │ │ ├── InfoPlist.strings │ │ │ ├── MainStoryboard_iPad.storyboard │ │ │ └── MainStoryboard_iPhone.storyboard │ │ ├── leaves.gif │ │ └── main.m │ ├── OpenGL_ES_for_iOS_114x114.png │ ├── OpenGL_ES_for_iOS_57x57.png │ └── OpenGL_ES_for_iOS_72x72.png ├── OpenGLES_Ch5_6 │ ├── Default-568h@2x.png │ ├── OpenGLES_Ch5_6.xcodeproj │ │ └── project.pbxproj │ ├── OpenGLES_Ch5_6 │ │ ├── Earth512x256.jpg │ │ ├── Moon256x128.png │ │ ├── OpenGLES_Ch5_6-Info.plist │ │ ├── OpenGLES_Ch5_6-Prefix.pch │ │ ├── OpenGLES_Ch5_6AppDelegate.h │ │ ├── OpenGLES_Ch5_6AppDelegate.m │ │ ├── OpenGLES_Ch5_6ViewController.h │ │ ├── OpenGLES_Ch5_6ViewController.m │ │ ├── en.lproj │ │ │ ├── InfoPlist.strings │ │ │ ├── MainStoryboard_iPad.storyboard │ │ │ └── MainStoryboard_iPhone.storyboard │ │ └── main.m │ ├── OpenGL_ES_for_iOS_114x114.png │ ├── OpenGL_ES_for_iOS_57x57.png │ └── OpenGL_ES_for_iOS_72x72.png └── Resources │ ├── ReadMe.txt │ ├── lowPolyAxesAndModels2.blend │ ├── lowPolyAxesAndModels2.h │ ├── lowPolyAxesAndModels2.obj │ ├── obj2opengl.pl │ ├── obj2openglFlippedZ.pl │ ├── sphere.blend │ ├── sphere.h │ └── sphere.obj ├── ch06_EXAMPLES ├── CommonCode │ ├── SceneAnimatedMesh.h │ ├── SceneAnimatedMesh.m │ ├── SceneMesh.h │ ├── SceneMesh.m │ ├── SceneModel.h │ ├── SceneModel.m │ └── canLight.h ├── OpenGLES_Ch6_1 │ ├── Default-568h@2x.png │ ├── OpenGLES_Ch6_1.xcodeproj │ │ └── project.pbxproj │ ├── OpenGLES_Ch6_1 │ │ ├── OpenGLES_Ch6_1-Info.plist │ │ ├── OpenGLES_Ch6_1-Prefix.pch │ │ ├── OpenGLES_Ch6_1AppDelegate.h │ │ ├── OpenGLES_Ch6_1AppDelegate.m │ │ ├── OpenGLES_Ch6_1ViewController.h │ │ ├── OpenGLES_Ch6_1ViewController.m │ │ ├── SceneCar.h │ │ ├── SceneCar.m │ │ ├── SceneCarModel.h │ │ ├── SceneCarModel.m │ │ ├── SceneRinkModel.h │ │ ├── SceneRinkModel.m │ │ ├── bumperCar.h │ │ ├── bumperRink.h │ │ ├── en.lproj │ │ │ ├── InfoPlist.strings │ │ │ ├── MainStoryboard_iPad.storyboard │ │ │ └── MainStoryboard_iPhone.storyboard │ │ └── main.m │ ├── OpenGL_ES_for_iOS_114x114.png │ ├── OpenGL_ES_for_iOS_57x57.png │ └── OpenGL_ES_for_iOS_72x72.png ├── OpenGLES_Ch6_2 │ ├── Default-568h@2x.png │ ├── OpenGLES_Ch6_2.xcodeproj │ │ └── project.pbxproj │ ├── OpenGLES_Ch6_2 │ │ ├── OpenGLES_Ch6_2-Info.plist │ │ ├── OpenGLES_Ch6_2-Prefix.pch │ │ ├── OpenGLES_Ch6_2AppDelegate.h │ │ ├── OpenGLES_Ch6_2AppDelegate.m │ │ ├── OpenGLES_Ch6_2ViewController.h │ │ ├── OpenGLES_Ch6_2ViewController.m │ │ ├── en.lproj │ │ │ ├── InfoPlist.strings │ │ │ ├── MainStoryboard_iPad.storyboard │ │ │ └── MainStoryboard_iPhone.storyboard │ │ └── main.m │ ├── OpenGL_ES_for_iOS_114x114.png │ ├── OpenGL_ES_for_iOS_57x57.png │ └── OpenGL_ES_for_iOS_72x72.png ├── OpenGLES_Ch6_3 │ ├── .DS_Store │ ├── Default-568h@2x.png │ ├── OpenGLES_Ch6_3.xcodeproj │ │ └── project.pbxproj │ ├── OpenGLES_Ch6_3 │ │ ├── OpenGLES_Ch6_3-Info.plist │ │ ├── OpenGLES_Ch6_3-Prefix.pch │ │ ├── OpenGLES_Ch6_3AppDelegate.h │ │ ├── OpenGLES_Ch6_3AppDelegate.m │ │ ├── OpenGLES_Ch6_3ViewController.h │ │ ├── OpenGLES_Ch6_3ViewController.m │ │ ├── RadiusSelectionTool.png │ │ ├── SceneCanLightModel.h │ │ ├── SceneCanLightModel.m │ │ ├── SceneMesh.h │ │ ├── SceneMesh.m │ │ ├── Shaders │ │ │ └── .DS_Store │ │ ├── en.lproj │ │ │ ├── InfoPlist.strings │ │ │ ├── MainStoryboard_iPad.storyboard │ │ │ └── MainStoryboard_iPhone.storyboard │ │ └── main.m │ ├── OpenGL_ES_for_iOS_114x114.png │ ├── OpenGL_ES_for_iOS_57x57.png │ └── OpenGL_ES_for_iOS_72x72.png ├── OpenGLES_Ch6_4 │ ├── .DS_Store │ ├── Default-568h@2x.png │ ├── OpenGLES_Ch6_4.xcodeproj │ │ └── project.pbxproj │ ├── OpenGLES_Ch6_4 │ │ ├── OpenGLES_Ch6_4-Info.plist │ │ ├── OpenGLES_Ch6_4-Prefix.pch │ │ ├── OpenGLES_Ch6_4AppDelegate.h │ │ ├── OpenGLES_Ch6_4AppDelegate.m │ │ ├── OpenGLES_Ch6_4ViewController.h │ │ ├── OpenGLES_Ch6_4ViewController.m │ │ ├── RadiusSelectionTool.png │ │ ├── SceneCanLightModel.h │ │ ├── SceneCanLightModel.m │ │ ├── Shaders │ │ │ └── .DS_Store │ │ ├── en.lproj │ │ │ ├── InfoPlist.strings │ │ │ ├── MainStoryboard_iPad.storyboard │ │ │ └── MainStoryboard_iPhone.storyboard │ │ └── main.m │ ├── OpenGL_ES_for_iOS_114x114.png │ ├── OpenGL_ES_for_iOS_57x57.png │ └── OpenGL_ES_for_iOS_72x72.png ├── OpenGLES_Ch6_5 │ ├── .DS_Store │ ├── Default-568h@2x.png │ ├── OpenGLES_Ch6_5.xcodeproj │ │ └── project.pbxproj │ ├── OpenGLES_Ch6_5 │ │ ├── OpenGLES_Ch6_5-Info.plist │ │ ├── OpenGLES_Ch6_5-Prefix.pch │ │ ├── OpenGLES_Ch6_5AppDelegate.h │ │ ├── OpenGLES_Ch6_5AppDelegate.m │ │ ├── OpenGLES_Ch6_5ViewController.h │ │ ├── OpenGLES_Ch6_5ViewController.m │ │ ├── RabbitTextureAtlas.png │ │ ├── SceneCanLightModel.h │ │ ├── SceneCanLightModel.m │ │ ├── Shaders │ │ │ └── .DS_Store │ │ ├── en.lproj │ │ │ ├── InfoPlist.strings │ │ │ ├── MainStoryboard_iPad.storyboard │ │ │ └── MainStoryboard_iPhone.storyboard │ │ └── main.m │ ├── OpenGL_ES_for_iOS_114x114.png │ ├── OpenGL_ES_for_iOS_57x57.png │ └── OpenGL_ES_for_iOS_72x72.png └── Resources │ ├── ReadMe.txt │ ├── bumperCar.blend │ ├── bumperCar.dae │ ├── bumperCar.h │ ├── bumperCar.obj │ ├── bumperCar.skp │ ├── bumperRink.blend │ ├── bumperRink.dae │ ├── bumperRink.h │ ├── bumperRink.obj │ ├── bumperRink.skp │ ├── canLight.h │ ├── canLight.obj │ └── obj2opengl.pl ├── ch07_EXAMPLES ├── COLLADAViewer │ ├── COLLADAViewer.xcodeproj │ │ └── project.pbxproj │ └── COLLADAViewer │ │ ├── COLLADAGeometryInfo.h │ │ ├── COLLADAGeometryInfo.m │ │ ├── COLLADAGeometryParser.h │ │ ├── COLLADAGeometryParser.m │ │ ├── COLLADANode.h │ │ ├── COLLADANode.m │ │ ├── COLLADAParser.h │ │ ├── COLLADAParser.m │ │ ├── COLLADARootNode.h │ │ ├── COLLADARootNode.m │ │ ├── COLLADAViewer-Info.plist │ │ ├── COLLADAViewer-Prefix.pch │ │ ├── CVDocument.h │ │ ├── CVDocument.m │ │ ├── CVMesh.h │ │ ├── CVMesh.m │ │ ├── CVModel.h │ │ ├── CVModel.m │ │ ├── CVView.h │ │ ├── CVView.m │ │ ├── UtilityFrustum.h │ │ ├── UtilityFrustum.m │ │ ├── UtilityMath.c │ │ ├── UtilityMath.h │ │ ├── UtilityMatrix.h │ │ ├── UtilityOpenGLCamera.h │ │ ├── UtilityOpenGLCamera.m │ │ ├── UtilityTextureLoader.h │ │ ├── UtilityTextureLoader.m │ │ ├── UtilityVector.c │ │ ├── UtilityVector.h │ │ ├── en.lproj │ │ ├── CVDocument.xib │ │ ├── Credits.rtf │ │ ├── InfoPlist.strings │ │ └── MainMenu.xib │ │ └── main.m ├── OpenGLES_Ch7_1 │ ├── Default-568h@2x.png │ ├── OpenGLES_Ch7_1.xcodeproj │ │ └── project.pbxproj │ ├── OpenGLES_Ch7_1 │ │ ├── AGLKContext.h │ │ ├── AGLKContext.m │ │ ├── OpenGLES_Ch7_1-Info.plist │ │ ├── OpenGLES_Ch7_1-Prefix.pch │ │ ├── OpenGLES_Ch7_1AppDelegate.h │ │ ├── OpenGLES_Ch7_1AppDelegate.m │ │ ├── OpenGLES_Ch7_1ViewController.h │ │ ├── OpenGLES_Ch7_1ViewController.m │ │ ├── SceneCar.h │ │ ├── SceneCar.m │ │ ├── en.lproj │ │ │ ├── InfoPlist.strings │ │ │ ├── MainStoryboard_iPad.storyboard │ │ │ └── MainStoryboard_iPhone.storyboard │ │ └── main.m │ ├── OpenGL_ES_for_iOS_114x114.png │ ├── OpenGL_ES_for_iOS_57x57.png │ └── OpenGL_ES_for_iOS_72x72.png ├── OpenGLES_Ch7_2 │ ├── Default-568h@2x.png │ ├── OpenGLES_Ch7_2.xcodeproj │ │ └── project.pbxproj │ ├── OpenGLES_Ch7_2 │ │ ├── AGLKContext.h │ │ ├── AGLKContext.m │ │ ├── OpenGLES_Ch7_2-Info.plist │ │ ├── OpenGLES_Ch7_2-Prefix.pch │ │ ├── OpenGLES_Ch7_2AppDelegate.h │ │ ├── OpenGLES_Ch7_2AppDelegate.m │ │ ├── OpenGLES_Ch7_2ViewController.h │ │ ├── OpenGLES_Ch7_2ViewController.m │ │ ├── Shaders │ │ │ └── .DS_Store │ │ ├── armature.modelplist │ │ ├── en.lproj │ │ │ ├── InfoPlist.strings │ │ │ ├── MainStoryboard_iPad.storyboard │ │ │ └── MainStoryboard_iPhone.storyboard │ │ └── main.m │ ├── OpenGL_ES_for_iOS_114x114.png │ ├── OpenGL_ES_for_iOS_57x57.png │ └── OpenGL_ES_for_iOS_72x72.png ├── OpenGLES_Ch7_3 │ ├── Default-568h@2x.png │ ├── OpenGLES_Ch7_3.xcodeproj │ │ └── project.pbxproj │ ├── OpenGLES_Ch7_3 │ │ ├── OpenGLES_Ch7_3-Info.plist │ │ ├── OpenGLES_Ch7_3-Prefix.pch │ │ ├── OpenGLES_Ch7_3AppDelegate.h │ │ ├── OpenGLES_Ch7_3AppDelegate.m │ │ ├── OpenGLES_Ch7_3ViewController.h │ │ ├── OpenGLES_Ch7_3ViewController.m │ │ ├── en.lproj │ │ │ ├── InfoPlist.strings │ │ │ ├── MainStoryboard_iPad.storyboard │ │ │ └── MainStoryboard_iPhone.storyboard │ │ └── main.m │ ├── OpenGL_ES_for_iOS_114x114.png │ ├── OpenGL_ES_for_iOS_57x57.png │ └── OpenGL_ES_for_iOS_72x72.png └── Resources │ ├── armature.modelplist │ ├── armatureSkin.modelplist │ ├── bone0.dae │ ├── bone0.skp │ ├── bone1.dae │ ├── bone1.skp │ ├── bone2.dae │ ├── bone2.skp │ ├── bumper.modelplist │ ├── bumperCar.dae │ ├── bumperCar.skp │ ├── bumperCar │ └── texture0.png │ ├── bumperRinkFloor.dae │ ├── bumperRinkFloor.skp │ ├── bumperRinkWalls.dae │ ├── bumperRinkWalls.skp │ ├── bumperRinkWalls │ └── texture0.png │ ├── tube.blend │ └── tube.dae ├── ch08_EXAMPLES ├── OpenGLES_Ch8_1 │ ├── Default-568h@2x.png │ ├── OpenGLES_Ch8_1.xcodeproj │ │ └── project.pbxproj │ ├── OpenGLES_Ch8_1 │ │ ├── OpenGLES_Ch8_1-Info.plist │ │ ├── OpenGLES_Ch8_1-Prefix.pch │ │ ├── OpenGLES_Ch8_1AppDelegate.h │ │ ├── OpenGLES_Ch8_1AppDelegate.m │ │ ├── OpenGLES_Ch8_1ViewController.h │ │ ├── OpenGLES_Ch8_1ViewController.m │ │ ├── en.lproj │ │ │ ├── InfoPlist.strings │ │ │ ├── MainStoryboard_iPad.storyboard │ │ │ └── MainStoryboard_iPhone.storyboard │ │ └── main.m │ ├── OpenGL_ES_for_iOS_114x114.png │ ├── OpenGL_ES_for_iOS_57x57.png │ └── OpenGL_ES_for_iOS_72x72.png ├── OpenGLES_Ch8_2 │ ├── Default-568h@2x.png │ ├── OpenGLES_Ch8_2.xcodeproj │ │ └── project.pbxproj │ ├── OpenGLES_Ch8_2 │ │ ├── OpenGLES_Ch8_2-Info.plist │ │ ├── OpenGLES_Ch8_2-Prefix.pch │ │ ├── OpenGLES_Ch8_2AppDelegate.h │ │ ├── OpenGLES_Ch8_2AppDelegate.m │ │ ├── OpenGLES_Ch8_2ViewController.h │ │ ├── OpenGLES_Ch8_2ViewController.m │ │ ├── en.lproj │ │ │ ├── InfoPlist.strings │ │ │ ├── MainStoryboard_iPad.storyboard │ │ │ └── MainStoryboard_iPhone.storyboard │ │ └── main.m │ ├── OpenGL_ES_for_iOS_114x114.png │ ├── OpenGL_ES_for_iOS_57x57.png │ └── OpenGL_ES_for_iOS_72x72.png ├── OpenGLES_Ch8_3 │ ├── Default-568h@2x.png │ ├── OpenGLES_Ch8_3.xcodeproj │ │ └── project.pbxproj │ ├── OpenGLES_Ch8_3 │ │ ├── OpenGLES_Ch8_3-Info.plist │ │ ├── OpenGLES_Ch8_3-Prefix.pch │ │ ├── OpenGLES_Ch8_3AppDelegate.h │ │ ├── OpenGLES_Ch8_3AppDelegate.m │ │ ├── OpenGLES_Ch8_3ViewController.h │ │ ├── OpenGLES_Ch8_3ViewController.m │ │ ├── en.lproj │ │ │ ├── InfoPlist.strings │ │ │ ├── MainStoryboard_iPad.storyboard │ │ │ └── MainStoryboard_iPhone.storyboard │ │ └── main.m │ ├── OpenGL_ES_for_iOS_114x114.png │ ├── OpenGL_ES_for_iOS_57x57.png │ └── OpenGL_ES_for_iOS_72x72.png ├── OpenGLES_Ch8_4 │ ├── Default-568h@2x.png │ ├── OpenGLES_Ch8_4.xcodeproj │ │ └── project.pbxproj │ ├── OpenGLES_Ch8_4 │ │ ├── OpenGLES_Ch8_4-Info.plist │ │ ├── OpenGLES_Ch8_4-Prefix.pch │ │ ├── OpenGLES_Ch8_4AppDelegate.h │ │ ├── OpenGLES_Ch8_4AppDelegate.m │ │ ├── OpenGLES_Ch8_4ViewController.h │ │ ├── OpenGLES_Ch8_4ViewController.m │ │ ├── en.lproj │ │ │ ├── InfoPlist.strings │ │ │ ├── MainStoryboard_iPad.storyboard │ │ │ └── MainStoryboard_iPhone.storyboard │ │ └── main.m │ ├── OpenGL_ES_for_iOS_114x114.png │ ├── OpenGL_ES_for_iOS_57x57.png │ └── OpenGL_ES_for_iOS_72x72.png └── Resources │ ├── ball.png │ ├── boat.modelplist │ ├── burst.png │ ├── park.modelplist │ ├── skybox0.png │ └── smoke.png ├── ch09_EXAMPLES ├── OpenGLES_Ch9_1 │ ├── Default-568h@2x.png │ ├── OpenGLES_Ch9_1.xcodeproj │ │ └── project.pbxproj │ ├── OpenGLES_Ch9_1 │ │ ├── OpenGLES_Ch9_1-Info.plist │ │ ├── OpenGLES_Ch9_1-Prefix.pch │ │ ├── OpenGLES_Ch9_1AppDelegate.h │ │ ├── OpenGLES_Ch9_1AppDelegate.m │ │ ├── OpenGLES_Ch9_1ViewController.h │ │ ├── OpenGLES_Ch9_1ViewController.m │ │ ├── en.lproj │ │ │ ├── InfoPlist.strings │ │ │ ├── MainStoryboard_iPad.storyboard │ │ │ └── MainStoryboard_iPhone.storyboard │ │ └── main.m │ ├── OpenGL_ES_for_iOS_114x114.png │ ├── OpenGL_ES_for_iOS_57x57.png │ └── OpenGL_ES_for_iOS_72x72.png └── Resources │ └── starships.modelplist ├── ch10_EXAMPLES ├── OpenGLES_Ch10_1 │ ├── Default-568h@2x.png │ ├── OpenGLES_Ch10_1.xcodeproj │ │ └── project.pbxproj │ ├── OpenGLES_Ch10_1 │ │ ├── Controller │ │ │ ├── OpenGLES_Ch10_1AppDelegate.h │ │ │ ├── OpenGLES_Ch10_1AppDelegate.m │ │ │ ├── OpenGLES_Ch10_1ViewController.h │ │ │ ├── OpenGLES_Ch10_1ViewController.m │ │ │ └── main.m │ │ ├── Model │ │ │ ├── OpenGLES_Ch10_1.xcdatamodeld │ │ │ │ ├── .xccurrentversion │ │ │ │ └── OpenGLES_Ch10_1.xcdatamodel │ │ │ │ │ └── contents │ │ │ ├── TEModelPlacement.h │ │ │ ├── TEModelPlacement.m │ │ │ ├── TETerrain+modelAdditions.h │ │ │ ├── TETerrain+modelAdditions.m │ │ │ ├── TETerrain.h │ │ │ └── TETerrain.m │ │ ├── OpenGLES_Ch10_1-Info.plist │ │ ├── OpenGLES_Ch10_1-Prefix.pch │ │ ├── View │ │ │ ├── TETerrain+viewAdditions.h │ │ │ ├── TETerrain+viewAdditions.m │ │ │ ├── TETerrainTile.h │ │ │ └── TETerrainTile.m │ │ └── en.lproj │ │ │ ├── InfoPlist.strings │ │ │ ├── MainStoryboard_iPad.storyboard │ │ │ └── MainStoryboard_iPhone.storyboard │ ├── OpenGL_ES_for_iOS_114x114.png │ ├── OpenGL_ES_for_iOS_57x57.png │ └── OpenGL_ES_for_iOS_72x72.png ├── OpenGLES_Ch10_2 │ ├── Default-568h@2x.png │ ├── OpenGLES_Ch10_2.xcodeproj │ │ └── project.pbxproj │ ├── OpenGLES_Ch10_2 │ │ ├── Controller │ │ │ ├── OpenGLES_Ch10_2AppDelegate.h │ │ │ ├── OpenGLES_Ch10_2AppDelegate.m │ │ │ ├── OpenGLES_Ch10_2ViewController.h │ │ │ ├── OpenGLES_Ch10_2ViewController.m │ │ │ └── main.m │ │ ├── Model │ │ │ ├── TEModelPlacement.h │ │ │ ├── TEModelPlacement.m │ │ │ ├── TETerrain+modelAdditions.h │ │ │ ├── TETerrain+modelAdditions.m │ │ │ ├── TETerrain.h │ │ │ └── TETerrain.m │ │ ├── OpenGLES_Ch10_2-Info.plist │ │ ├── OpenGLES_Ch10_2-Prefix.pch │ │ ├── OpenGLES_Ch10_2.xcdatamodeld │ │ │ ├── .xccurrentversion │ │ │ └── OpenGLES_Ch10_2.xcdatamodel │ │ │ │ └── contents │ │ ├── View │ │ │ ├── TETerrain+viewAdditions.h │ │ │ ├── TETerrain+viewAdditions.m │ │ │ ├── TETerrainTile.h │ │ │ └── TETerrainTile.m │ │ └── en.lproj │ │ │ ├── InfoPlist.strings │ │ │ ├── MainStoryboard_iPad.storyboard │ │ │ └── MainStoryboard_iPhone.storyboard │ ├── OpenGL_ES_for_iOS_114x114.png │ ├── OpenGL_ES_for_iOS_57x57.png │ └── OpenGL_ES_for_iOS_72x72.png └── TerrainEditor │ ├── TerrainEditor.xcodeproj │ └── project.pbxproj │ └── TerrainEditor │ ├── GeneratedModel │ ├── TEModelPlacement.h │ ├── TEModelPlacement.m │ ├── TETerrain.h │ └── TETerrain.m │ ├── RadiusSelectionTool.png │ ├── Sahara.jpg │ ├── Shaders │ ├── ModelShader.fsh │ ├── ModelShader.vsh │ ├── PickTerrainShader.fsh │ ├── PickTerrainShader.vsh │ ├── TerrainShader.fsh │ └── TerrainShader.vsh │ ├── TEAreaTool.h │ ├── TEAreaTool.m │ ├── TEDetailTextureTool.h │ ├── TEDetailTextureTool.m │ ├── TEDocument.h │ ├── TEDocument.m │ ├── TEDocument.xcdatamodeld │ ├── .xccurrentversion │ └── TEDocument.xcdatamodel │ │ └── contents │ ├── TEEditWindowController.h │ ├── TEEditWindowController.m │ ├── TEEffect.h │ ├── TEEffect.m │ ├── TEElevationTool.h │ ├── TEElevationTool.m │ ├── TEHeightMap.h │ ├── TEHeightMap.m │ ├── TEMesh.h │ ├── TEMesh.m │ ├── TEModel.h │ ├── TEModel.m │ ├── TEModelEffect.h │ ├── TEModelEffect.m │ ├── TEModelManager.h │ ├── TEModelManager.m │ ├── TEModelPlacementTool.h │ ├── TEModelPlacementTool.m │ ├── TEPickTerrainEffect.h │ ├── TEPickTerrainEffect.m │ ├── TETerrain+modelAdditions.h │ ├── TETerrain+modelAdditions.m │ ├── TETerrainEffect.h │ ├── TETerrainEffect.m │ ├── TETerrainTile.h │ ├── TETerrainTile.m │ ├── TETool.h │ ├── TETool.m │ ├── TEView.h │ ├── TEView.m │ ├── TerrainEditor-Info.plist │ ├── TerrainEditor-Prefix.pch │ ├── Utility │ ├── UtilityFrustum.h │ ├── UtilityFrustum.m │ ├── UtilityMath.c │ ├── UtilityMath.h │ ├── UtilityMatrix.h │ ├── UtilityOpenGLCamera.h │ ├── UtilityOpenGLCamera.m │ ├── UtilityTextureLoader.h │ ├── UtilityTextureLoader.m │ ├── UtilityVector.c │ └── UtilityVector.h │ ├── en.lproj │ ├── Credits.rtf │ ├── InfoPlist.strings │ ├── MainMenu.xib │ └── TEDocument.xib │ ├── heightMap.tga │ └── main.m └── ch12_EXAMPLES ├── OpenGLES_Ch12_1 ├── Default-568h@2x.png ├── Default-Landscape@2x.png ├── Default-Landscape~ipad.png ├── Default-Portrait~ipad.png ├── Default.png ├── Default@2x.png ├── OpenGLES_Ch12_1.xcodeproj │ └── project.pbxproj ├── OpenGLES_Ch12_1 │ ├── Controller │ │ ├── OpenGLES_Ch12_1AppDelegate.h │ │ ├── OpenGLES_Ch12_1AppDelegate.m │ │ ├── OpenGLES_Ch12_1ViewController.h │ │ ├── OpenGLES_Ch12_1ViewController.m │ │ └── main.m │ ├── Model │ │ ├── OpenGLES_Ch12_1.xcdatamodeld │ │ │ ├── .xccurrentversion │ │ │ └── OpenGLES_Ch12_1.xcdatamodel │ │ │ │ └── contents │ │ ├── TECart.h │ │ ├── TECart.m │ │ ├── TEModelPlacement.h │ │ ├── TEModelPlacement.m │ │ ├── TEParticleEmitter.h │ │ ├── TEParticleEmitter.m │ │ ├── TETerrain+modelAdditions.h │ │ ├── TETerrain+modelAdditions.m │ │ ├── TETerrain.h │ │ └── TETerrain.m │ ├── OpenGLES_Ch12_1-Info.plist │ ├── OpenGLES_Ch12_1-Prefix.pch │ ├── View │ │ ├── MainStoryboard_iPad.storyboard │ │ ├── MainStoryboard_iPhone.storyboard │ │ ├── TECart+viewAdditions.h │ │ ├── TECart+viewAdditions.m │ │ ├── TETerrain+viewAdditions.h │ │ ├── TETerrain+viewAdditions.m │ │ ├── TETerrainTile.h │ │ └── TETerrainTile.m │ └── en.lproj │ │ └── InfoPlist.strings ├── OpenGL_ES_for_iOS_114x114.png ├── OpenGL_ES_for_iOS_57x57.png └── OpenGL_ES_for_iOS_72x72.png └── Resources ├── BOOSTa.png ├── cart007.modelplist ├── cartTextures.png ├── eyePOV.png ├── skybox004.png └── texture0.png /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | .DS_Store 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | *.xcworkspace 13 | !default.xcworkspace 14 | xcuserdata 15 | profile 16 | *.moved-aside 17 | DerivedData 18 | .idea/ 19 | -------------------------------------------------------------------------------- /OS X examples/README.md: -------------------------------------------------------------------------------- 1 | OS X 2 | ====== 3 | 4 | If you port any of the examples to OS X, put them here. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | OpenGL 2 | ====== 3 | 4 | Files for the group study of Erik Buck's OpenGL ES book 5 | 6 | #References: 7 | Book, Buck, Learning OpenGL ES for iOS 8 | http://www.cosmicthump.com/learning-opengl-es-information/ 9 | 10 | Original Source Code 11 | http://www.cosmicthump.com/learning-opengl-es-sample-code/ 12 | 13 | -------------------------------------------------------------------------------- /group projects/OpenGLES_Ch3_1_MKY-1/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/group projects/OpenGLES_Ch3_1_MKY-1/Default-568h@2x.png -------------------------------------------------------------------------------- /group projects/OpenGLES_Ch3_1_MKY-1/OpenGLES_Ch3_1/OpenGLES_Ch3_1-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'OpenGLES_Ch3_1' target in the 'OpenGLES_Ch3_1' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /group projects/OpenGLES_Ch3_1_MKY-1/OpenGLES_Ch3_1/OpenGLES_Ch3_1AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch3_1AppDelegate.h 3 | // OpenGLES_Ch3_1 4 | // 5 | 6 | #import 7 | 8 | @interface OpenGLES_Ch3_1AppDelegate : UIResponder 9 | 10 | @property (strong, nonatomic) UIWindow *window; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /group projects/OpenGLES_Ch3_1_MKY-1/OpenGLES_Ch3_1/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /group projects/OpenGLES_Ch3_1_MKY-1/OpenGLES_Ch3_1/leaves.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/group projects/OpenGLES_Ch3_1_MKY-1/OpenGLES_Ch3_1/leaves.gif -------------------------------------------------------------------------------- /group projects/OpenGLES_Ch3_1_MKY-1/OpenGLES_Ch3_1/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // OpenGLES_Ch3_1 4 | // 5 | 6 | #import 7 | 8 | #import "OpenGLES_Ch3_1AppDelegate.h" 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | @autoreleasepool { 13 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([OpenGLES_Ch3_1AppDelegate class])); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /group projects/OpenGLES_Ch3_1_MKY-1/OpenGL_ES_for_iOS_114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/group projects/OpenGLES_Ch3_1_MKY-1/OpenGL_ES_for_iOS_114x114.png -------------------------------------------------------------------------------- /group projects/OpenGLES_Ch3_1_MKY-1/OpenGL_ES_for_iOS_57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/group projects/OpenGLES_Ch3_1_MKY-1/OpenGL_ES_for_iOS_57x57.png -------------------------------------------------------------------------------- /group projects/OpenGLES_Ch3_1_MKY-1/OpenGL_ES_for_iOS_72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/group projects/OpenGLES_Ch3_1_MKY-1/OpenGL_ES_for_iOS_72x72.png -------------------------------------------------------------------------------- /group projects/OpenGLES_Ch4_1_light/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/group projects/OpenGLES_Ch4_1_light/Default-568h@2x.png -------------------------------------------------------------------------------- /group projects/OpenGLES_Ch4_1_light/OpenGLES_Ch4_1/OpenGLES_Ch4_1-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'OpenGLES_Ch4_1' target in the 'OpenGLES_Ch4_1' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /group projects/OpenGLES_Ch4_1_light/OpenGLES_Ch4_1/OpenGLES_Ch4_1AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch4_1AppDelegate.h 3 | // OpenGLES_Ch4_1 4 | // 5 | 6 | #import 7 | 8 | @interface OpenGLES_Ch4_1AppDelegate : UIResponder 9 | 10 | @property (strong, nonatomic) UIWindow *window; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /group projects/OpenGLES_Ch4_1_light/OpenGLES_Ch4_1/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /group projects/OpenGLES_Ch4_1_light/OpenGLES_Ch4_1/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // OpenGLES_Ch4_1 4 | // 5 | 6 | #import 7 | 8 | #import "OpenGLES_Ch4_1AppDelegate.h" 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | @autoreleasepool { 13 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([OpenGLES_Ch4_1AppDelegate class])); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /group projects/OpenGLES_Ch4_1_light/OpenGL_ES_for_iOS_114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/group projects/OpenGLES_Ch4_1_light/OpenGL_ES_for_iOS_114x114.png -------------------------------------------------------------------------------- /group projects/OpenGLES_Ch4_1_light/OpenGL_ES_for_iOS_57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/group projects/OpenGLES_Ch4_1_light/OpenGL_ES_for_iOS_57x57.png -------------------------------------------------------------------------------- /group projects/OpenGLES_Ch4_1_light/OpenGL_ES_for_iOS_72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/group projects/OpenGLES_Ch4_1_light/OpenGL_ES_for_iOS_72x72.png -------------------------------------------------------------------------------- /group projects/README.md: -------------------------------------------------------------------------------- 1 | Group Projects 2 | ====== 3 | 4 | If you start any group exercises or projects, put them here. -------------------------------------------------------------------------------- /iOS examples/AGLKit/AGLKAxisAllignedBoundingBox.h: -------------------------------------------------------------------------------- 1 | // 2 | // AGLKAxisAllignedBoundingBox.h 3 | // 4 | 5 | #import 6 | 7 | ///////////////////////////////////////////////////////////////// 8 | // Type that defines a bounding box. No vertex in contained 9 | // objects has X coordinate less than min.x or 10 | // X coordinate greater than max.x. The same is true for Y and Z 11 | // coordinates relative to min.y, min.z, max.y, and max.z. 12 | typedef struct 13 | { 14 | GLKVector3 min; 15 | GLKVector3 max; 16 | } 17 | AGLKAxisAllignedBoundingBox; 18 | 19 | -------------------------------------------------------------------------------- /iOS examples/AGLKit/AGLKCollision.h: -------------------------------------------------------------------------------- 1 | // 2 | // AGLKCollision.h 3 | // 4 | // 5 | 6 | #import 7 | 8 | extern BOOL AGLKPointsAreOnSameSideOfLine( 9 | GLKVector3 p1, 10 | GLKVector3 p2, 11 | GLKVector3 linePointA, 12 | GLKVector3 linePointB); 13 | 14 | extern BOOL AGLKPointIsInTriangle( 15 | GLKVector3 aPoint, 16 | GLKVector3 trianglePointA, 17 | GLKVector3 trianglePointB, 18 | GLKVector3 trianglePointC); 19 | 20 | extern BOOL AGLKRayDoesIntersectTriangle( 21 | GLKVector3 rayDirection, 22 | GLKVector3 pointOnRay, 23 | GLKVector3 trianglePointA, 24 | GLKVector3 trianglePointB, 25 | GLKVector3 trianglePointC, 26 | GLKVector3 *intersectionPoint); 27 | -------------------------------------------------------------------------------- /iOS examples/AGLKit/AGLKContext.h: -------------------------------------------------------------------------------- 1 | // 2 | // GLKContext.h 3 | // 4 | // 5 | 6 | #import 7 | 8 | @interface AGLKContext : EAGLContext 9 | { 10 | GLKVector4 clearColor; 11 | } 12 | 13 | @property (nonatomic, assign, readwrite) 14 | GLKVector4 clearColor; 15 | 16 | - (void)clear:(GLbitfield)mask; 17 | - (void)enable:(GLenum)capability; 18 | - (void)disable:(GLenum)capability; 19 | - (void)setBlendSourceFunction:(GLenum)sfactor 20 | destinationFunction:(GLenum)dfactor; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /iOS examples/AGLKit/AGLKSkyboxEffect.h: -------------------------------------------------------------------------------- 1 | // 2 | // AGLKSkyboxEffect.h 3 | // 4 | // 5 | 6 | #import 7 | 8 | @interface AGLKSkyboxEffect : NSObject 9 | 10 | @property (nonatomic, assign) GLKVector3 center; 11 | @property (nonatomic, assign) GLfloat xSize; 12 | @property (nonatomic, assign) GLfloat ySize; 13 | @property (nonatomic, assign) GLfloat zSize; 14 | @property (strong, nonatomic, readonly) GLKEffectPropertyTexture 15 | *textureCubeMap; 16 | @property (strong, nonatomic, readonly) GLKEffectPropertyTransform 17 | *transform; 18 | 19 | - (void) prepareToDraw; 20 | - (void) draw; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /iOS examples/AGLKit/AGLKTextureLoader.h: -------------------------------------------------------------------------------- 1 | // 2 | // AGLKTextureLoader.h 3 | // OpenGLES_Ch3_2 4 | // 5 | 6 | #import 7 | 8 | #pragma mark -AGLKTextureInfo 9 | 10 | @interface AGLKTextureInfo : NSObject 11 | { 12 | @private 13 | GLuint name; 14 | GLenum target; 15 | GLuint width; 16 | GLuint height; 17 | } 18 | 19 | @property (readonly) GLuint name; 20 | @property (readonly) GLenum target; 21 | @property (readonly) GLuint width; 22 | @property (readonly) GLuint height; 23 | 24 | @end 25 | 26 | 27 | #pragma mark -AGLKTextureLoader 28 | 29 | @interface AGLKTextureLoader : NSObject 30 | 31 | + (AGLKTextureInfo *)textureWithCGImage:(CGImageRef)cgImage options:(NSDictionary *)options 32 | error:(NSError **)outError; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /iOS examples/AGLKit/Shaders/AGLKPointParticleShader.fsh: -------------------------------------------------------------------------------- 1 | // 2 | // ParticleShader.fsh 3 | // 4 | // 5 | 6 | ///////////////////////////////////////////////////////////////// 7 | // UNIFORMS 8 | ///////////////////////////////////////////////////////////////// 9 | uniform highp mat4 u_mvpMatrix; 10 | uniform sampler2D u_samplers2D[1]; 11 | uniform highp vec3 u_gravity; 12 | uniform highp float u_elapsedSeconds; 13 | 14 | ///////////////////////////////////////////////////////////////// 15 | // Varyings 16 | ///////////////////////////////////////////////////////////////// 17 | varying lowp float v_particleOpacity; 18 | 19 | 20 | void main() 21 | { 22 | lowp vec4 textureColor = texture2D(u_samplers2D[0], 23 | gl_PointCoord); 24 | textureColor.a = textureColor.a * v_particleOpacity; 25 | 26 | gl_FragColor = textureColor; 27 | } 28 | -------------------------------------------------------------------------------- /iOS examples/AGLKit/Shaders/AGLKSkyboxShader.fsh: -------------------------------------------------------------------------------- 1 | // 2 | // SkyboxShader.fsh 3 | // 4 | // 5 | 6 | ///////////////////////////////////////////////////////////////// 7 | // UNIFORMS 8 | ///////////////////////////////////////////////////////////////// 9 | uniform highp mat4 u_mvpMatrix; 10 | uniform samplerCube u_unitCube[1]; 11 | 12 | ///////////////////////////////////////////////////////////////// 13 | // Varyings 14 | ///////////////////////////////////////////////////////////////// 15 | varying lowp vec3 v_texCoord[1]; 16 | 17 | 18 | void main() 19 | { 20 | gl_FragColor = textureCube(u_unitCube[0], v_texCoord[0]); 21 | } 22 | -------------------------------------------------------------------------------- /iOS examples/AGLKit/Shaders/AGLKSkyboxShader.vsh: -------------------------------------------------------------------------------- 1 | // 2 | // SkyboxShader.vsh 3 | // 4 | // 5 | 6 | ///////////////////////////////////////////////////////////////// 7 | // VERTEX ATTRIBUTES 8 | ///////////////////////////////////////////////////////////////// 9 | attribute vec3 a_position; 10 | 11 | ///////////////////////////////////////////////////////////////// 12 | // UNIFORMS 13 | ///////////////////////////////////////////////////////////////// 14 | uniform highp mat4 u_mvpMatrix; 15 | uniform samplerCube u_unitCube[1]; 16 | 17 | ///////////////////////////////////////////////////////////////// 18 | // Varyings 19 | ///////////////////////////////////////////////////////////////// 20 | varying lowp vec3 v_texCoord[1]; 21 | 22 | 23 | void main() 24 | { 25 | v_texCoord[0] = a_position; 26 | gl_Position = u_mvpMatrix * vec4(a_position, 1.0); 27 | } 28 | -------------------------------------------------------------------------------- /iOS examples/Resources/trail.binary: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/Resources/trail.binary -------------------------------------------------------------------------------- /iOS examples/Utility/Shaders/UtilityBillboardParticleShader.fsh: -------------------------------------------------------------------------------- 1 | // 2 | // UtilityBillboardParticleShader.fsh 3 | // 4 | // 5 | 6 | ///////////////////////////////////////////////////////////////// 7 | // TEXTURE 8 | ///////////////////////////////////////////////////////////////// 9 | #define MAX_TEXTURES 1 10 | #define MAX_TEX_COORDS 1 11 | 12 | ///////////////////////////////////////////////////////////////// 13 | // UNIFORMS 14 | ///////////////////////////////////////////////////////////////// 15 | uniform highp mat4 u_mvpMatrix; 16 | uniform sampler2D u_units[MAX_TEXTURES]; 17 | 18 | ///////////////////////////////////////////////////////////////// 19 | // Varyings 20 | ///////////////////////////////////////////////////////////////// 21 | varying highp vec2 v_texCoords[MAX_TEX_COORDS]; 22 | varying lowp float v_opacity; 23 | 24 | 25 | void main() 26 | { 27 | lowp vec4 color = texture2D(u_units[0], v_texCoords[0]); 28 | color.a *= v_opacity; 29 | 30 | gl_FragColor = color; 31 | } 32 | -------------------------------------------------------------------------------- /iOS examples/Utility/Shaders/UtilityPickTerrainShader.fsh: -------------------------------------------------------------------------------- 1 | // 2 | // UtilityPickTerrainShader.fsh 3 | // 4 | // 5 | 6 | ///////////////////////////////////////////////////////////////// 7 | // TEXTURE 8 | ///////////////////////////////////////////////////////////////// 9 | 10 | ///////////////////////////////////////////////////////////////// 11 | // UNIFORMS 12 | ///////////////////////////////////////////////////////////////// 13 | uniform highp mat4 u_mvpMatrix; 14 | uniform highp vec2 u_dimensionFactors; 15 | uniform lowp float u_modelIndex; 16 | 17 | ///////////////////////////////////////////////////////////////// 18 | // Varyings 19 | ///////////////////////////////////////////////////////////////// 20 | varying lowp vec4 v_color; 21 | 22 | 23 | void main() 24 | { 25 | gl_FragColor = v_color; 26 | } 27 | -------------------------------------------------------------------------------- /iOS examples/Utility/UtilityBillboardManager+viewAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UtilityBillboardManager+viewAdditions.h 3 | // 4 | // 5 | 6 | #import "UtilityBillboardManager.h" 7 | 8 | @interface UtilityBillboardManager (viewAdditions) 9 | 10 | - (void)drawWithEyePosition:(GLKVector3)eyePosition 11 | lookDirection:(GLKVector3)lookDirection 12 | upVector:(GLKVector3)upVector; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /iOS examples/Utility/UtilityBillboardManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // UtilityBillboardManager.h 3 | // 4 | // 5 | 6 | #import 7 | 8 | @class UtilityBillboard; 9 | 10 | 11 | @interface UtilityBillboardManager : NSObject 12 | 13 | @property (strong, nonatomic, readonly) 14 | NSArray *sortedBillboards; 15 | @property (assign, nonatomic, readwrite) 16 | BOOL shouldRenderSpherical; 17 | 18 | - (void)updateWithEyePosition:(GLKVector3)eyePosition 19 | lookDirection:(GLKVector3)lookDirection; 20 | 21 | - (void)addBillboard:(UtilityBillboard *)aBillboard; 22 | 23 | - (void)addBillboardAtPosition:(GLKVector3)aPosition 24 | size:(GLKVector2)aSize 25 | minTextureCoords:(GLKVector2)minCoords 26 | maxTextureCoords:(GLKVector2)maxCoords; 27 | 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /iOS examples/Utility/UtilityBillboardParticleEffect.h: -------------------------------------------------------------------------------- 1 | // 2 | // BillboardParticleEffect.h 3 | // 4 | // 5 | 6 | #import "UtilityEffect.h" 7 | #import 8 | 9 | 10 | @interface UtilityBillboardParticleEffect : UtilityEffect 11 | 12 | @property (assign, nonatomic, readwrite) GLKMatrix4 13 | projectionMatrix; 14 | @property (assign, nonatomic, readwrite) GLKMatrix4 15 | modelviewMatrix; 16 | @property (strong, nonatomic, readwrite) GLKTextureInfo * 17 | texture2D; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /iOS examples/Utility/UtilityBillboardParticleManager+viewAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UtilityBillboardParticleManager+viewAdditions.h 3 | // 4 | // 5 | 6 | #import "UtilityBillboardParticleManager.h" 7 | 8 | @interface UtilityBillboardParticleManager (viewAdditions) 9 | 10 | - (void)drawWithCamera:(UtilityCamera *)aCamera; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /iOS examples/Utility/UtilityJoint.h: -------------------------------------------------------------------------------- 1 | // 2 | // UtilityJoint.h 3 | // 4 | // 5 | 6 | #import "UtilityMesh.h" 7 | 8 | @interface UtilityJoint : NSObject 9 | 10 | @property (weak, nonatomic, readonly) UtilityJoint * 11 | parent; 12 | @property (strong, nonatomic, readonly) NSArray * 13 | children; 14 | @property (assign, nonatomic, readonly) GLKVector3 15 | displacement; // Displacement from parent bone 16 | @property (assign, nonatomic, readwrite) GLKMatrix4 17 | matrix; // local matrix 18 | 19 | - (id)initWithDisplacement:(GLKVector3)aDisplacement 20 | parent:(UtilityJoint *)aParent; 21 | 22 | - (GLKMatrix4)cumulativeTransforms; 23 | - (GLKVector3)cumulativeDisplacement; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /iOS examples/Utility/UtilityMesh+skinning.h: -------------------------------------------------------------------------------- 1 | // 2 | // UtilityMesh+skinning.h 3 | // 4 | // 5 | 6 | #import "UtilityMesh.h" 7 | 8 | ///////////////////////////////////////////////////////////////// 9 | // Type used to store vertex skinning attributes 10 | typedef struct 11 | { 12 | GLKVector4 jointIndices; // encoded float for Shading Language 13 | GLKVector4 jointWeights; // weight factor for each joint index 14 | } 15 | UtilityMeshJointInfluence; 16 | 17 | 18 | @interface UtilityMesh (skinning) 19 | 20 | - (void)setJointInfluence: 21 | (UtilityMeshJointInfluence)aJointInfluence 22 | atIndex:(GLsizei)vertexIndex; 23 | 24 | - (void)prepareToDrawWithJointInfluence; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /iOS examples/Utility/UtilityMesh+viewAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UtilityMesh+viewAdditions.h 3 | // 4 | // 5 | 6 | #import "UtilityMesh.h" 7 | 8 | @interface UtilityMesh (viewAdditions) 9 | 10 | - (void)prepareToDraw; 11 | - (void)prepareToPick; 12 | - (void)drawCommandsInRange:(NSRange)aRange; 13 | - (void)drawBoundingBoxStringForCommandsInRange: 14 | (NSRange)aRange; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /iOS examples/Utility/UtilityModel+skinning.h: -------------------------------------------------------------------------------- 1 | // 2 | // UtilityModel+skinning.h 3 | // 4 | // 5 | 6 | #import "UtilityModel.h" 7 | 8 | @interface UtilityModel (skinning) 9 | 10 | - (void)assignJoint:(NSUInteger)anIndex; 11 | 12 | - (void)automaticallySkinRigidWithJoints:(NSArray *)joints; 13 | - (void)automaticallySkinSmoothWithJoints:(NSArray *)joints; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /iOS examples/Utility/UtilityModel+viewAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UtilityModel+viewAdditions.h 3 | // 4 | // 5 | 6 | #import "UtilityModel.h" 7 | 8 | 9 | @interface UtilityModel (viewAdditions) 10 | 11 | - (void)draw; 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /iOS examples/Utility/UtilityModel+viewAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // UtilityModel+viewAdditions.m 3 | // 4 | // 5 | 6 | #import "UtilityModel+viewAdditions.h" 7 | #import "UtilityMesh+viewAdditions.h" 8 | 9 | 10 | @implementation UtilityModel (viewAdditions) 11 | 12 | ///////////////////////////////////////////////////////////////// 13 | // This method draws the receiver using the receiver's 14 | // UtilityMesh and a UtilityModelEffect that have both already 15 | // been prepared for drawing. 16 | - (void)draw 17 | { 18 | [self.mesh drawCommandsInRange:NSMakeRange( 19 | indexOfFirstCommand_, numberOfCommands_)]; 20 | } 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /iOS examples/Utility/UtilityModelEffect.h: -------------------------------------------------------------------------------- 1 | // 2 | // UtilityModelEffect.h 3 | // 4 | // 5 | 6 | #import "UtilityEffect.h" 7 | #import 8 | 9 | 10 | @interface UtilityModelEffect : UtilityEffect 11 | 12 | @property (assign, nonatomic, readwrite) GLKMatrix4 13 | projectionMatrix; 14 | @property (assign, nonatomic, readwrite) GLKMatrix4 15 | modelviewMatrix; 16 | @property (assign, nonatomic, readwrite) GLKVector4 17 | globalAmbientLightColor; 18 | @property (assign, nonatomic, readwrite) GLKVector3 19 | diffuseLightDirection; 20 | @property (assign, nonatomic, readwrite) GLKVector4 21 | diffuseLightColor; 22 | @property (strong, nonatomic, readwrite) GLKTextureInfo * 23 | texture2D; 24 | 25 | - (void)prepareLightColors; 26 | - (void)prepareModelview; 27 | - (void)prepareModelviewWithoutNormal; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /iOS examples/Utility/UtilityModelManager+skinning.h: -------------------------------------------------------------------------------- 1 | // 2 | // UtilityModelManager+skinning.h 3 | // 4 | // 5 | 6 | #import "UtilityModelManager.h" 7 | 8 | @interface UtilityModelManager (skinning) 9 | 10 | - (void)prepareToDrawWithJointInfluence; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /iOS examples/Utility/UtilityModelManager+skinning.m: -------------------------------------------------------------------------------- 1 | // 2 | // UtilityModelManager+skinning.m 3 | // 4 | // 5 | 6 | #import "UtilityModelManager+skinning.h" 7 | #import "UtilityMesh+skinning.h" 8 | 9 | 10 | @implementation UtilityModelManager (skinning) 11 | 12 | ///////////////////////////////////////////////////////////////// 13 | // 14 | - (void)prepareToDrawWithJointInfluence; 15 | { 16 | [self.consolidatedMesh prepareToDrawWithJointInfluence]; 17 | } 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /iOS examples/Utility/UtilityPickTerrainEffect.h: -------------------------------------------------------------------------------- 1 | // 2 | // TEPickTerrainEffect.h 3 | // 4 | // 5 | 6 | #import "UtilityEffect.h" 7 | #import 8 | 9 | @class TETerrain; 10 | @class TEModelManager; 11 | 12 | 13 | typedef struct 14 | { 15 | GLKVector2 position; 16 | unsigned char modelIndex; 17 | } 18 | TEPickTerrainInfo; 19 | 20 | 21 | @interface UtilityPickTerrainEffect : UtilityEffect 22 | 23 | @property(assign, nonatomic, readwrite) 24 | GLKMatrix4 projectionMatrix; 25 | @property(assign, nonatomic, readwrite) 26 | GLKMatrix4 modelviewMatrix; 27 | @property(assign, nonatomic, readwrite) 28 | unsigned char modelIndex; 29 | 30 | // Designated initializer 31 | - (id)initWithTerrain:(TETerrain *)aTerrain; 32 | 33 | - (TEPickTerrainInfo)terrainInfoForProjectionPosition: 34 | (GLKVector2)aPosition; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /iOS examples/Utility/UtilityTextureInfo+viewAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UtilityTextureInfo+viewAdditions.h 3 | // 4 | // 5 | 6 | #import "UtilityTextureInfo.h" 7 | #import 8 | 9 | @interface GLKTextureInfo (utilityAdditions) 10 | 11 | + (GLKTextureInfo *)textureInfoFromUtilityPlistRepresentation: 12 | (NSDictionary *)aDictionary; 13 | 14 | @end 15 | 16 | 17 | @interface UtilityTextureInfo (viewAdditions) 18 | 19 | @property (nonatomic, readonly, assign) GLuint name; 20 | @property (nonatomic, readonly, assign) GLenum target; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /iOS examples/Utility/UtilityTextureInfo.h: -------------------------------------------------------------------------------- 1 | // 2 | // UtilityTextureInfo.h 3 | // 4 | // 5 | 6 | #import 7 | 8 | @interface UtilityTextureInfo : NSObject 9 | 10 | 11 | @property (strong, nonatomic, readonly) NSDictionary *plist; 12 | @property (strong, nonatomic, readwrite) id userInfo; 13 | 14 | - (void)discardPlist; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /iOS examples/ch02_EXAMPLES/OpenGLES_Ch2_1/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch02_EXAMPLES/OpenGLES_Ch2_1/Default-568h@2x.png -------------------------------------------------------------------------------- /iOS examples/ch02_EXAMPLES/OpenGLES_Ch2_1/OpenGLES_Ch2_1/OpenGLES_Ch2_1-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'OpenGLES_Ch2_1' target in the 'OpenGLES_Ch2_1' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /iOS examples/ch02_EXAMPLES/OpenGLES_Ch2_1/OpenGLES_Ch2_1/OpenGLES_Ch2_1AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch2_1AppDelegate.h 3 | // OpenGLES_Ch2_1 4 | // 5 | 6 | #import 7 | 8 | @interface OpenGLES_Ch2_1AppDelegate : UIResponder 9 | 10 | @property (strong, nonatomic) UIWindow *window; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /iOS examples/ch02_EXAMPLES/OpenGLES_Ch2_1/OpenGLES_Ch2_1/OpenGLES_Ch2_1ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch2_1ViewController.h 3 | // OpenGLES_Ch2_1 4 | // 5 | 6 | #import 7 | 8 | @interface OpenGLES_Ch2_1ViewController : GLKViewController 9 | { 10 | GLuint vertexBufferID; 11 | } 12 | 13 | @property (strong, nonatomic) GLKBaseEffect *baseEffect; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /iOS examples/ch02_EXAMPLES/OpenGLES_Ch2_1/OpenGLES_Ch2_1/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /iOS examples/ch02_EXAMPLES/OpenGLES_Ch2_1/OpenGLES_Ch2_1/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // OpenGLES_Ch2_1 4 | // 5 | 6 | #import 7 | 8 | #import "OpenGLES_Ch2_1AppDelegate.h" 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | @autoreleasepool 13 | { 14 | return UIApplicationMain(argc, argv, nil, 15 | NSStringFromClass([OpenGLES_Ch2_1AppDelegate class])); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /iOS examples/ch02_EXAMPLES/OpenGLES_Ch2_1/OpenGL_ES_for_iOS_114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch02_EXAMPLES/OpenGLES_Ch2_1/OpenGL_ES_for_iOS_114x114.png -------------------------------------------------------------------------------- /iOS examples/ch02_EXAMPLES/OpenGLES_Ch2_1/OpenGL_ES_for_iOS_57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch02_EXAMPLES/OpenGLES_Ch2_1/OpenGL_ES_for_iOS_57x57.png -------------------------------------------------------------------------------- /iOS examples/ch02_EXAMPLES/OpenGLES_Ch2_1/OpenGL_ES_for_iOS_72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch02_EXAMPLES/OpenGLES_Ch2_1/OpenGL_ES_for_iOS_72x72.png -------------------------------------------------------------------------------- /iOS examples/ch02_EXAMPLES/OpenGLES_Ch2_2/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch02_EXAMPLES/OpenGLES_Ch2_2/Default-568h@2x.png -------------------------------------------------------------------------------- /iOS examples/ch02_EXAMPLES/OpenGLES_Ch2_2/OpenGLES_Ch2_2/OpenGLES_Ch2_2-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'OpenGLES_Ch2_2' target in the 'OpenGLES_Ch2_2' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /iOS examples/ch02_EXAMPLES/OpenGLES_Ch2_2/OpenGLES_Ch2_2/OpenGLES_Ch2_2AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch2_2AppDelegate.h 3 | // OpenGLES_Ch2_2 4 | // 5 | 6 | #import 7 | 8 | @interface OpenGLES_Ch2_2AppDelegate : UIResponder 9 | 10 | @property (strong, nonatomic) UIWindow *window; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /iOS examples/ch02_EXAMPLES/OpenGLES_Ch2_2/OpenGLES_Ch2_2/OpenGLES_Ch2_2ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch2_2ViewController.h 3 | // OpenGLES_Ch2_2 4 | // 5 | 6 | #import "AGLKViewController.h" 7 | #import 8 | 9 | @interface OpenGLES_Ch2_2ViewController : AGLKViewController 10 | { 11 | GLuint vertexBufferID; 12 | } 13 | 14 | @property (strong, nonatomic) GLKBaseEffect *baseEffect; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /iOS examples/ch02_EXAMPLES/OpenGLES_Ch2_2/OpenGLES_Ch2_2/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /iOS examples/ch02_EXAMPLES/OpenGLES_Ch2_2/OpenGLES_Ch2_2/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // OpenGLES_Ch2_2 4 | // 5 | 6 | #import 7 | 8 | #import "OpenGLES_Ch2_2AppDelegate.h" 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | @autoreleasepool { 13 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([OpenGLES_Ch2_2AppDelegate class])); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /iOS examples/ch02_EXAMPLES/OpenGLES_Ch2_2/OpenGL_ES_for_iOS_114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch02_EXAMPLES/OpenGLES_Ch2_2/OpenGL_ES_for_iOS_114x114.png -------------------------------------------------------------------------------- /iOS examples/ch02_EXAMPLES/OpenGLES_Ch2_2/OpenGL_ES_for_iOS_57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch02_EXAMPLES/OpenGLES_Ch2_2/OpenGL_ES_for_iOS_57x57.png -------------------------------------------------------------------------------- /iOS examples/ch02_EXAMPLES/OpenGLES_Ch2_2/OpenGL_ES_for_iOS_72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch02_EXAMPLES/OpenGLES_Ch2_2/OpenGL_ES_for_iOS_72x72.png -------------------------------------------------------------------------------- /iOS examples/ch02_EXAMPLES/OpenGLES_Ch2_3/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch02_EXAMPLES/OpenGLES_Ch2_3/Default-568h@2x.png -------------------------------------------------------------------------------- /iOS examples/ch02_EXAMPLES/OpenGLES_Ch2_3/OpenGLES_Ch2_3/OpenGLES_Ch2_3-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'OpenGLES_Ch2_3' target in the 'OpenGLES_Ch2_3' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /iOS examples/ch02_EXAMPLES/OpenGLES_Ch2_3/OpenGLES_Ch2_3/OpenGLES_Ch2_3AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch2_3AppDelegate.h 3 | // OpenGLES_Ch2_3 4 | // 5 | 6 | #import 7 | 8 | @interface OpenGLES_Ch2_3AppDelegate : UIResponder 9 | 10 | @property (strong, nonatomic) UIWindow *window; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /iOS examples/ch02_EXAMPLES/OpenGLES_Ch2_3/OpenGLES_Ch2_3/OpenGLES_Ch2_3ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch2_3ViewController.h 3 | // OpenGLES_Ch2_3 4 | // 5 | 6 | #import 7 | 8 | @class AGLKVertexAttribArrayBuffer; 9 | 10 | 11 | @interface OpenGLES_Ch2_3ViewController : GLKViewController 12 | { 13 | AGLKVertexAttribArrayBuffer *vertexBuffer; 14 | } 15 | 16 | @property (strong, nonatomic) GLKBaseEffect 17 | *baseEffect; 18 | @property (strong, nonatomic) AGLKVertexAttribArrayBuffer 19 | *vertexBuffer; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /iOS examples/ch02_EXAMPLES/OpenGLES_Ch2_3/OpenGLES_Ch2_3/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /iOS examples/ch02_EXAMPLES/OpenGLES_Ch2_3/OpenGLES_Ch2_3/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // OpenGLES_Ch2_3 4 | // 5 | 6 | #import 7 | 8 | #import "OpenGLES_Ch2_3AppDelegate.h" 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | @autoreleasepool { 13 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([OpenGLES_Ch2_3AppDelegate class])); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /iOS examples/ch02_EXAMPLES/OpenGLES_Ch2_3/OpenGL_ES_for_iOS_114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch02_EXAMPLES/OpenGLES_Ch2_3/OpenGL_ES_for_iOS_114x114.png -------------------------------------------------------------------------------- /iOS examples/ch02_EXAMPLES/OpenGLES_Ch2_3/OpenGL_ES_for_iOS_57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch02_EXAMPLES/OpenGLES_Ch2_3/OpenGL_ES_for_iOS_57x57.png -------------------------------------------------------------------------------- /iOS examples/ch02_EXAMPLES/OpenGLES_Ch2_3/OpenGL_ES_for_iOS_72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch02_EXAMPLES/OpenGLES_Ch2_3/OpenGL_ES_for_iOS_72x72.png -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_1/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_1/Default-568h@2x.png -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_1/OpenGLES_Ch3_1/OpenGLES_Ch3_1-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'OpenGLES_Ch3_1' target in the 'OpenGLES_Ch3_1' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_1/OpenGLES_Ch3_1/OpenGLES_Ch3_1AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch3_1AppDelegate.h 3 | // OpenGLES_Ch3_1 4 | // 5 | 6 | #import 7 | 8 | @interface OpenGLES_Ch3_1AppDelegate : UIResponder 9 | 10 | @property (strong, nonatomic) UIWindow *window; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_1/OpenGLES_Ch3_1/OpenGLES_Ch3_1ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch3_1ViewController.h 3 | // OpenGLES_Ch3_1 4 | // 5 | 6 | #import 7 | 8 | @class AGLKVertexAttribArrayBuffer; 9 | 10 | 11 | @interface OpenGLES_Ch3_1ViewController : GLKViewController 12 | { 13 | } 14 | 15 | @property (strong, nonatomic) GLKBaseEffect 16 | *baseEffect; 17 | @property (strong, nonatomic) AGLKVertexAttribArrayBuffer 18 | *vertexBuffer; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_1/OpenGLES_Ch3_1/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_1/OpenGLES_Ch3_1/leaves.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_1/OpenGLES_Ch3_1/leaves.gif -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_1/OpenGLES_Ch3_1/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // OpenGLES_Ch3_1 4 | // 5 | 6 | #import 7 | 8 | #import "OpenGLES_Ch3_1AppDelegate.h" 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | @autoreleasepool { 13 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([OpenGLES_Ch3_1AppDelegate class])); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_1/OpenGL_ES_for_iOS_114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_1/OpenGL_ES_for_iOS_114x114.png -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_1/OpenGL_ES_for_iOS_57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_1/OpenGL_ES_for_iOS_57x57.png -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_1/OpenGL_ES_for_iOS_72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_1/OpenGL_ES_for_iOS_72x72.png -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_2/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_2/Default-568h@2x.png -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_2/OpenGLES_Ch3_2/OpenGLES_Ch3_2-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'OpenGLES_Ch3_2' target in the 'OpenGLES_Ch3_2' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_2/OpenGLES_Ch3_2/OpenGLES_Ch3_2AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch3_2AppDelegate.h 3 | // OpenGLES_Ch3_2 4 | // 5 | 6 | #import 7 | 8 | @interface OpenGLES_Ch3_2AppDelegate : UIResponder 9 | 10 | @property (strong, nonatomic) UIWindow *window; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_2/OpenGLES_Ch3_2/OpenGLES_Ch3_2ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch3_2ViewController.h 3 | // OpenGLES_Ch3_2 4 | // 5 | 6 | #import 7 | 8 | @class AGLKVertexAttribArrayBuffer; 9 | 10 | 11 | @interface OpenGLES_Ch3_2ViewController : GLKViewController 12 | { 13 | } 14 | 15 | @property (strong, nonatomic) GLKBaseEffect 16 | *baseEffect; 17 | @property (strong, nonatomic) AGLKVertexAttribArrayBuffer 18 | *vertexBuffer; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_2/OpenGLES_Ch3_2/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_2/OpenGLES_Ch3_2/leaves.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_2/OpenGLES_Ch3_2/leaves.gif -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_2/OpenGLES_Ch3_2/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // OpenGLES_Ch3_2 4 | // 5 | 6 | #import 7 | 8 | #import "OpenGLES_Ch3_2AppDelegate.h" 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | @autoreleasepool { 13 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([OpenGLES_Ch3_2AppDelegate class])); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_2/OpenGL_ES_for_iOS_114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_2/OpenGL_ES_for_iOS_114x114.png -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_2/OpenGL_ES_for_iOS_57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_2/OpenGL_ES_for_iOS_57x57.png -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_2/OpenGL_ES_for_iOS_72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_2/OpenGL_ES_for_iOS_72x72.png -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_3/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_3/Default-568h@2x.png -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_3/OpenGLES_Ch3_3/OpenGLES_Ch3_3-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'OpenGLES_Ch3_3' target in the 'OpenGLES_Ch3_3' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_3/OpenGLES_Ch3_3/OpenGLES_Ch3_3AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // OpenGLES_Ch3_3 4 | // 5 | 6 | #import 7 | 8 | @interface OpenGLES_Ch3_3AppDelegate : UIResponder 9 | 10 | @property (strong, nonatomic) UIWindow *window; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_3/OpenGLES_Ch3_3/OpenGLES_Ch3_3ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // OpenGLES_Ch3_3 4 | // 5 | 6 | #import 7 | 8 | @class AGLKVertexAttribArrayBuffer; 9 | 10 | 11 | @interface OpenGLES_Ch3_3ViewController : GLKViewController 12 | { 13 | } 14 | 15 | @property (strong, nonatomic) GLKBaseEffect 16 | *baseEffect; 17 | @property (strong, nonatomic) AGLKVertexAttribArrayBuffer 18 | *vertexBuffer; 19 | @property (nonatomic) BOOL 20 | shouldUseLinearFilter; 21 | @property (nonatomic) BOOL 22 | shouldAnimate; 23 | @property (nonatomic) BOOL 24 | shouldRepeatTexture; 25 | @property (nonatomic) GLfloat 26 | sCoordinateOffset; 27 | 28 | - (IBAction)takeSCoordinateOffsetFrom:(UISlider *)sender; 29 | - (IBAction)takeShouldRepeatTextureFrom:(UISwitch *)sender; 30 | - (IBAction)takeShouldAnimateFrom:(UISwitch *)sender; 31 | - (IBAction)takeShouldUseLinearFilterFrom:(UISwitch *)sender; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_3/OpenGLES_Ch3_3/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_3/OpenGLES_Ch3_3/grid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_3/OpenGLES_Ch3_3/grid.png -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_3/OpenGLES_Ch3_3/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // OpenGLES_Ch3_3 4 | // 5 | 6 | #import 7 | 8 | #import "OpenGLES_Ch3_3AppDelegate.h" 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | @autoreleasepool { 13 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([OpenGLES_Ch3_3AppDelegate class])); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_3/OpenGL_ES_for_iOS_114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_3/OpenGL_ES_for_iOS_114x114.png -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_3/OpenGL_ES_for_iOS_57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_3/OpenGL_ES_for_iOS_57x57.png -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_3/OpenGL_ES_for_iOS_72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_3/OpenGL_ES_for_iOS_72x72.png -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_4/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_4/Default-568h@2x.png -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_4/OpenGLES_Ch3_4/OpenGLES_Ch3_4-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'OpenGLES_Ch3_4' target in the 'OpenGLES_Ch3_4' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_4/OpenGLES_Ch3_4/OpenGLES_Ch3_4AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch3_4AppDelegate.h 3 | // OpenGLES_Ch3_4 4 | // 5 | 6 | #import 7 | 8 | @interface OpenGLES_Ch3_4AppDelegate : UIResponder 9 | 10 | @property (strong, nonatomic) UIWindow *window; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_4/OpenGLES_Ch3_4/OpenGLES_Ch3_4ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch3_4ViewController.h 3 | // OpenGLES_Ch3_4 4 | // 5 | 6 | #import 7 | 8 | @class AGLKVertexAttribArrayBuffer; 9 | 10 | 11 | @interface OpenGLES_Ch3_4ViewController : GLKViewController 12 | { 13 | } 14 | 15 | @property (strong, nonatomic) GLKBaseEffect 16 | *baseEffect; 17 | @property (strong, nonatomic) AGLKVertexAttribArrayBuffer 18 | *vertexBuffer; 19 | @property (strong, nonatomic) GLKTextureInfo *textureInfo0; 20 | @property (strong, nonatomic) GLKTextureInfo *textureInfo1; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_4/OpenGLES_Ch3_4/beetle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_4/OpenGLES_Ch3_4/beetle.png -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_4/OpenGLES_Ch3_4/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_4/OpenGLES_Ch3_4/leaves.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_4/OpenGLES_Ch3_4/leaves.gif -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_4/OpenGLES_Ch3_4/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // OpenGLES_Ch3_4 4 | // 5 | 6 | #import 7 | 8 | #import "OpenGLES_Ch3_4AppDelegate.h" 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | @autoreleasepool { 13 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([OpenGLES_Ch3_4AppDelegate class])); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_4/OpenGL_ES_for_iOS_114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_4/OpenGL_ES_for_iOS_114x114.png -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_4/OpenGL_ES_for_iOS_57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_4/OpenGL_ES_for_iOS_57x57.png -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_4/OpenGL_ES_for_iOS_72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_4/OpenGL_ES_for_iOS_72x72.png -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_5/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_5/Default-568h@2x.png -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_5/OpenGLES_Ch3_5/OpenGLES_Ch3_5-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'OpenGLES_Ch3_5' target in the 'OpenGLES_Ch3_5' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_5/OpenGLES_Ch3_5/OpenGLES_Ch3_5AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch3_5AppDelegate.h 3 | // OpenGLES_Ch3_5 4 | // 5 | 6 | #import 7 | 8 | @interface OpenGLES_Ch3_5AppDelegate : UIResponder 9 | 10 | @property (strong, nonatomic) UIWindow *window; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_5/OpenGLES_Ch3_5/OpenGLES_Ch3_5ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch3_5ViewController.h 3 | // OpenGLES_Ch3_5 4 | // 5 | 6 | #import 7 | 8 | @class AGLKVertexAttribArrayBuffer; 9 | 10 | 11 | @interface OpenGLES_Ch3_5ViewController : GLKViewController 12 | { 13 | } 14 | 15 | @property (strong, nonatomic) GLKBaseEffect 16 | *baseEffect; 17 | @property (strong, nonatomic) AGLKVertexAttribArrayBuffer 18 | *vertexBuffer; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_5/OpenGLES_Ch3_5/beetle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_5/OpenGLES_Ch3_5/beetle.png -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_5/OpenGLES_Ch3_5/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_5/OpenGLES_Ch3_5/leaves.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_5/OpenGLES_Ch3_5/leaves.gif -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_5/OpenGLES_Ch3_5/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // OpenGLES_Ch3_5 4 | // 5 | 6 | #import 7 | 8 | #import "OpenGLES_Ch3_5AppDelegate.h" 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | @autoreleasepool { 13 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([OpenGLES_Ch3_5AppDelegate class])); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_5/OpenGL_ES_for_iOS_114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_5/OpenGL_ES_for_iOS_114x114.png -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_5/OpenGL_ES_for_iOS_57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_5/OpenGL_ES_for_iOS_57x57.png -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_5/OpenGL_ES_for_iOS_72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_5/OpenGL_ES_for_iOS_72x72.png -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_6/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_6/Default-568h@2x.png -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_6/OpenGLES_Ch3_6/OpenGLES_Ch3_6-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'OpenGLES_Ch3_6' target in the 'OpenGLES_Ch3_6' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_6/OpenGLES_Ch3_6/OpenGLES_Ch3_6AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch3_6AppDelegate.h 3 | // OpenGLES_Ch3_6 4 | // 5 | 6 | #import 7 | 8 | @interface OpenGLES_Ch3_6AppDelegate : UIResponder 9 | 10 | @property (strong, nonatomic) UIWindow *window; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_6/OpenGLES_Ch3_6/OpenGLES_Ch3_6ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch3_6ViewController.h 3 | // OpenGLES_Ch3_6 4 | // 5 | 6 | #import 7 | 8 | @class AGLKVertexAttribArrayBuffer; 9 | 10 | 11 | @interface OpenGLES_Ch3_6ViewController : GLKViewController 12 | { 13 | GLuint _program; 14 | 15 | GLKMatrix4 _modelViewProjectionMatrix; 16 | GLKMatrix3 _normalMatrix; 17 | GLfloat _rotation; 18 | 19 | GLuint _vertexArray; 20 | GLuint _vertexBuffer; 21 | GLuint _texture0ID; 22 | GLuint _texture1ID; 23 | } 24 | 25 | @property (strong, nonatomic) GLKBaseEffect 26 | *baseEffect; 27 | @property (strong, nonatomic) AGLKVertexAttribArrayBuffer 28 | *vertexBuffer; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_6/OpenGLES_Ch3_6/Shaders/Shader.fsh: -------------------------------------------------------------------------------- 1 | // 2 | // Shader.fsh 3 | // 4 | // 5 | 6 | ///////////////////////////////////////////////////////////////// 7 | // UNIFORMS 8 | ///////////////////////////////////////////////////////////////// 9 | uniform sampler2D uSampler0; 10 | uniform sampler2D uSampler1; 11 | 12 | ///////////////////////////////////////////////////////////////// 13 | // Varyings 14 | ///////////////////////////////////////////////////////////////// 15 | varying lowp vec4 vColor; 16 | varying lowp vec2 vTextureCoord0; 17 | varying lowp vec2 vTextureCoord1; 18 | 19 | void main() 20 | { 21 | // Get the sampled colors from texture units 0 and 1. 22 | lowp vec4 color0 = texture2D(uSampler0, vTextureCoord0); 23 | lowp vec4 color1 = texture2D(uSampler1, vTextureCoord1); 24 | 25 | // Mix the two sampled colors using texColor1's alpha 26 | // component and then multiply by the light color. 27 | gl_FragColor = mix(color0, color1, color1.a) * vColor; 28 | } 29 | -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_6/OpenGLES_Ch3_6/beetle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_6/OpenGLES_Ch3_6/beetle.png -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_6/OpenGLES_Ch3_6/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_6/OpenGLES_Ch3_6/leaves.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_6/OpenGLES_Ch3_6/leaves.gif -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_6/OpenGLES_Ch3_6/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // OpenGLES_Ch3_6 4 | // 5 | 6 | #import 7 | 8 | #import "OpenGLES_Ch3_6AppDelegate.h" 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | @autoreleasepool { 13 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([OpenGLES_Ch3_6AppDelegate class])); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_6/OpenGL_ES_for_iOS_114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_6/OpenGL_ES_for_iOS_114x114.png -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_6/OpenGL_ES_for_iOS_57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_6/OpenGL_ES_for_iOS_57x57.png -------------------------------------------------------------------------------- /iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_6/OpenGL_ES_for_iOS_72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch03_EXAMPLES/OpenGLES_Ch3_6/OpenGL_ES_for_iOS_72x72.png -------------------------------------------------------------------------------- /iOS examples/ch04_EXAMPLES/OpenGLES_Ch4_1/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch04_EXAMPLES/OpenGLES_Ch4_1/Default-568h@2x.png -------------------------------------------------------------------------------- /iOS examples/ch04_EXAMPLES/OpenGLES_Ch4_1/OpenGLES_Ch4_1/OpenGLES_Ch4_1-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'OpenGLES_Ch4_1' target in the 'OpenGLES_Ch4_1' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /iOS examples/ch04_EXAMPLES/OpenGLES_Ch4_1/OpenGLES_Ch4_1/OpenGLES_Ch4_1AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch4_1AppDelegate.h 3 | // OpenGLES_Ch4_1 4 | // 5 | 6 | #import 7 | 8 | @interface OpenGLES_Ch4_1AppDelegate : UIResponder 9 | 10 | @property (strong, nonatomic) UIWindow *window; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /iOS examples/ch04_EXAMPLES/OpenGLES_Ch4_1/OpenGLES_Ch4_1/OpenGLES_Ch4_1ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch4_1ViewController.h 3 | // OpenGLES_Ch4_1 4 | // 5 | 6 | #import 7 | 8 | @class AGLKVertexAttribArrayBuffer; 9 | 10 | 11 | @interface OpenGLES_Ch4_1ViewController : GLKViewController 12 | 13 | @property (strong, nonatomic) GLKBaseEffect 14 | *baseEffect; 15 | @property (strong, nonatomic) GLKBaseEffect 16 | *extraEffect; 17 | @property (strong, nonatomic) AGLKVertexAttribArrayBuffer 18 | *vertexBuffer; 19 | @property (strong, nonatomic) AGLKVertexAttribArrayBuffer 20 | *extraBuffer; 21 | 22 | @property (nonatomic) GLfloat 23 | centerVertexHeight; 24 | @property (nonatomic) BOOL 25 | shouldUseFaceNormals; 26 | @property (nonatomic) BOOL 27 | shouldDrawNormals; 28 | 29 | - (IBAction)takeShouldUseFaceNormalsFrom:(UISwitch *)sender; 30 | - (IBAction)takeShouldDrawNormalsFrom:(UISwitch *)sender; 31 | - (IBAction)takeCenterVertexHeightFrom:(UISlider *)sender; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /iOS examples/ch04_EXAMPLES/OpenGLES_Ch4_1/OpenGLES_Ch4_1/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /iOS examples/ch04_EXAMPLES/OpenGLES_Ch4_1/OpenGLES_Ch4_1/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // OpenGLES_Ch4_1 4 | // 5 | 6 | #import 7 | 8 | #import "OpenGLES_Ch4_1AppDelegate.h" 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | @autoreleasepool { 13 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([OpenGLES_Ch4_1AppDelegate class])); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /iOS examples/ch04_EXAMPLES/OpenGLES_Ch4_1/OpenGL_ES_for_iOS_114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch04_EXAMPLES/OpenGLES_Ch4_1/OpenGL_ES_for_iOS_114x114.png -------------------------------------------------------------------------------- /iOS examples/ch04_EXAMPLES/OpenGLES_Ch4_1/OpenGL_ES_for_iOS_57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch04_EXAMPLES/OpenGLES_Ch4_1/OpenGL_ES_for_iOS_57x57.png -------------------------------------------------------------------------------- /iOS examples/ch04_EXAMPLES/OpenGLES_Ch4_1/OpenGL_ES_for_iOS_72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch04_EXAMPLES/OpenGLES_Ch4_1/OpenGL_ES_for_iOS_72x72.png -------------------------------------------------------------------------------- /iOS examples/ch04_EXAMPLES/OpenGLES_Ch4_2/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch04_EXAMPLES/OpenGLES_Ch4_2/Default-568h@2x.png -------------------------------------------------------------------------------- /iOS examples/ch04_EXAMPLES/OpenGLES_Ch4_2/OpenGLES_Ch4_2/Lighting256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch04_EXAMPLES/OpenGLES_Ch4_2/OpenGLES_Ch4_2/Lighting256x256.png -------------------------------------------------------------------------------- /iOS examples/ch04_EXAMPLES/OpenGLES_Ch4_2/OpenGLES_Ch4_2/LightingDetail256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch04_EXAMPLES/OpenGLES_Ch4_2/OpenGLES_Ch4_2/LightingDetail256x256.png -------------------------------------------------------------------------------- /iOS examples/ch04_EXAMPLES/OpenGLES_Ch4_2/OpenGLES_Ch4_2/OpenGLES_Ch4_2-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'OpenGLES_Ch4_2' target in the 'OpenGLES_Ch4_2' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /iOS examples/ch04_EXAMPLES/OpenGLES_Ch4_2/OpenGLES_Ch4_2/OpenGLES_Ch4_2AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch4_2AppDelegate.h 3 | // OpenGLES_Ch4_2 4 | // 5 | 6 | #import 7 | 8 | @interface OpenGLES_Ch4_2AppDelegate : UIResponder 9 | 10 | @property (strong, nonatomic) UIWindow *window; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /iOS examples/ch04_EXAMPLES/OpenGLES_Ch4_2/OpenGLES_Ch4_2/OpenGLES_Ch4_2ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch4_2ViewController.h 3 | // OpenGLES_Ch4_2 4 | // 5 | 6 | #import 7 | 8 | @class AGLKVertexAttribArrayBuffer; 9 | 10 | 11 | @interface OpenGLES_Ch4_2ViewController : GLKViewController 12 | 13 | @property (strong, nonatomic) GLKBaseEffect 14 | *baseEffect; 15 | @property (strong, nonatomic) AGLKVertexAttribArrayBuffer 16 | *vertexBuffer; 17 | @property (strong, nonatomic) GLKTextureInfo 18 | *blandTextureInfo; 19 | @property (strong, nonatomic) GLKTextureInfo 20 | *interestingTextureInfo; 21 | @property (nonatomic) BOOL 22 | shouldUseDetailLighting; 23 | 24 | - (IBAction)takeShouldUseDetailLightingFrom:(UISwitch *)sender; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /iOS examples/ch04_EXAMPLES/OpenGLES_Ch4_2/OpenGLES_Ch4_2/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /iOS examples/ch04_EXAMPLES/OpenGLES_Ch4_2/OpenGLES_Ch4_2/grid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch04_EXAMPLES/OpenGLES_Ch4_2/OpenGLES_Ch4_2/grid.png -------------------------------------------------------------------------------- /iOS examples/ch04_EXAMPLES/OpenGLES_Ch4_2/OpenGLES_Ch4_2/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // OpenGLES_Ch4_2 4 | // 5 | 6 | #import 7 | 8 | #import "OpenGLES_Ch4_2AppDelegate.h" 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | @autoreleasepool { 13 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([OpenGLES_Ch4_2AppDelegate class])); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /iOS examples/ch04_EXAMPLES/OpenGLES_Ch4_2/OpenGL_ES_for_iOS_114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch04_EXAMPLES/OpenGLES_Ch4_2/OpenGL_ES_for_iOS_114x114.png -------------------------------------------------------------------------------- /iOS examples/ch04_EXAMPLES/OpenGLES_Ch4_2/OpenGL_ES_for_iOS_57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch04_EXAMPLES/OpenGLES_Ch4_2/OpenGL_ES_for_iOS_57x57.png -------------------------------------------------------------------------------- /iOS examples/ch04_EXAMPLES/OpenGLES_Ch4_2/OpenGL_ES_for_iOS_72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch04_EXAMPLES/OpenGLES_Ch4_2/OpenGL_ES_for_iOS_72x72.png -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_1/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_1/Default-568h@2x.png -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_1/OpenGLES_Ch5_1/Earth512x256.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_1/OpenGLES_Ch5_1/Earth512x256.jpg -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_1/OpenGLES_Ch5_1/OpenGLES_Ch5_1-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'OpenGLES_Ch5_1' target in the 'OpenGLES_Ch5_1' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_1/OpenGLES_Ch5_1/OpenGLES_Ch5_1AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch5_1AppDelegate.h 3 | // OpenGLES_Ch5_1 4 | // 5 | 6 | #import 7 | 8 | @interface OpenGLES_Ch5_1AppDelegate : UIResponder 9 | 10 | @property (strong, nonatomic) UIWindow *window; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_1/OpenGLES_Ch5_1/OpenGLES_Ch5_1ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch5_1ViewController.h 3 | // OpenGLES_Ch5_1 4 | // 5 | 6 | #import 7 | 8 | @class AGLKVertexAttribArrayBuffer; 9 | 10 | 11 | @interface OpenGLES_Ch5_1ViewController : GLKViewController 12 | 13 | @property (strong, nonatomic) GLKBaseEffect 14 | *baseEffect; 15 | @property (strong, nonatomic) AGLKVertexAttribArrayBuffer 16 | *vertexPositionBuffer; 17 | @property (strong, nonatomic) AGLKVertexAttribArrayBuffer 18 | *vertexNormalBuffer; 19 | @property (strong, nonatomic) AGLKVertexAttribArrayBuffer 20 | *vertexTextureCoordBuffer; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_1/OpenGLES_Ch5_1/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_1/OpenGLES_Ch5_1/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // OpenGLES_Ch5_1 4 | // 5 | 6 | #import 7 | 8 | #import "OpenGLES_Ch5_1AppDelegate.h" 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | @autoreleasepool { 13 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([OpenGLES_Ch5_1AppDelegate class])); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_1/OpenGL_ES_for_iOS_114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_1/OpenGL_ES_for_iOS_114x114.png -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_1/OpenGL_ES_for_iOS_57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_1/OpenGL_ES_for_iOS_57x57.png -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_1/OpenGL_ES_for_iOS_72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_1/OpenGL_ES_for_iOS_72x72.png -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_2/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_2/Default-568h@2x.png -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_2/OpenGLES_Ch5_2/Earth512x256.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_2/OpenGLES_Ch5_2/Earth512x256.jpg -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_2/OpenGLES_Ch5_2/OpenGLES_Ch5_2-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'OpenGLES_Ch5_2' target in the 'OpenGLES_Ch5_2' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_2/OpenGLES_Ch5_2/OpenGLES_Ch5_2AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch5_2AppDelegate.h 3 | // OpenGLES_Ch5_2 4 | // 5 | 6 | #import 7 | 8 | @interface OpenGLES_Ch5_2AppDelegate : UIResponder 9 | 10 | @property (strong, nonatomic) UIWindow *window; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_2/OpenGLES_Ch5_2/OpenGLES_Ch5_2ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch5_2ViewController.h 3 | // OpenGLES_Ch5_2 4 | // 5 | 6 | #import 7 | 8 | @class AGLKVertexAttribArrayBuffer; 9 | 10 | 11 | @interface OpenGLES_Ch5_2ViewController : GLKViewController 12 | 13 | @property (strong, nonatomic) GLKBaseEffect 14 | *baseEffect; 15 | @property (strong, nonatomic) AGLKVertexAttribArrayBuffer 16 | *vertexPositionBuffer; 17 | @property (strong, nonatomic) AGLKVertexAttribArrayBuffer 18 | *vertexNormalBuffer; 19 | @property (strong, nonatomic) AGLKVertexAttribArrayBuffer 20 | *vertexTextureCoordBuffer; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_2/OpenGLES_Ch5_2/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_2/OpenGLES_Ch5_2/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // OpenGLES_Ch5_2 4 | // 5 | 6 | #import 7 | 8 | #import "OpenGLES_Ch5_2AppDelegate.h" 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | @autoreleasepool { 13 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([OpenGLES_Ch5_2AppDelegate class])); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_2/OpenGL_ES_for_iOS_114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_2/OpenGL_ES_for_iOS_114x114.png -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_2/OpenGL_ES_for_iOS_57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_2/OpenGL_ES_for_iOS_57x57.png -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_2/OpenGL_ES_for_iOS_72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_2/OpenGL_ES_for_iOS_72x72.png -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_3/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_3/Default-568h@2x.png -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_3/OpenGLES_Ch5_3/Earth512x256.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_3/OpenGLES_Ch5_3/Earth512x256.jpg -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_3/OpenGLES_Ch5_3/OpenGLES_Ch5_3-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'OpenGLES_Ch5_3' target in the 'OpenGLES_Ch5_3' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_3/OpenGLES_Ch5_3/OpenGLES_Ch5_3AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch5_3AppDelegate.h 3 | // OpenGLES_Ch5_3 4 | // 5 | 6 | #import 7 | 8 | @interface OpenGLES_Ch5_3AppDelegate : UIResponder 9 | 10 | @property (strong, nonatomic) UIWindow *window; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_3/OpenGLES_Ch5_3/OpenGLES_Ch5_3ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch5_3ViewController.h 3 | // OpenGLES_Ch5_3 4 | // 5 | 6 | #import 7 | #import "AGLKViewController.h" 8 | 9 | @class AGLKVertexAttribArrayBuffer; 10 | 11 | 12 | @interface OpenGLES_Ch5_3ViewController : AGLKViewController 13 | 14 | @property (strong, nonatomic) GLKBaseEffect 15 | *baseEffect; 16 | @property (strong, nonatomic) AGLKVertexAttribArrayBuffer 17 | *vertexPositionBuffer; 18 | @property (strong, nonatomic) AGLKVertexAttribArrayBuffer 19 | *vertexNormalBuffer; 20 | @property (strong, nonatomic) AGLKVertexAttribArrayBuffer 21 | *vertexTextureCoordBuffer; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_3/OpenGLES_Ch5_3/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_3/OpenGLES_Ch5_3/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // OpenGLES_Ch5_3 4 | // 5 | 6 | #import 7 | 8 | #import "OpenGLES_Ch5_3AppDelegate.h" 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | @autoreleasepool { 13 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([OpenGLES_Ch5_3AppDelegate class])); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_3/OpenGL_ES_for_iOS_114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_3/OpenGL_ES_for_iOS_114x114.png -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_3/OpenGL_ES_for_iOS_57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_3/OpenGL_ES_for_iOS_57x57.png -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_3/OpenGL_ES_for_iOS_72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_3/OpenGL_ES_for_iOS_72x72.png -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_4/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_4/Default-568h@2x.png -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_4/OpenGLES_Ch5_4/OpenGLES_Ch5_4-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'OpenGLES_Ch5_4' target in the 'OpenGLES_Ch5_4' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_4/OpenGLES_Ch5_4/OpenGLES_Ch5_4AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch5_4AppDelegate.h 3 | // OpenGLES_Ch5_4 4 | // 5 | 6 | #import 7 | 8 | @interface OpenGLES_Ch5_4AppDelegate : UIResponder 9 | 10 | @property (strong, nonatomic) UIWindow *window; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_4/OpenGLES_Ch5_4/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_4/OpenGLES_Ch5_4/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // OpenGLES_Ch5_4 4 | // 5 | 6 | #import 7 | 8 | #import "OpenGLES_Ch5_4AppDelegate.h" 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | @autoreleasepool { 13 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([OpenGLES_Ch5_4AppDelegate class])); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_4/OpenGL_ES_for_iOS_114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_4/OpenGL_ES_for_iOS_114x114.png -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_4/OpenGL_ES_for_iOS_57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_4/OpenGL_ES_for_iOS_57x57.png -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_4/OpenGL_ES_for_iOS_72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_4/OpenGL_ES_for_iOS_72x72.png -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_5/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_5/Default-568h@2x.png -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_5/OpenGLES_Ch5_5/OpenGLES_Ch5_5-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'OpenGLES_Ch5_5' target in the 'OpenGLES_Ch5_5' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_5/OpenGLES_Ch5_5/OpenGLES_Ch5_5AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch5_5AppDelegate.h 3 | // OpenGLES_Ch5_5 4 | // 5 | 6 | #import 7 | 8 | @interface OpenGLES_Ch5_5AppDelegate : UIResponder 9 | 10 | @property (strong, nonatomic) UIWindow *window; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_5/OpenGLES_Ch5_5/OpenGLES_Ch5_5ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch5_5ViewController.h 3 | // OpenGLES_Ch5_5 4 | // 5 | 6 | #import 7 | 8 | @class AGLKVertexAttribArrayBuffer; 9 | @class AGLKTextureTransformBaseEffect; 10 | 11 | 12 | @interface OpenGLES_Ch5_5ViewController : GLKViewController 13 | 14 | @property (strong, nonatomic) AGLKTextureTransformBaseEffect 15 | *baseEffect; 16 | @property (strong, nonatomic) AGLKVertexAttribArrayBuffer 17 | *vertexBuffer; 18 | @property (nonatomic) float 19 | textureScaleFactor; 20 | @property (nonatomic) float 21 | textureAngle; 22 | @property (nonatomic) GLKMatrixStackRef 23 | textureMatrixStack; 24 | 25 | // Methods called from user interface objects configured 26 | // in Interface Builder 27 | - (IBAction)takeTextureScaleFactorFrom:(UISlider *)aControl; 28 | - (IBAction)takeTextureAngleFrom:(UISlider *)aControl; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_5/OpenGLES_Ch5_5/beetle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_5/OpenGLES_Ch5_5/beetle.png -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_5/OpenGLES_Ch5_5/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_5/OpenGLES_Ch5_5/leaves.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_5/OpenGLES_Ch5_5/leaves.gif -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_5/OpenGLES_Ch5_5/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // OpenGLES_Ch5_5 4 | // 5 | 6 | #import 7 | 8 | #import "OpenGLES_Ch5_5AppDelegate.h" 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | @autoreleasepool { 13 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([OpenGLES_Ch5_5AppDelegate class])); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_5/OpenGL_ES_for_iOS_114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_5/OpenGL_ES_for_iOS_114x114.png -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_5/OpenGL_ES_for_iOS_57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_5/OpenGL_ES_for_iOS_57x57.png -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_5/OpenGL_ES_for_iOS_72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_5/OpenGL_ES_for_iOS_72x72.png -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_6/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_6/Default-568h@2x.png -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_6/OpenGLES_Ch5_6/Earth512x256.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_6/OpenGLES_Ch5_6/Earth512x256.jpg -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_6/OpenGLES_Ch5_6/Moon256x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_6/OpenGLES_Ch5_6/Moon256x128.png -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_6/OpenGLES_Ch5_6/OpenGLES_Ch5_6-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'OpenGLES_Ch5_6' target in the 'OpenGLES_Ch5_6' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_6/OpenGLES_Ch5_6/OpenGLES_Ch5_6AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch5_6AppDelegate.h 3 | // OpenGLES_Ch5_6 4 | // 5 | 6 | #import 7 | 8 | @interface OpenGLES_Ch5_6AppDelegate : UIResponder 9 | 10 | @property (strong, nonatomic) UIWindow *window; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_6/OpenGLES_Ch5_6/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_6/OpenGLES_Ch5_6/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // OpenGLES_Ch5_6 4 | // 5 | 6 | #import 7 | 8 | #import "OpenGLES_Ch5_6AppDelegate.h" 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | @autoreleasepool { 13 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([OpenGLES_Ch5_6AppDelegate class])); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_6/OpenGL_ES_for_iOS_114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_6/OpenGL_ES_for_iOS_114x114.png -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_6/OpenGL_ES_for_iOS_57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_6/OpenGL_ES_for_iOS_57x57.png -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_6/OpenGL_ES_for_iOS_72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch05_EXAMPLES/OpenGLES_Ch5_6/OpenGL_ES_for_iOS_72x72.png -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/Resources/ReadMe.txt: -------------------------------------------------------------------------------- 1 | Chapter 5 Examples 2 | 3 | Use the obj2openglFlippedZ.pl script to generate .h files from .obj files when using the default OpenGL ES coordinate system. i.e. no use of glFrustumf() or glOrthof(). 4 | 5 | The obj2openglFlippedZ.pl script inverts the Z coordinate of all vertices and normal vectors. 6 | 7 | Use the obj2opengl.pl script to generate .h files from .obj files when using glFrustumf() or glOrthof(). 8 | 9 | Example: >obj2opengl.pl -nomove sphere.obj 10 | 11 | -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/Resources/lowPolyAxesAndModels2.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch05_EXAMPLES/Resources/lowPolyAxesAndModels2.blend -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/Resources/obj2opengl.pl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch05_EXAMPLES/Resources/obj2opengl.pl -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/Resources/obj2openglFlippedZ.pl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch05_EXAMPLES/Resources/obj2openglFlippedZ.pl -------------------------------------------------------------------------------- /iOS examples/ch05_EXAMPLES/Resources/sphere.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch05_EXAMPLES/Resources/sphere.blend -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/CommonCode/SceneAnimatedMesh.h: -------------------------------------------------------------------------------- 1 | // 2 | // SceneAnimatedMesh.h 3 | // 4 | // 5 | 6 | #import "SceneMesh.h" 7 | 8 | 9 | @interface SceneAnimatedMesh : SceneMesh 10 | 11 | - (void)drawEntireMesh; 12 | - (void)updateMeshWithDefaultPositions; 13 | - (void)updateMeshWithElapsedTime:(NSTimeInterval)anInterval; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_1/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_1/Default-568h@2x.png -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_1/OpenGLES_Ch6_1/OpenGLES_Ch6_1-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'OpenGLES_Ch6_1' target in the 'OpenGLES_Ch6_1' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_1/OpenGLES_Ch6_1/OpenGLES_Ch6_1AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch6_1AppDelegate.h 3 | // OpenGLES_Ch6_1 4 | // 5 | 6 | #import 7 | 8 | @interface OpenGLES_Ch6_1AppDelegate : UIResponder 9 | 10 | @property (strong, nonatomic) UIWindow *window; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_1/OpenGLES_Ch6_1/OpenGLES_Ch6_1ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch6_1ViewController.h 3 | // OpenGLES_Ch6_1 4 | // 5 | 6 | #import 7 | #import "SceneCar.h" 8 | 9 | 10 | @interface OpenGLES_Ch6_1ViewController : GLKViewController 11 | 12 | 13 | @property (readonly, nonatomic, strong) NSArray 14 | *cars; 15 | @property (readonly, nonatomic, assign) 16 | SceneAxisAllignedBoundingBox rinkBoundingBox; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_1/OpenGLES_Ch6_1/SceneCarModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // SceneCarModel.h 3 | // OpenGLES_Ch6_1 4 | // 5 | 6 | #import "SceneModel.h" 7 | 8 | @interface SceneCarModel : SceneModel 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_1/OpenGLES_Ch6_1/SceneRinkModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // SceneRinkModel.h 3 | // OpenGLES_Ch6_1 4 | // 5 | 6 | #import "SceneModel.h" 7 | 8 | @interface SceneRinkModel : SceneModel 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_1/OpenGLES_Ch6_1/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_1/OpenGLES_Ch6_1/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // OpenGLES_Ch6_1 4 | // 5 | 6 | #import 7 | 8 | #import "OpenGLES_Ch6_1AppDelegate.h" 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | @autoreleasepool { 13 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([OpenGLES_Ch6_1AppDelegate class])); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_1/OpenGL_ES_for_iOS_114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_1/OpenGL_ES_for_iOS_114x114.png -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_1/OpenGL_ES_for_iOS_57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_1/OpenGL_ES_for_iOS_57x57.png -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_1/OpenGL_ES_for_iOS_72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_1/OpenGL_ES_for_iOS_72x72.png -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_2/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_2/Default-568h@2x.png -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_2/OpenGLES_Ch6_2/OpenGLES_Ch6_2-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'OpenGLES_Ch6_2' target in the 'OpenGLES_Ch6_2' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_2/OpenGLES_Ch6_2/OpenGLES_Ch6_2AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch6_2AppDelegate.h 3 | // OpenGLES_Ch6_2 4 | // 5 | 6 | #import 7 | 8 | @interface OpenGLES_Ch6_2AppDelegate : UIResponder 9 | 10 | @property (strong, nonatomic) UIWindow *window; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_2/OpenGLES_Ch6_2/OpenGLES_Ch6_2ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch6_2ViewController.h 3 | // OpenGLES_Ch6_2 4 | // 5 | 6 | #import 7 | 8 | 9 | @interface OpenGLES_Ch6_2ViewController : GLKViewController 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_2/OpenGLES_Ch6_2/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_2/OpenGLES_Ch6_2/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // OpenGLES_Ch6_2 4 | // 5 | 6 | #import 7 | 8 | #import "OpenGLES_Ch6_2AppDelegate.h" 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | @autoreleasepool { 13 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([OpenGLES_Ch6_2AppDelegate class])); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_2/OpenGL_ES_for_iOS_114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_2/OpenGL_ES_for_iOS_114x114.png -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_2/OpenGL_ES_for_iOS_57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_2/OpenGL_ES_for_iOS_57x57.png -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_2/OpenGL_ES_for_iOS_72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_2/OpenGL_ES_for_iOS_72x72.png -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_3/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_3/.DS_Store -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_3/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_3/Default-568h@2x.png -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_3/OpenGLES_Ch6_3/OpenGLES_Ch6_3-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'OpenGLES_Ch6_3' target in the 'OpenGLES_Ch6_3' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_3/OpenGLES_Ch6_3/OpenGLES_Ch6_3AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch6_3AppDelegate.h 3 | // OpenGLES_Ch6_3 4 | // 5 | 6 | #import 7 | 8 | @interface OpenGLES_Ch6_3AppDelegate : UIResponder 9 | 10 | @property (strong, nonatomic) UIWindow *window; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_3/OpenGLES_Ch6_3/OpenGLES_Ch6_3ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch6_3ViewController.h 3 | // OpenGLES_Ch6_3 4 | // 5 | 6 | #import 7 | 8 | @class AGLKTextureTransformBaseEffect; 9 | @class SceneAnimatedMesh; 10 | @class SceneCanLightModel; 11 | 12 | 13 | @interface OpenGLES_Ch6_3ViewController : GLKViewController 14 | 15 | @property (strong, nonatomic) AGLKTextureTransformBaseEffect 16 | *baseEffect; 17 | @property (strong, nonatomic) SceneAnimatedMesh 18 | *animatedMesh; 19 | @property (strong, nonatomic) SceneCanLightModel 20 | *canLightModel; 21 | @property (nonatomic, assign) GLfloat 22 | spotLight0TiltAboutXAngleDeg; 23 | @property (nonatomic, assign) GLfloat 24 | spotLight0TiltAboutZAngleDeg; 25 | @property (nonatomic, assign) GLfloat 26 | spotLight1TiltAboutXAngleDeg; 27 | @property (nonatomic, assign) GLfloat 28 | spotLight1TiltAboutZAngleDeg; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_3/OpenGLES_Ch6_3/RadiusSelectionTool.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_3/OpenGLES_Ch6_3/RadiusSelectionTool.png -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_3/OpenGLES_Ch6_3/SceneCanLightModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // SceneCanLightModel.h 3 | // 4 | // 5 | 6 | #import "SceneModel.h" 7 | 8 | @interface SceneCanLightModel : SceneModel 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_3/OpenGLES_Ch6_3/Shaders/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_3/OpenGLES_Ch6_3/Shaders/.DS_Store -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_3/OpenGLES_Ch6_3/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_3/OpenGLES_Ch6_3/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // OpenGLES_Ch6_3 4 | // 5 | 6 | #import 7 | 8 | #import "OpenGLES_Ch6_3AppDelegate.h" 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | @autoreleasepool { 13 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([OpenGLES_Ch6_3AppDelegate class])); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_3/OpenGL_ES_for_iOS_114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_3/OpenGL_ES_for_iOS_114x114.png -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_3/OpenGL_ES_for_iOS_57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_3/OpenGL_ES_for_iOS_57x57.png -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_3/OpenGL_ES_for_iOS_72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_3/OpenGL_ES_for_iOS_72x72.png -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_4/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_4/.DS_Store -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_4/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_4/Default-568h@2x.png -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_4/OpenGLES_Ch6_4/OpenGLES_Ch6_4-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'OpenGLES_Ch6_4' target in the 'OpenGLES_Ch6_4' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_4/OpenGLES_Ch6_4/OpenGLES_Ch6_4AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch6_4AppDelegate.h 3 | // OpenGLES_Ch6_4 4 | // 5 | 6 | #import 7 | 8 | @interface OpenGLES_Ch6_4AppDelegate : UIResponder 9 | 10 | @property (strong, nonatomic) UIWindow *window; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_4/OpenGLES_Ch6_4/OpenGLES_Ch6_4ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch6_4ViewController.h 3 | // OpenGLES_Ch6_4 4 | // 5 | 6 | #import 7 | 8 | @class AGLKTextureTransformBaseEffect; 9 | @class SceneAnimatedMesh; 10 | @class SceneCanLightModel; 11 | 12 | 13 | @interface OpenGLES_Ch6_4ViewController : GLKViewController 14 | 15 | @property (strong, nonatomic) AGLKTextureTransformBaseEffect 16 | *baseEffect; 17 | @property (strong, nonatomic) SceneAnimatedMesh 18 | *animatedMesh; 19 | @property (strong, nonatomic) SceneCanLightModel 20 | *canLightModel; 21 | @property (nonatomic, assign) GLfloat 22 | spotLight0TiltAboutXAngleDeg; 23 | @property (nonatomic, assign) GLfloat 24 | spotLight0TiltAboutZAngleDeg; 25 | @property (nonatomic, assign) GLfloat 26 | spotLight1TiltAboutXAngleDeg; 27 | @property (nonatomic, assign) GLfloat 28 | spotLight1TiltAboutZAngleDeg; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_4/OpenGLES_Ch6_4/RadiusSelectionTool.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_4/OpenGLES_Ch6_4/RadiusSelectionTool.png -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_4/OpenGLES_Ch6_4/SceneCanLightModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // SceneCanLightModel.h 3 | // 4 | // 5 | 6 | #import "SceneModel.h" 7 | 8 | @interface SceneCanLightModel : SceneModel 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_4/OpenGLES_Ch6_4/Shaders/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_4/OpenGLES_Ch6_4/Shaders/.DS_Store -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_4/OpenGLES_Ch6_4/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_4/OpenGLES_Ch6_4/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // OpenGLES_Ch6_4 4 | // 5 | 6 | #import 7 | 8 | #import "OpenGLES_Ch6_4AppDelegate.h" 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | @autoreleasepool { 13 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([OpenGLES_Ch6_4AppDelegate class])); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_4/OpenGL_ES_for_iOS_114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_4/OpenGL_ES_for_iOS_114x114.png -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_4/OpenGL_ES_for_iOS_57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_4/OpenGL_ES_for_iOS_57x57.png -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_4/OpenGL_ES_for_iOS_72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_4/OpenGL_ES_for_iOS_72x72.png -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_5/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_5/.DS_Store -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_5/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_5/Default-568h@2x.png -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_5/OpenGLES_Ch6_5/OpenGLES_Ch6_5-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'OpenGLES_Ch6_5' target in the 'OpenGLES_Ch6_5' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_5/OpenGLES_Ch6_5/OpenGLES_Ch6_5AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch6_5AppDelegate.h 3 | // OpenGLES_Ch6_5 4 | // 5 | 6 | #import 7 | 8 | @interface OpenGLES_Ch6_5AppDelegate : UIResponder 9 | 10 | @property (strong, nonatomic) UIWindow *window; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_5/OpenGLES_Ch6_5/RabbitTextureAtlas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_5/OpenGLES_Ch6_5/RabbitTextureAtlas.png -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_5/OpenGLES_Ch6_5/SceneCanLightModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // SceneCanLightModel.h 3 | // 4 | // 5 | 6 | #import "SceneModel.h" 7 | 8 | @interface SceneCanLightModel : SceneModel 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_5/OpenGLES_Ch6_5/Shaders/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_5/OpenGLES_Ch6_5/Shaders/.DS_Store -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_5/OpenGLES_Ch6_5/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_5/OpenGLES_Ch6_5/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // OpenGLES_Ch6_5 4 | // 5 | 6 | #import 7 | 8 | #import "OpenGLES_Ch6_5AppDelegate.h" 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | @autoreleasepool { 13 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([OpenGLES_Ch6_5AppDelegate class])); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_5/OpenGL_ES_for_iOS_114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_5/OpenGL_ES_for_iOS_114x114.png -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_5/OpenGL_ES_for_iOS_57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_5/OpenGL_ES_for_iOS_57x57.png -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_5/OpenGL_ES_for_iOS_72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch06_EXAMPLES/OpenGLES_Ch6_5/OpenGL_ES_for_iOS_72x72.png -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/Resources/ReadMe.txt: -------------------------------------------------------------------------------- 1 | Chapter 6 Examples 2 | 3 | Use the obj2opengl.pl script to generate .h files from .obj files. 4 | 5 | Example: >./obj2opengl.pl -nomove -noscale ./canLight.obj 6 | -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/Resources/bumperCar.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch06_EXAMPLES/Resources/bumperCar.blend -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/Resources/bumperCar.skp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch06_EXAMPLES/Resources/bumperCar.skp -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/Resources/bumperRink.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch06_EXAMPLES/Resources/bumperRink.blend -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/Resources/bumperRink.skp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch06_EXAMPLES/Resources/bumperRink.skp -------------------------------------------------------------------------------- /iOS examples/ch06_EXAMPLES/Resources/obj2opengl.pl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch06_EXAMPLES/Resources/obj2opengl.pl -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/COLLADAViewer/COLLADAViewer/COLLADAGeometryParser.h: -------------------------------------------------------------------------------- 1 | // 2 | // COLLADAGeometryParser.h 3 | // COLLADAViewer 4 | // 5 | 6 | #import 7 | 8 | @class COLLADAParser; 9 | @class COLLADAGeometryInfo; 10 | 11 | 12 | @interface COLLADAGeometryParser : NSObject 13 | 14 | + (COLLADAGeometryInfo *)geometryFromElement: 15 | (NSXMLElement *)element; 16 | 17 | - (COLLADAGeometryInfo *)extractGeometryFromGeometryElement: 18 | (NSXMLElement *)element; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/COLLADAViewer/COLLADAViewer/COLLADANode.h: -------------------------------------------------------------------------------- 1 | // 2 | // COLLADANode.h 3 | // COLLADAViewer 4 | // 5 | 6 | #import 7 | #import "COLLADAGeometryInfo.h" 8 | #import "UtilityMatrix.h" 9 | 10 | 11 | @interface COLLADANode : NSObject 12 | 13 | @property (copy, nonatomic) NSString *name; 14 | @property (retain, nonatomic, readonly) CVMesh *mesh; 15 | @property (assign, nonatomic) UtilityMatrix4 transforms; 16 | @property (nonatomic, readonly, retain) NSSet 17 | *subnodes; 18 | @property (nonatomic, readwrite, assign) COLLADANode 19 | *parent; 20 | 21 | - (void)draw; 22 | - (void)drawNormals; 23 | 24 | - (void)addSubnode:(COLLADANode *)aNode; 25 | - (void)appendMesh:(CVMesh *)aMesh; 26 | - (void)appendMeshesToMesh:(CVMesh *)aMesh 27 | cumulativeTransforms:(UtilityMatrix4)cumulativeTransforms; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/COLLADAViewer/COLLADAViewer/COLLADAParser.h: -------------------------------------------------------------------------------- 1 | // 2 | // COLLADAParser.h 3 | // COLLADAViewer 4 | // 5 | 6 | #import 7 | #import "COLLADARootNode.h" 8 | #import "UtilityMatrix.h" 9 | 10 | 11 | @interface COLLADAParser : NSObject 12 | 13 | @property (retain, nonatomic, readonly) COLLADARootNode 14 | *rootNode; 15 | 16 | - (void)parseCOLLADAFileAtPath:(NSString *)filePath; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/COLLADAViewer/COLLADAViewer/COLLADARootNode.h: -------------------------------------------------------------------------------- 1 | // 2 | // COLLADARootNode.h 3 | // COLLADAViewer 4 | // 5 | 6 | #import "COLLADANode.h" 7 | 8 | @class UtilityTextureInfo; 9 | 10 | 11 | @interface COLLADARootNode : COLLADANode 12 | 13 | @property (nonatomic, readwrite, copy) NSString 14 | *path; 15 | @property (nonatomic, readwrite, copy) NSString 16 | *textureImagePath; 17 | @property (retain, nonatomic, readonly) CVMesh 18 | *consolidatedMesh; 19 | @property (nonatomic, readonly, retain) UtilityTextureInfo 20 | *textureInfo; 21 | @property (nonatomic, readonly, assign) NSUInteger 22 | numberOfElements; 23 | 24 | - (void)drawConsolidatedMesh; 25 | - (void)drawNormalsConsolidatedMesh; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/COLLADAViewer/COLLADAViewer/COLLADAViewer-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'COLLADAViewer' target in the 'COLLADAViewer' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/COLLADAViewer/COLLADAViewer/CVDocument.h: -------------------------------------------------------------------------------- 1 | // 2 | // CVDocument.h 3 | // COLLADAViewer 4 | // 5 | 6 | #import 7 | #import "CVView.h" 8 | 9 | @class CVMesh; 10 | @class UtilityTextureInfo; 11 | 12 | 13 | @interface CVDocument : NSDocument 14 | 15 | @property (retain, nonatomic, readwrite) IBOutlet CVView 16 | *view; 17 | @property (nonatomic, assign, readwrite) BOOL 18 | shouldShowNormals; 19 | @property (nonatomic, assign, readwrite) BOOL 20 | shouldRotateModel; 21 | @property (nonatomic, assign, readwrite) BOOL 22 | shouldShowNegativeZAxis; 23 | @property (retain, nonatomic, readonly) NSArray 24 | *allModels; 25 | @property (retain, nonatomic, readwrite) NSIndexSet 26 | *selectedModels; 27 | @property (assign, nonatomic, readonly) NSInteger 28 | numberOfVertexPositions; 29 | 30 | 31 | - (IBAction)importCOLLADA:(id)sender; 32 | - (IBAction)removeDuplicateVertices:(id)sender; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/COLLADAViewer/COLLADAViewer/CVModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // CVModel.h 3 | // COLLADAViewer 4 | // 5 | 6 | #import 7 | 8 | @class CVMesh; 9 | 10 | @interface CVModel : NSObject 11 | 12 | @property (strong, nonatomic, readonly) CVMesh 13 | *mesh; 14 | @property (copy, nonatomic, readwrite) NSString 15 | *name; 16 | @property (copy, nonatomic, readonly) NSString 17 | *axisAlignedBoundingBox; 18 | @property (strong, nonatomic, readonly) NSNumber 19 | *numberOfVertices; 20 | @property (strong, nonatomic, readonly) NSDictionary 21 | *plistRepresentation; 22 | 23 | - (id)initWithName:(NSString *)aName 24 | mesh:(CVMesh *)aMesh 25 | indexOfFirstCommand:(NSUInteger)aFirstIndex 26 | numberOfCommands:(NSUInteger)count; 27 | - (id)initWithPlistRepresentation:(NSDictionary *)aDictionary 28 | mesh:(CVMesh *)aMesh; 29 | 30 | - (void)draw; 31 | - (void)drawNormalsLength:(GLfloat)lineLength; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/COLLADAViewer/COLLADAViewer/UtilityMath.h: -------------------------------------------------------------------------------- 1 | // 2 | // UtilityMath.h 3 | // 4 | // 5 | 6 | #ifndef sceneMath_H 7 | #define sceneMath_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | #include "UtilityVector.h" 14 | 15 | static const UtilityVector3 UtilityZeroVector = {0.0f, 0.0f, 0.0f}; 16 | static const float UtilityFloatEpsilon = FLT_EPSILON; 17 | static const float UtilityPI = M_PI; 18 | static const float Utility2PI = M_PI * 2.0f; 19 | static const float UtilityPI_OVER_2 = (M_PI / 2.0f); 20 | static const float UtilityDegreesToRadians = M_PI / 180.0f; 21 | static const float UtilityRadiansToDegrees = 180.0f / M_PI; 22 | 23 | #define UtilityFloatNotZero(a) (fabs(a) >= UtilityFloatEpsilon) 24 | 25 | #ifdef __cplusplus 26 | } 27 | #endif 28 | 29 | #endif // sceneMath_H 30 | -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/COLLADAViewer/COLLADAViewer/en.lproj/Credits.rtf: -------------------------------------------------------------------------------- 1 | {\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;} 2 | {\colortbl;\red255\green255\blue255;} 3 | \paperw9840\paperh8400 4 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural 5 | 6 | \f0\b\fs24 \cf0 Engineering: 7 | \b0 \ 8 | Some people\ 9 | \ 10 | 11 | \b Human Interface Design: 12 | \b0 \ 13 | Some other people\ 14 | \ 15 | 16 | \b Testing: 17 | \b0 \ 18 | Hopefully not nobody\ 19 | \ 20 | 21 | \b Documentation: 22 | \b0 \ 23 | Whoever\ 24 | \ 25 | 26 | \b With special thanks to: 27 | \b0 \ 28 | Mom\ 29 | } 30 | -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/COLLADAViewer/COLLADAViewer/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/COLLADAViewer/COLLADAViewer/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // COLLADAViewer 4 | // 5 | 6 | #import 7 | 8 | int main(int argc, char *argv[]) 9 | { 10 | return NSApplicationMain(argc, (const char **)argv); 11 | } 12 | -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/OpenGLES_Ch7_1/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch07_EXAMPLES/OpenGLES_Ch7_1/Default-568h@2x.png -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/OpenGLES_Ch7_1/OpenGLES_Ch7_1/AGLKContext.h: -------------------------------------------------------------------------------- 1 | // 2 | // GLKContext.h 3 | // 4 | // 5 | 6 | #import 7 | 8 | @interface AGLKContext : EAGLContext 9 | { 10 | GLKVector4 clearColor; 11 | } 12 | 13 | @property (nonatomic, assign) GLKVector4 14 | clearColor; 15 | 16 | - (void)clear:(GLbitfield)mask; 17 | - (void)enable:(GLenum)capability; 18 | - (void)disable:(GLenum)capability; 19 | - (void)setBlendSourceFunction:(GLenum)sfactor 20 | destinationFunction:(GLenum)dfactor; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/OpenGLES_Ch7_1/OpenGLES_Ch7_1/OpenGLES_Ch7_1-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'OpenGLES_Ch7_1' target in the 'OpenGLES_Ch7_1' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/OpenGLES_Ch7_1/OpenGLES_Ch7_1/OpenGLES_Ch7_1AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch7_1AppDelegate.h 3 | // OpenGLES_Ch7_1 4 | // 5 | 6 | #import 7 | 8 | @interface OpenGLES_Ch7_1AppDelegate : UIResponder 9 | 10 | @property (strong, nonatomic) UIWindow *window; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/OpenGLES_Ch7_1/OpenGLES_Ch7_1/OpenGLES_Ch7_1ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch7_1ViewController.h 3 | // OpenGLES_Ch7_1 4 | // 5 | 6 | #import 7 | #import "SceneCar.h" 8 | 9 | 10 | @interface OpenGLES_Ch7_1ViewController : GLKViewController 11 | 12 | 13 | @property (readonly, nonatomic, strong) NSArray 14 | *cars; 15 | @property (readonly, nonatomic, assign) 16 | AGLKAxisAllignedBoundingBox rinkBoundingBox; 17 | 18 | @end 19 | 20 | -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/OpenGLES_Ch7_1/OpenGLES_Ch7_1/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/OpenGLES_Ch7_1/OpenGLES_Ch7_1/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // OpenGLES_Ch7_1 4 | // 5 | 6 | #import 7 | 8 | #import "OpenGLES_Ch7_1AppDelegate.h" 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | @autoreleasepool { 13 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([OpenGLES_Ch7_1AppDelegate class])); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/OpenGLES_Ch7_1/OpenGL_ES_for_iOS_114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch07_EXAMPLES/OpenGLES_Ch7_1/OpenGL_ES_for_iOS_114x114.png -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/OpenGLES_Ch7_1/OpenGL_ES_for_iOS_57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch07_EXAMPLES/OpenGLES_Ch7_1/OpenGL_ES_for_iOS_57x57.png -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/OpenGLES_Ch7_1/OpenGL_ES_for_iOS_72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch07_EXAMPLES/OpenGLES_Ch7_1/OpenGL_ES_for_iOS_72x72.png -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/OpenGLES_Ch7_2/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch07_EXAMPLES/OpenGLES_Ch7_2/Default-568h@2x.png -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/OpenGLES_Ch7_2/OpenGLES_Ch7_2/AGLKContext.h: -------------------------------------------------------------------------------- 1 | // 2 | // GLKContext.h 3 | // 4 | // 5 | 6 | #import 7 | 8 | @interface AGLKContext : EAGLContext 9 | { 10 | GLKVector4 clearColor; 11 | } 12 | 13 | @property (nonatomic, assign) GLKVector4 14 | clearColor; 15 | 16 | - (void)clear:(GLbitfield)mask; 17 | - (void)enable:(GLenum)capability; 18 | - (void)disable:(GLenum)capability; 19 | - (void)setBlendSourceFunction:(GLenum)sfactor 20 | destinationFunction:(GLenum)dfactor; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/OpenGLES_Ch7_2/OpenGLES_Ch7_2/OpenGLES_Ch7_2-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'OpenGLES_Ch7_2' target in the 'OpenGLES_Ch7_2' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/OpenGLES_Ch7_2/OpenGLES_Ch7_2/OpenGLES_Ch7_2AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch7_2AppDelegate.h 3 | // OpenGLES_Ch7_2 4 | // 5 | 6 | #import 7 | 8 | @interface OpenGLES_Ch7_2AppDelegate : UIResponder 9 | 10 | @property (strong, nonatomic) UIWindow *window; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/OpenGLES_Ch7_2/OpenGLES_Ch7_2/OpenGLES_Ch7_2ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch7_2ViewController.h 3 | // OpenGLES_Ch7_2 4 | // 5 | 6 | #import 7 | 8 | @interface OpenGLES_Ch7_2ViewController : GLKViewController 9 | 10 | - (IBAction)takeAngle0From:(UISlider *)sender; 11 | - (IBAction)takeAngle1From:(UISlider *)sender; 12 | - (IBAction)takeAngle2From:(UISlider *)sender; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/OpenGLES_Ch7_2/OpenGLES_Ch7_2/Shaders/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch07_EXAMPLES/OpenGLES_Ch7_2/OpenGLES_Ch7_2/Shaders/.DS_Store -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/OpenGLES_Ch7_2/OpenGLES_Ch7_2/armature.modelplist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch07_EXAMPLES/OpenGLES_Ch7_2/OpenGLES_Ch7_2/armature.modelplist -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/OpenGLES_Ch7_2/OpenGLES_Ch7_2/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/OpenGLES_Ch7_2/OpenGLES_Ch7_2/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // OpenGLES_Ch7_2 4 | // 5 | 6 | #import 7 | 8 | #import "OpenGLES_Ch7_2AppDelegate.h" 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | @autoreleasepool { 13 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([OpenGLES_Ch7_2AppDelegate class])); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/OpenGLES_Ch7_2/OpenGL_ES_for_iOS_114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch07_EXAMPLES/OpenGLES_Ch7_2/OpenGL_ES_for_iOS_114x114.png -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/OpenGLES_Ch7_2/OpenGL_ES_for_iOS_57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch07_EXAMPLES/OpenGLES_Ch7_2/OpenGL_ES_for_iOS_57x57.png -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/OpenGLES_Ch7_2/OpenGL_ES_for_iOS_72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch07_EXAMPLES/OpenGLES_Ch7_2/OpenGL_ES_for_iOS_72x72.png -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/OpenGLES_Ch7_3/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch07_EXAMPLES/OpenGLES_Ch7_3/Default-568h@2x.png -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/OpenGLES_Ch7_3/OpenGLES_Ch7_3/OpenGLES_Ch7_3-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'OpenGLES_Ch7_3' target in the 'OpenGLES_Ch7_3' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/OpenGLES_Ch7_3/OpenGLES_Ch7_3/OpenGLES_Ch7_3AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch7_3AppDelegate.h 3 | // OpenGLES_Ch7_3 4 | // 5 | 6 | #import 7 | 8 | @interface OpenGLES_Ch7_3AppDelegate : UIResponder 9 | 10 | @property (strong, nonatomic) UIWindow *window; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/OpenGLES_Ch7_3/OpenGLES_Ch7_3/OpenGLES_Ch7_3ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch7_3ViewController.h 3 | // OpenGLES_Ch7_3 4 | // 5 | 6 | #import 7 | 8 | @interface OpenGLES_Ch7_3ViewController : GLKViewController 9 | 10 | - (IBAction)takeAngle0From:(UISlider *)sender; 11 | - (IBAction)takeAngle1From:(UISlider *)sender; 12 | - (IBAction)takeAngle2From:(UISlider *)sender; 13 | - (IBAction)takeRigidSkinFrom:(UISwitch *)sender; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/OpenGLES_Ch7_3/OpenGLES_Ch7_3/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/OpenGLES_Ch7_3/OpenGLES_Ch7_3/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // OpenGLES_Ch7_3 4 | // 5 | 6 | #import 7 | 8 | #import "OpenGLES_Ch7_3AppDelegate.h" 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | @autoreleasepool { 13 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([OpenGLES_Ch7_3AppDelegate class])); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/OpenGLES_Ch7_3/OpenGL_ES_for_iOS_114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch07_EXAMPLES/OpenGLES_Ch7_3/OpenGL_ES_for_iOS_114x114.png -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/OpenGLES_Ch7_3/OpenGL_ES_for_iOS_57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch07_EXAMPLES/OpenGLES_Ch7_3/OpenGL_ES_for_iOS_57x57.png -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/OpenGLES_Ch7_3/OpenGL_ES_for_iOS_72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch07_EXAMPLES/OpenGLES_Ch7_3/OpenGL_ES_for_iOS_72x72.png -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/Resources/armature.modelplist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch07_EXAMPLES/Resources/armature.modelplist -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/Resources/armatureSkin.modelplist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch07_EXAMPLES/Resources/armatureSkin.modelplist -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/Resources/bone0.skp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch07_EXAMPLES/Resources/bone0.skp -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/Resources/bone1.skp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch07_EXAMPLES/Resources/bone1.skp -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/Resources/bone2.skp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch07_EXAMPLES/Resources/bone2.skp -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/Resources/bumper.modelplist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch07_EXAMPLES/Resources/bumper.modelplist -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/Resources/bumperCar.skp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch07_EXAMPLES/Resources/bumperCar.skp -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/Resources/bumperCar/texture0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch07_EXAMPLES/Resources/bumperCar/texture0.png -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/Resources/bumperRinkFloor.skp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch07_EXAMPLES/Resources/bumperRinkFloor.skp -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/Resources/bumperRinkWalls.skp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch07_EXAMPLES/Resources/bumperRinkWalls.skp -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/Resources/bumperRinkWalls/texture0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch07_EXAMPLES/Resources/bumperRinkWalls/texture0.png -------------------------------------------------------------------------------- /iOS examples/ch07_EXAMPLES/Resources/tube.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch07_EXAMPLES/Resources/tube.blend -------------------------------------------------------------------------------- /iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_1/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_1/Default-568h@2x.png -------------------------------------------------------------------------------- /iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_1/OpenGLES_Ch8_1/OpenGLES_Ch8_1-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'OpenGLES_Ch8_1' target in the 'OpenGLES_Ch8_1' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_1/OpenGLES_Ch8_1/OpenGLES_Ch8_1AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch8_1AppDelegate.h 3 | // OpenGLES_Ch8_1 4 | // 5 | 6 | #import 7 | 8 | @interface OpenGLES_Ch8_1AppDelegate : UIResponder 9 | 10 | @property (strong, nonatomic) UIWindow *window; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_1/OpenGLES_Ch8_1/OpenGLES_Ch8_1ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch8_1ViewController.h 3 | // OpenGLES_Ch8_1 4 | // 5 | 6 | #import 7 | 8 | @interface OpenGLES_Ch8_1ViewController : GLKViewController 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_1/OpenGLES_Ch8_1/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_1/OpenGLES_Ch8_1/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // OpenGLES_Ch8_1 4 | // 5 | 6 | #import 7 | 8 | #import "OpenGLES_Ch8_1AppDelegate.h" 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | @autoreleasepool { 13 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([OpenGLES_Ch8_1AppDelegate class])); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_1/OpenGL_ES_for_iOS_114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_1/OpenGL_ES_for_iOS_114x114.png -------------------------------------------------------------------------------- /iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_1/OpenGL_ES_for_iOS_57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_1/OpenGL_ES_for_iOS_57x57.png -------------------------------------------------------------------------------- /iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_1/OpenGL_ES_for_iOS_72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_1/OpenGL_ES_for_iOS_72x72.png -------------------------------------------------------------------------------- /iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_2/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_2/Default-568h@2x.png -------------------------------------------------------------------------------- /iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_2/OpenGLES_Ch8_2/OpenGLES_Ch8_2-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'OpenGLES_Ch8_2' target in the 'OpenGLES_Ch8_2' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_2/OpenGLES_Ch8_2/OpenGLES_Ch8_2AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch8_2AppDelegate.h 3 | // OpenGLES_Ch8_2 4 | // 5 | 6 | #import 7 | 8 | @interface OpenGLES_Ch8_2AppDelegate : UIResponder 9 | 10 | @property (strong, nonatomic) UIWindow *window; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_2/OpenGLES_Ch8_2/OpenGLES_Ch8_2ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch8_2ViewController.h 3 | // OpenGLES_Ch8_2 4 | // 5 | 6 | #import 7 | 8 | @interface OpenGLES_Ch8_2ViewController : GLKViewController 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_2/OpenGLES_Ch8_2/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_2/OpenGLES_Ch8_2/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // OpenGLES_Ch8_2 4 | // 5 | 6 | #import 7 | 8 | #import "OpenGLES_Ch8_2AppDelegate.h" 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | @autoreleasepool { 13 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([OpenGLES_Ch8_2AppDelegate class])); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_2/OpenGL_ES_for_iOS_114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_2/OpenGL_ES_for_iOS_114x114.png -------------------------------------------------------------------------------- /iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_2/OpenGL_ES_for_iOS_57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_2/OpenGL_ES_for_iOS_57x57.png -------------------------------------------------------------------------------- /iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_2/OpenGL_ES_for_iOS_72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_2/OpenGL_ES_for_iOS_72x72.png -------------------------------------------------------------------------------- /iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_3/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_3/Default-568h@2x.png -------------------------------------------------------------------------------- /iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_3/OpenGLES_Ch8_3/OpenGLES_Ch8_3-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'OpenGLES_Ch8_3' target in the 'OpenGLES_Ch8_3' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_3/OpenGLES_Ch8_3/OpenGLES_Ch8_3AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch8_3AppDelegate.h 3 | // OpenGLES_Ch8_3 4 | // 5 | 6 | #import 7 | 8 | @interface OpenGLES_Ch8_3AppDelegate : UIResponder 9 | 10 | @property (strong, nonatomic) UIWindow *window; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_3/OpenGLES_Ch8_3/OpenGLES_Ch8_3ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch8_3ViewController.h 3 | // OpenGLES_Ch8_3 4 | // 5 | 6 | #import 7 | 8 | @interface OpenGLES_Ch8_3ViewController : GLKViewController 9 | 10 | - (IBAction)takeSelectedEmitterFrom:(UISegmentedControl *)sender; 11 | - (IBAction)takeSelectedTextureFrom:(UISegmentedControl *)sender; 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_3/OpenGLES_Ch8_3/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_3/OpenGLES_Ch8_3/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // OpenGLES_Ch8_3 4 | // 5 | 6 | #import 7 | 8 | #import "OpenGLES_Ch8_3AppDelegate.h" 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | @autoreleasepool { 13 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([OpenGLES_Ch8_3AppDelegate class])); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_3/OpenGL_ES_for_iOS_114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_3/OpenGL_ES_for_iOS_114x114.png -------------------------------------------------------------------------------- /iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_3/OpenGL_ES_for_iOS_57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_3/OpenGL_ES_for_iOS_57x57.png -------------------------------------------------------------------------------- /iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_3/OpenGL_ES_for_iOS_72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_3/OpenGL_ES_for_iOS_72x72.png -------------------------------------------------------------------------------- /iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_4/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_4/Default-568h@2x.png -------------------------------------------------------------------------------- /iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_4/OpenGLES_Ch8_4/OpenGLES_Ch8_4-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'OpenGLES_Ch8_4' target in the 'OpenGLES_Ch8_4' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_4/OpenGLES_Ch8_4/OpenGLES_Ch8_4AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch8_4AppDelegate.h 3 | // OpenGLES_Ch8_4 4 | // 5 | 6 | #import 7 | 8 | @interface OpenGLES_Ch8_4AppDelegate : UIResponder 9 | 10 | @property (strong, nonatomic) UIWindow *window; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_4/OpenGLES_Ch8_4/OpenGLES_Ch8_4ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch8_4ViewController.h 3 | // OpenGLES_Ch8_4 4 | // 5 | 6 | #import 7 | 8 | @interface OpenGLES_Ch8_4ViewController : GLKViewController 9 | 10 | - (IBAction)takeShouldRenderSpherical:(UISwitch *)sender; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_4/OpenGLES_Ch8_4/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_4/OpenGLES_Ch8_4/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // OpenGLES_Ch8_4 4 | // 5 | 6 | #import 7 | 8 | #import "OpenGLES_Ch8_4AppDelegate.h" 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | @autoreleasepool { 13 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([OpenGLES_Ch8_4AppDelegate class])); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_4/OpenGL_ES_for_iOS_114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_4/OpenGL_ES_for_iOS_114x114.png -------------------------------------------------------------------------------- /iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_4/OpenGL_ES_for_iOS_57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_4/OpenGL_ES_for_iOS_57x57.png -------------------------------------------------------------------------------- /iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_4/OpenGL_ES_for_iOS_72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch08_EXAMPLES/OpenGLES_Ch8_4/OpenGL_ES_for_iOS_72x72.png -------------------------------------------------------------------------------- /iOS examples/ch08_EXAMPLES/Resources/ball.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch08_EXAMPLES/Resources/ball.png -------------------------------------------------------------------------------- /iOS examples/ch08_EXAMPLES/Resources/boat.modelplist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch08_EXAMPLES/Resources/boat.modelplist -------------------------------------------------------------------------------- /iOS examples/ch08_EXAMPLES/Resources/burst.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch08_EXAMPLES/Resources/burst.png -------------------------------------------------------------------------------- /iOS examples/ch08_EXAMPLES/Resources/park.modelplist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch08_EXAMPLES/Resources/park.modelplist -------------------------------------------------------------------------------- /iOS examples/ch08_EXAMPLES/Resources/skybox0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch08_EXAMPLES/Resources/skybox0.png -------------------------------------------------------------------------------- /iOS examples/ch08_EXAMPLES/Resources/smoke.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch08_EXAMPLES/Resources/smoke.png -------------------------------------------------------------------------------- /iOS examples/ch09_EXAMPLES/OpenGLES_Ch9_1/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch09_EXAMPLES/OpenGLES_Ch9_1/Default-568h@2x.png -------------------------------------------------------------------------------- /iOS examples/ch09_EXAMPLES/OpenGLES_Ch9_1/OpenGLES_Ch9_1/OpenGLES_Ch9_1-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'OpenGLES_Ch9_1' target in the 'OpenGLES_Ch9_1' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /iOS examples/ch09_EXAMPLES/OpenGLES_Ch9_1/OpenGLES_Ch9_1/OpenGLES_Ch9_1AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch9_1AppDelegate.h 3 | // OpenGLES_Ch9_1 4 | // 5 | 6 | #import 7 | #import 8 | 9 | 10 | @interface OpenGLES_Ch9_1AppDelegate : UIResponder 11 | 12 | @property (strong, nonatomic) UIWindow *window; 13 | @property (strong, nonatomic, readonly) CMMotionManager *motionManager; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /iOS examples/ch09_EXAMPLES/OpenGLES_Ch9_1/OpenGLES_Ch9_1/OpenGLES_Ch9_1ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch9_1ViewController.h 3 | // OpenGLES_Ch9_1 4 | // 5 | 6 | #import 7 | 8 | @interface OpenGLES_Ch9_1ViewController : GLKViewController 9 | 10 | 11 | @property (strong, nonatomic) IBOutlet UILabel *fpsField; 12 | 13 | - (IBAction)takeShouldCullFrom:(UISwitch *)sender; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /iOS examples/ch09_EXAMPLES/OpenGLES_Ch9_1/OpenGLES_Ch9_1/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /iOS examples/ch09_EXAMPLES/OpenGLES_Ch9_1/OpenGLES_Ch9_1/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // OpenGLES_Ch9_1 4 | // 5 | 6 | #import 7 | 8 | #import "OpenGLES_Ch9_1AppDelegate.h" 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | @autoreleasepool { 13 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([OpenGLES_Ch9_1AppDelegate class])); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /iOS examples/ch09_EXAMPLES/OpenGLES_Ch9_1/OpenGL_ES_for_iOS_114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch09_EXAMPLES/OpenGLES_Ch9_1/OpenGL_ES_for_iOS_114x114.png -------------------------------------------------------------------------------- /iOS examples/ch09_EXAMPLES/OpenGLES_Ch9_1/OpenGL_ES_for_iOS_57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch09_EXAMPLES/OpenGLES_Ch9_1/OpenGL_ES_for_iOS_57x57.png -------------------------------------------------------------------------------- /iOS examples/ch09_EXAMPLES/OpenGLES_Ch9_1/OpenGL_ES_for_iOS_72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch09_EXAMPLES/OpenGLES_Ch9_1/OpenGL_ES_for_iOS_72x72.png -------------------------------------------------------------------------------- /iOS examples/ch09_EXAMPLES/Resources/starships.modelplist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch09_EXAMPLES/Resources/starships.modelplist -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/OpenGLES_Ch10_1/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch10_EXAMPLES/OpenGLES_Ch10_1/Default-568h@2x.png -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/OpenGLES_Ch10_1/OpenGLES_Ch10_1/Controller/OpenGLES_Ch10_1AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch10_1AppDelegate.h 3 | // OpenGLES_Ch10_1 4 | // 5 | 6 | #import 7 | #import "OpenGLES_Ch10_1ViewController.h" 8 | 9 | @interface OpenGLES_Ch10_1AppDelegate : UIResponder 10 | 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @property (strong, nonatomic, readonly) 16 | UtilityModelManager *modelManager; 17 | @property (strong, nonatomic, readonly) 18 | TETerrain *terrain; 19 | @property (readonly, strong, nonatomic) 20 | NSManagedObjectContext *managedObjectContext; 21 | @property (readonly, strong, nonatomic) 22 | NSManagedObjectModel *managedObjectModel; 23 | @property (readonly, strong, nonatomic) 24 | NSPersistentStoreCoordinator *persistentStoreCoordinator; 25 | 26 | - (void)saveContext; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/OpenGLES_Ch10_1/OpenGLES_Ch10_1/Controller/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // OpenGLES_Ch10_1 4 | // 5 | 6 | #import 7 | 8 | #import "OpenGLES_Ch10_1AppDelegate.h" 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | @autoreleasepool { 13 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([OpenGLES_Ch10_1AppDelegate class])); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/OpenGLES_Ch10_1/OpenGLES_Ch10_1/Model/OpenGLES_Ch10_1.xcdatamodeld/.xccurrentversion: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | _XCCurrentVersionName 6 | OpenGLES_Ch10_1.xcdatamodel 7 | 8 | 9 | -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/OpenGLES_Ch10_1/OpenGLES_Ch10_1/Model/TEModelPlacement.h: -------------------------------------------------------------------------------- 1 | // 2 | // TEModelPlacement.h 3 | // 4 | 5 | #import 6 | #import 7 | 8 | @class TETerrain; 9 | 10 | @interface TEModelPlacement : NSManagedObject 11 | 12 | @property (nonatomic) float angle; 13 | @property (nonatomic) int32_t index; 14 | @property (nonatomic, retain) NSString * modelName; 15 | @property (nonatomic) float positionX; 16 | @property (nonatomic) float positionY; 17 | @property (nonatomic) float positionZ; 18 | @property (nonatomic, retain) TETerrain *terrain; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/OpenGLES_Ch10_1/OpenGLES_Ch10_1/Model/TEModelPlacement.m: -------------------------------------------------------------------------------- 1 | // 2 | // TEModelPlacement.m 3 | // 4 | 5 | #import "TEModelPlacement.h" 6 | #import "TETerrain.h" 7 | 8 | 9 | @implementation TEModelPlacement 10 | 11 | @dynamic angle; 12 | @dynamic index; 13 | @dynamic modelName; 14 | @dynamic positionX; 15 | @dynamic positionY; 16 | @dynamic positionZ; 17 | @dynamic terrain; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/OpenGLES_Ch10_1/OpenGLES_Ch10_1/Model/TETerrain.m: -------------------------------------------------------------------------------- 1 | // 2 | // TETerrain.m 3 | // 4 | 5 | #import "TETerrain.h" 6 | #import "TEModelPlacement.h" 7 | 8 | 9 | @implementation TETerrain 10 | 11 | @dynamic detailTextureInfo0; 12 | @dynamic detailTextureInfo1; 13 | @dynamic detailTextureInfo2; 14 | @dynamic detailTextureInfo3; 15 | @dynamic detailTextureScale0; 16 | @dynamic detailTextureScale1; 17 | @dynamic detailTextureScale2; 18 | @dynamic detailTextureScale3; 19 | @dynamic glVertexAttributeBufferID; 20 | @dynamic hasWater; 21 | @dynamic heightScaleFactor; 22 | @dynamic length; 23 | @dynamic lightAndWeightsTextureInfo; 24 | @dynamic lightDirectionX; 25 | @dynamic lightDirectionY; 26 | @dynamic lightDirectionZ; 27 | @dynamic metersPerUnit; 28 | @dynamic modelsData; 29 | @dynamic positionAttributesData; 30 | @dynamic waterHeight; 31 | @dynamic width; 32 | @dynamic modelPlacements; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/OpenGLES_Ch10_1/OpenGLES_Ch10_1/OpenGLES_Ch10_1-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'OpenGLES_Ch10_1' target in the 'OpenGLES_Ch10_1' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #import 15 | #endif 16 | -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/OpenGLES_Ch10_1/OpenGLES_Ch10_1/View/TETerrainTile.h: -------------------------------------------------------------------------------- 1 | // 2 | // TETerrainTile.h 3 | // TerrainViewer 4 | // 5 | 6 | #import 7 | 8 | @class TETerrain; 9 | 10 | 11 | @interface TETerrainTile : NSObject 12 | 13 | @property (assign, nonatomic, readonly) NSInteger originX; 14 | @property (assign, nonatomic, readonly) NSInteger originY; 15 | @property (strong, nonatomic, readonly) NSSet * 16 | containedModelPlacements; 17 | 18 | - (id)initWithTerrain:(TETerrain *)aTerrain 19 | tileOriginX:(NSInteger)x 20 | tileOriginY:(NSInteger)y 21 | tileWidth:(NSInteger)aWidth 22 | tileLength:(NSInteger)aLength; 23 | 24 | - (void)draw; 25 | - (void)drawSimplified; 26 | 27 | - (void)manageContainedModelPlacements:(NSSet *)somePlacements; 28 | - (NSSet *)containedModelPlacements; 29 | 30 | @end 31 | 32 | static const NSInteger TETerrainTileDefaultWidth = 32; 33 | static const NSInteger TETerrainTileDefaultLength = 32; 34 | -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/OpenGLES_Ch10_1/OpenGLES_Ch10_1/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/OpenGLES_Ch10_1/OpenGL_ES_for_iOS_114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch10_EXAMPLES/OpenGLES_Ch10_1/OpenGL_ES_for_iOS_114x114.png -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/OpenGLES_Ch10_1/OpenGL_ES_for_iOS_57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch10_EXAMPLES/OpenGLES_Ch10_1/OpenGL_ES_for_iOS_57x57.png -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/OpenGLES_Ch10_1/OpenGL_ES_for_iOS_72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch10_EXAMPLES/OpenGLES_Ch10_1/OpenGL_ES_for_iOS_72x72.png -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/OpenGLES_Ch10_2/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch10_EXAMPLES/OpenGLES_Ch10_2/Default-568h@2x.png -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/OpenGLES_Ch10_2/OpenGLES_Ch10_2/Controller/OpenGLES_Ch10_2AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch10_2AppDelegate.h 3 | // OpenGLES_Ch10_2 4 | // 5 | 6 | #import 7 | #import "OpenGLES_Ch10_2ViewController.h" 8 | 9 | @interface OpenGLES_Ch10_2AppDelegate : UIResponder 10 | 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @property (strong, nonatomic, readonly) 16 | UtilityModelManager *modelManager; 17 | @property (strong, nonatomic, readonly) 18 | TETerrain *terrain; 19 | @property (readonly, strong, nonatomic) 20 | NSManagedObjectContext *managedObjectContext; 21 | @property (readonly, strong, nonatomic) 22 | NSManagedObjectModel *managedObjectModel; 23 | @property (readonly, strong, nonatomic) 24 | NSPersistentStoreCoordinator *persistentStoreCoordinator; 25 | 26 | - (void)saveContext; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/OpenGLES_Ch10_2/OpenGLES_Ch10_2/Controller/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // OpenGLES_Ch10_2 4 | // 5 | 6 | #import 7 | 8 | #import "OpenGLES_Ch10_2AppDelegate.h" 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | @autoreleasepool { 13 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([OpenGLES_Ch10_2AppDelegate class])); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/OpenGLES_Ch10_2/OpenGLES_Ch10_2/Model/TEModelPlacement.h: -------------------------------------------------------------------------------- 1 | // 2 | // TEModelPlacement.h 3 | // 4 | 5 | #import 6 | #import 7 | 8 | @class TETerrain; 9 | 10 | @interface TEModelPlacement : NSManagedObject 11 | 12 | @property (nonatomic) float angle; 13 | @property (nonatomic) int32_t index; 14 | @property (nonatomic, retain) NSString * modelName; 15 | @property (nonatomic) float positionX; 16 | @property (nonatomic) float positionY; 17 | @property (nonatomic) float positionZ; 18 | @property (nonatomic, retain) TETerrain *terrain; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/OpenGLES_Ch10_2/OpenGLES_Ch10_2/Model/TEModelPlacement.m: -------------------------------------------------------------------------------- 1 | // 2 | // TEModelPlacement.m 3 | // 4 | 5 | #import "TEModelPlacement.h" 6 | #import "TETerrain.h" 7 | 8 | 9 | @implementation TEModelPlacement 10 | 11 | @dynamic angle; 12 | @dynamic index; 13 | @dynamic modelName; 14 | @dynamic positionX; 15 | @dynamic positionY; 16 | @dynamic positionZ; 17 | @dynamic terrain; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/OpenGLES_Ch10_2/OpenGLES_Ch10_2/Model/TETerrain.m: -------------------------------------------------------------------------------- 1 | // 2 | // TETerrain.m 3 | // 4 | 5 | #import "TETerrain.h" 6 | #import "TEModelPlacement.h" 7 | 8 | 9 | @implementation TETerrain 10 | 11 | @dynamic detailTextureInfo0; 12 | @dynamic detailTextureInfo1; 13 | @dynamic detailTextureInfo2; 14 | @dynamic detailTextureInfo3; 15 | @dynamic detailTextureScale0; 16 | @dynamic detailTextureScale1; 17 | @dynamic detailTextureScale2; 18 | @dynamic detailTextureScale3; 19 | @dynamic glVertexAttributeBufferID; 20 | @dynamic hasWater; 21 | @dynamic heightScaleFactor; 22 | @dynamic length; 23 | @dynamic lightAndWeightsTextureInfo; 24 | @dynamic lightDirectionX; 25 | @dynamic lightDirectionY; 26 | @dynamic lightDirectionZ; 27 | @dynamic metersPerUnit; 28 | @dynamic modelsData; 29 | @dynamic positionAttributesData; 30 | @dynamic waterHeight; 31 | @dynamic width; 32 | @dynamic modelPlacements; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/OpenGLES_Ch10_2/OpenGLES_Ch10_2/OpenGLES_Ch10_2-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'OpenGLES_Ch10_2' target in the 'OpenGLES_Ch10_2' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #import 15 | #endif 16 | -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/OpenGLES_Ch10_2/OpenGLES_Ch10_2/OpenGLES_Ch10_2.xcdatamodeld/.xccurrentversion: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | _XCCurrentVersionName 6 | OpenGLES_Ch10_2.xcdatamodel 7 | 8 | 9 | -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/OpenGLES_Ch10_2/OpenGLES_Ch10_2/View/TETerrainTile.h: -------------------------------------------------------------------------------- 1 | // 2 | // TETerrainTile.h 3 | // TerrainViewer 4 | // 5 | 6 | #import 7 | 8 | @class TETerrain; 9 | 10 | 11 | @interface TETerrainTile : NSObject 12 | 13 | @property (assign, nonatomic, readonly) NSInteger originX; 14 | @property (assign, nonatomic, readonly) NSInteger originY; 15 | @property (strong, nonatomic, readonly) NSSet * 16 | containedModelPlacements; 17 | 18 | - (id)initWithTerrain:(TETerrain *)aTerrain 19 | tileOriginX:(NSInteger)x 20 | tileOriginY:(NSInteger)y 21 | tileWidth:(NSInteger)aWidth 22 | tileLength:(NSInteger)aLength; 23 | 24 | - (void)draw; 25 | - (void)drawSimplified; 26 | 27 | - (void)manageContainedModelPlacements:(NSSet *)somePlacements; 28 | - (NSSet *)containedModelPlacements; 29 | 30 | @end 31 | 32 | static const NSInteger TETerrainTileDefaultWidth = 32; 33 | static const NSInteger TETerrainTileDefaultLength = 32; 34 | -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/OpenGLES_Ch10_2/OpenGLES_Ch10_2/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/OpenGLES_Ch10_2/OpenGL_ES_for_iOS_114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch10_EXAMPLES/OpenGLES_Ch10_2/OpenGL_ES_for_iOS_114x114.png -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/OpenGLES_Ch10_2/OpenGL_ES_for_iOS_57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch10_EXAMPLES/OpenGLES_Ch10_2/OpenGL_ES_for_iOS_57x57.png -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/OpenGLES_Ch10_2/OpenGL_ES_for_iOS_72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch10_EXAMPLES/OpenGLES_Ch10_2/OpenGL_ES_for_iOS_72x72.png -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/TerrainEditor/TerrainEditor/GeneratedModel/TEModelPlacement.h: -------------------------------------------------------------------------------- 1 | // 2 | // TEModelPlacement.h 3 | // TerrainEditor 4 | // 5 | 6 | #import 7 | #import 8 | 9 | @class TETerrain; 10 | 11 | @interface TEModelPlacement : NSManagedObject 12 | 13 | @property (nonatomic, retain) NSNumber * angle; 14 | @property (nonatomic, retain) NSString * modelName; 15 | @property (nonatomic, retain) NSNumber * positionX; 16 | @property (nonatomic, retain) NSNumber * positionY; 17 | @property (nonatomic, retain) NSNumber * positionZ; 18 | @property (nonatomic, retain) NSNumber * index; 19 | @property (nonatomic, retain) TETerrain *terrain; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/TerrainEditor/TerrainEditor/GeneratedModel/TEModelPlacement.m: -------------------------------------------------------------------------------- 1 | // 2 | // TEModelPlacement.m 3 | // TerrainEditor 4 | // 5 | 6 | #import "TEModelPlacement.h" 7 | #import "TETerrain.h" 8 | 9 | 10 | @implementation TEModelPlacement 11 | 12 | @dynamic angle; 13 | @dynamic modelName; 14 | @dynamic positionX; 15 | @dynamic positionY; 16 | @dynamic positionZ; 17 | @dynamic index; 18 | @dynamic terrain; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/TerrainEditor/TerrainEditor/GeneratedModel/TETerrain.m: -------------------------------------------------------------------------------- 1 | // 2 | // TETerrain.m 3 | // TerrainEditor 4 | // 5 | 6 | #import "TETerrain.h" 7 | #import "TEModelPlacement.h" 8 | 9 | 10 | @implementation TETerrain 11 | 12 | @dynamic detailTextureInfo0; 13 | @dynamic detailTextureInfo1; 14 | @dynamic detailTextureInfo2; 15 | @dynamic detailTextureInfo3; 16 | @dynamic detailTextureScale0; 17 | @dynamic detailTextureScale1; 18 | @dynamic detailTextureScale2; 19 | @dynamic detailTextureScale3; 20 | @dynamic glVertexAttributeBufferID; 21 | @dynamic hasWater; 22 | @dynamic heightScaleFactor; 23 | @dynamic length; 24 | @dynamic lightAndWeightsTextureInfo; 25 | @dynamic lightDirectionX; 26 | @dynamic lightDirectionY; 27 | @dynamic lightDirectionZ; 28 | @dynamic metersPerUnit; 29 | @dynamic modelsData; 30 | @dynamic positionAttributesData; 31 | @dynamic waterHeight; 32 | @dynamic width; 33 | @dynamic modelPlacements; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/TerrainEditor/TerrainEditor/RadiusSelectionTool.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch10_EXAMPLES/TerrainEditor/TerrainEditor/RadiusSelectionTool.png -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/TerrainEditor/TerrainEditor/Sahara.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch10_EXAMPLES/TerrainEditor/TerrainEditor/Sahara.jpg -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/TerrainEditor/TerrainEditor/TEAreaTool.h: -------------------------------------------------------------------------------- 1 | // 2 | // TEAreaTool.h 3 | // TerrainEditor 4 | // 5 | 6 | #import "TETool.h" 7 | 8 | @interface TEAreaTool : TETool 9 | 10 | @property (strong, nonatomic, readwrite) 11 | NSNumber *toolRadius; 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/TerrainEditor/TerrainEditor/TEAreaTool.m: -------------------------------------------------------------------------------- 1 | // 2 | // TEAreaTool.m 3 | // TerrainEditor 4 | // 5 | 6 | #import "TEAreaTool.h" 7 | #import "TEView.h" 8 | #import "TETerrain.h" 9 | #import "TETerrainEffect.h" 10 | 11 | @implementation TEAreaTool 12 | 13 | @synthesize toolRadius; 14 | 15 | 16 | ///////////////////////////////////////////////////////////////// 17 | // 18 | - (void)setToolRadius:(NSNumber *)aNumber 19 | { 20 | [aNumber retain]; 21 | [toolRadius release]; 22 | toolRadius = aNumber; 23 | 24 | TEView *view = self.owner; 25 | 26 | view.terrainEffect.toolTextureRadius = 27 | [self.toolRadius floatValue]; 28 | [view.terrainEffect updateTool]; 29 | [view display]; 30 | } 31 | 32 | 33 | ///////////////////////////////////////////////////////////////// 34 | // 35 | - (void)update 36 | { 37 | TEView *view = self.owner; 38 | 39 | view.terrainEffect.toolTextureRadius = 40 | [self.toolRadius floatValue]; 41 | } 42 | 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/TerrainEditor/TerrainEditor/TEDetailTextureTool.h: -------------------------------------------------------------------------------- 1 | // 2 | // TEDetailTextureTool.h 3 | // TerrainEditor 4 | // 5 | 6 | #import "TEAreaTool.h" 7 | 8 | 9 | @interface TEDetailTextureTool : TEAreaTool 10 | 11 | @property (strong, nonatomic, readonly) 12 | NSImage *toolTextureImage; 13 | @property (strong, nonatomic, readwrite) 14 | NSNumber *detailTexture0Weight; 15 | @property (strong, nonatomic, readwrite) 16 | NSNumber *detailTexture1Weight; 17 | @property (strong, nonatomic, readwrite) 18 | NSNumber *detailTexture2Weight; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/TerrainEditor/TerrainEditor/TEDocument.h: -------------------------------------------------------------------------------- 1 | // 2 | // TEDocument.h 3 | // TerrainEditor 4 | // 5 | 6 | #import 7 | #import "UtilityVector.h" 8 | 9 | 10 | @interface TEDocument : NSPersistentDocument 11 | 12 | - (IBAction)loadModels:(id)sender; 13 | 14 | @end 15 | 16 | 17 | ////////////////////////////////////////////////////////////////// 18 | // 19 | extern const UtilityVector3 TEDefaultTerrainLightDirection; 20 | -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/TerrainEditor/TerrainEditor/TEDocument.xcdatamodeld/.xccurrentversion: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | _XCCurrentVersionName 6 | TEDocument.xcdatamodel 7 | 8 | 9 | -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/TerrainEditor/TerrainEditor/TEEffect.h: -------------------------------------------------------------------------------- 1 | // 2 | // TEEffect.h 3 | // 4 | // 5 | 6 | #import 7 | 8 | @interface TEEffect : NSObject 9 | 10 | @property (assign, nonatomic, readonly) GLuint program; 11 | 12 | - (void)prepareOpenGL; 13 | - (void)updateUniformValues; 14 | - (void)prepareToDraw; 15 | 16 | // Required overrides 17 | - (void)bindAttribLocations; 18 | - (void)configureUniformLocations; 19 | 20 | - (BOOL)loadShadersWithName:(NSString *)aShaderName; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/TerrainEditor/TerrainEditor/TEElevationTool.h: -------------------------------------------------------------------------------- 1 | // 2 | // TEElevationTool.h 3 | // TerrainEditor 4 | // 5 | 6 | #import "TEAreaTool.h" 7 | 8 | @interface TEElevationTool : TEAreaTool 9 | 10 | @property (assign, nonatomic, readwrite) 11 | SEL elevationChangeSelector; 12 | 13 | - (IBAction)useRaiseElevationMode:(id)sender; 14 | - (IBAction)useLowerElevationMode:(id)sender; 15 | - (IBAction)useSmoothElevationMode:(id)sender; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/TerrainEditor/TerrainEditor/TEHeightMap.h: -------------------------------------------------------------------------------- 1 | // 2 | // TEHeightMap.h 3 | // TerrainViewer 4 | // 5 | 6 | #import 7 | #import "UtilityVector.h" 8 | 9 | 10 | @interface TEHeightMap : NSObject 11 | 12 | @property (assign, nonatomic, readonly) NSInteger width; 13 | @property (assign, nonatomic, readonly) NSInteger length; 14 | @property (assign, nonatomic, readonly) BOOL isValid; 15 | 16 | 17 | - (id)initFromPath:(NSString *)aPath; 18 | 19 | - (GLfloat)heightAtXPos:(short int)x yPos:(short int)y; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/TerrainEditor/TerrainEditor/TEModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // TEModel.h 3 | // TerrainEditor 4 | // 5 | 6 | #import 7 | 8 | @class TEMesh; 9 | 10 | 11 | @interface TEModel : NSObject 12 | 13 | @property (strong, nonatomic, readonly) TEMesh 14 | *mesh; 15 | @property (copy, nonatomic, readwrite) NSString 16 | *name; 17 | @property (copy, nonatomic, readonly) NSString 18 | *axisAlignedBoundingBox; 19 | @property (strong, nonatomic, readonly) NSNumber 20 | *numberOfVertices; 21 | @property (strong, nonatomic, readonly) NSDictionary 22 | *plistRepresentation; 23 | 24 | - (id)initWithName:(NSString *)aName 25 | mesh:(TEMesh *)aMesh 26 | indexOfFirstCommand:(NSUInteger)aFirstIndex 27 | numberOfCommands:(NSUInteger)count; 28 | - (id)initWithPlistRepresentation:(NSDictionary *)aDictionary 29 | mesh:(TEMesh *)aMesh; 30 | 31 | - (void)draw; 32 | - (void)drawBoundingBox; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/TerrainEditor/TerrainEditor/TEModelEffect.h: -------------------------------------------------------------------------------- 1 | // 2 | // TEModelEffect.h 3 | // TerrainEditor 4 | // 5 | 6 | #import "TEEffect.h" 7 | #import "UtilityTextureLoader.h" 8 | #import "UtilityMatrix.h" 9 | 10 | 11 | ///////////////////////////////////////////////////////////////// 12 | // 13 | typedef enum 14 | { 15 | TEModelPositionAttrib, 16 | TEModelNormalAttrib, 17 | TEModelTexCoords0Attrib, 18 | TEModelNumberOfAttributes 19 | } TEModelAttribute; 20 | 21 | 22 | @interface TEModelEffect : TEEffect 23 | 24 | @property (assign, nonatomic, readwrite) UtilityMatrix4 projectionMatrix; 25 | @property (assign, nonatomic, readwrite) UtilityMatrix4 modelviewMatrix; 26 | @property (assign, nonatomic, readwrite) UtilityVector4 globalAmbientLightColor; 27 | @property (assign, nonatomic, readwrite) UtilityVector3 diffuseLightDirection; 28 | @property (strong, nonatomic, readwrite) UtilityTextureInfo *texture2D; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/TerrainEditor/TerrainEditor/TEModelManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // TEModelManager.h 3 | // TerrainEditor 4 | // 5 | 6 | #import "UtilityTextureLoader.h" 7 | 8 | @class TEEffect; 9 | @class TEModel; 10 | 11 | 12 | @interface TEModelManager : NSObject 13 | 14 | @property (strong, nonatomic, readonly) UtilityTextureInfo 15 | *textureInfo; 16 | @property (strong, nonatomic, readonly) NSDictionary 17 | *modelsDictionary; 18 | 19 | - (id)init; 20 | 21 | - (BOOL)readFromData:(NSData *)data 22 | ofType:(NSString *)typeName 23 | error:(NSError **)outError; 24 | 25 | - (TEModel *)modelNamed:(NSString *)aName; 26 | - (void)prepareToDraw; 27 | - (void)prepareToPick; 28 | 29 | @end 30 | 31 | ///////////////////////////////////////////////////////////////// 32 | // Constants used to access model properties from a plist 33 | // dictionary. 34 | extern NSString *const TEModelManagerTextureImageInfo; 35 | extern NSString *const TEModelManagerMesh; 36 | extern NSString *const TEModelManagerModels; 37 | -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/TerrainEditor/TerrainEditor/TEModelPlacementTool.h: -------------------------------------------------------------------------------- 1 | // 2 | // TEModelPlacementTool.h 3 | // TerrainEditor 4 | // 5 | 6 | #import "TETool.h" 7 | 8 | @class TEModelPlacement; 9 | @class TEModel; 10 | 11 | 12 | @interface TEModelPlacementTool : TETool 13 | 14 | @property (assign, nonatomic, readonly) BOOL canPlaceSelectedModel; 15 | @property (assign, nonatomic, readonly) BOOL canDeleteSelectedPlacement; 16 | @property (strong, nonatomic, readonly) 17 | TEModelPlacement *selectedPlacement; 18 | @property (strong, nonatomic, readonly) 19 | TEModel *selectedModel; 20 | @property (strong, nonatomic, readwrite) 21 | IBOutlet NSArrayController *modelsArrayController; 22 | @property (strong, nonatomic, readwrite) 23 | IBOutlet NSArrayController *modelPlacementArrayController; 24 | 25 | - (IBAction)placeModel:(id)sender; 26 | - (IBAction)deleteSelectedModelPlacements:(id)sender; 27 | - (IBAction)noteModelSelectionChange:(id)sender; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/TerrainEditor/TerrainEditor/TETerrainTile.h: -------------------------------------------------------------------------------- 1 | // 2 | // TETerrainTile.h 3 | // TerrainViewer 4 | // 5 | 6 | #import 7 | 8 | @class TETerrain; 9 | 10 | 11 | @interface TETerrainTile : NSObject 12 | 13 | @property (assign, nonatomic, readonly) NSInteger originX; 14 | @property (assign, nonatomic, readonly) NSInteger originY; 15 | 16 | - (id)initWithTerrain:(TETerrain *)aTerrain 17 | tileOriginX:(NSInteger)x 18 | tileOriginY:(NSInteger)y 19 | tileWidth:(NSInteger)aWidth 20 | tileLength:(NSInteger)aLength; 21 | 22 | - (void)draw; 23 | - (void)drawLines; 24 | 25 | @end 26 | 27 | static const NSInteger TETerrainTileDefaultWidth = 32; 28 | static const NSInteger TETerrainTileDefaultLength = 32; 29 | -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/TerrainEditor/TerrainEditor/TETool.h: -------------------------------------------------------------------------------- 1 | // 2 | // TETool.h 3 | // TerrainEditor 4 | // 5 | 6 | #import 7 | 8 | 9 | @interface TETool : NSObject 10 | 11 | @property (strong, nonatomic, readwrite) IBOutlet NSView *supportView; 12 | @property (assign, nonatomic, readwrite) IBOutlet id owner; 13 | 14 | - (void)becomeActive; 15 | - (void)resignActive; 16 | 17 | - (void)mouseDown:(NSEvent *)theEvent; 18 | - (void)mouseDragged:(NSEvent *)theEvent; 19 | - (void)mouseUp:(NSEvent *)theEvent; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/TerrainEditor/TerrainEditor/TerrainEditor-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'TerrainEditor' target in the 'TerrainEditor' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/TerrainEditor/TerrainEditor/Utility/UtilityMath.h: -------------------------------------------------------------------------------- 1 | // 2 | // UtilityMath.h 3 | // 4 | // 5 | 6 | #ifndef TEMath_H 7 | #define TEMath_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | #include "UtilityVector.h" 14 | 15 | static const UtilityVector3 UtilityZeroVector = {0.0f, 0.0f, 0.0f}; 16 | static const float UtilityFloatEpsilon = (FLT_EPSILON); 17 | static const float UtilityPI = (M_PI); 18 | static const float Utility2PI = (M_PI * 2.0f); 19 | static const float UtilityPI_OVER_2 = (M_PI / 2.0f); 20 | static const float UtilityDegreesToRadians = (M_PI / 180.0f); 21 | static const float UtilityRadiansToDegrees = (180.0f / M_PI); 22 | 23 | #define UtilityFloatNotZero(a) (fabs(a) >= UtilityFloatEpsilon) 24 | 25 | #ifdef __cplusplus 26 | } 27 | #endif 28 | 29 | #endif // TEMath_H 30 | -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/TerrainEditor/TerrainEditor/en.lproj/Credits.rtf: -------------------------------------------------------------------------------- 1 | {\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;} 2 | {\colortbl;\red255\green255\blue255;} 3 | \paperw9840\paperh8400 4 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural 5 | 6 | \f0\b\fs24 \cf0 Engineering: 7 | \b0 \ 8 | Some people\ 9 | \ 10 | 11 | \b Human Interface Design: 12 | \b0 \ 13 | Some other people\ 14 | \ 15 | 16 | \b Testing: 17 | \b0 \ 18 | Hopefully not nobody\ 19 | \ 20 | 21 | \b Documentation: 22 | \b0 \ 23 | Whoever\ 24 | \ 25 | 26 | \b With special thanks to: 27 | \b0 \ 28 | Mom\ 29 | } 30 | -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/TerrainEditor/TerrainEditor/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/TerrainEditor/TerrainEditor/heightMap.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch10_EXAMPLES/TerrainEditor/TerrainEditor/heightMap.tga -------------------------------------------------------------------------------- /iOS examples/ch10_EXAMPLES/TerrainEditor/TerrainEditor/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // TerrainEditor 4 | // 5 | 6 | #import 7 | 8 | int main(int argc, char *argv[]) 9 | { 10 | return NSApplicationMain(argc, (const char **)argv); 11 | } 12 | -------------------------------------------------------------------------------- /iOS examples/ch12_EXAMPLES/OpenGLES_Ch12_1/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch12_EXAMPLES/OpenGLES_Ch12_1/Default-568h@2x.png -------------------------------------------------------------------------------- /iOS examples/ch12_EXAMPLES/OpenGLES_Ch12_1/Default-Landscape@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch12_EXAMPLES/OpenGLES_Ch12_1/Default-Landscape@2x.png -------------------------------------------------------------------------------- /iOS examples/ch12_EXAMPLES/OpenGLES_Ch12_1/Default-Landscape~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch12_EXAMPLES/OpenGLES_Ch12_1/Default-Landscape~ipad.png -------------------------------------------------------------------------------- /iOS examples/ch12_EXAMPLES/OpenGLES_Ch12_1/Default-Portrait~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch12_EXAMPLES/OpenGLES_Ch12_1/Default-Portrait~ipad.png -------------------------------------------------------------------------------- /iOS examples/ch12_EXAMPLES/OpenGLES_Ch12_1/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch12_EXAMPLES/OpenGLES_Ch12_1/Default.png -------------------------------------------------------------------------------- /iOS examples/ch12_EXAMPLES/OpenGLES_Ch12_1/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch12_EXAMPLES/OpenGLES_Ch12_1/Default@2x.png -------------------------------------------------------------------------------- /iOS examples/ch12_EXAMPLES/OpenGLES_Ch12_1/OpenGLES_Ch12_1/Controller/OpenGLES_Ch12_1AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenGLES_Ch12_1AppDelegate.h 3 | // OpenGLES_Ch12_1 4 | // 5 | 6 | #import 7 | #import "OpenGLES_Ch12_1ViewController.h" 8 | 9 | @class TECart; 10 | 11 | 12 | @interface OpenGLES_Ch12_1AppDelegate : UIResponder 13 | 16 | 17 | @property (strong, nonatomic) UIWindow *window; 18 | 19 | @property (strong, nonatomic, readonly) 20 | UtilityModelManager *modelManager; 21 | @property (strong, nonatomic, readonly) 22 | UtilityModelManager *playerModelManager; 23 | @property (strong, nonatomic, readonly) 24 | NSArray *carts; 25 | @property (strong, nonatomic, readonly) 26 | TECart *playerCart; 27 | @property (strong, nonatomic, readonly) 28 | TETerrain *terrain; 29 | 30 | - (void)saveContext; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /iOS examples/ch12_EXAMPLES/OpenGLES_Ch12_1/OpenGLES_Ch12_1/Controller/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // OpenGLES_Ch12_1 4 | // 5 | 6 | #import 7 | 8 | #import "OpenGLES_Ch12_1AppDelegate.h" 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | @autoreleasepool { 13 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([OpenGLES_Ch12_1AppDelegate class])); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /iOS examples/ch12_EXAMPLES/OpenGLES_Ch12_1/OpenGLES_Ch12_1/Model/OpenGLES_Ch12_1.xcdatamodeld/.xccurrentversion: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | _XCCurrentVersionName 6 | OpenGLES_Ch12_1.xcdatamodel 7 | 8 | 9 | -------------------------------------------------------------------------------- /iOS examples/ch12_EXAMPLES/OpenGLES_Ch12_1/OpenGLES_Ch12_1/Model/TEModelPlacement.h: -------------------------------------------------------------------------------- 1 | // 2 | // TEModelPlacement.h 3 | // 4 | 5 | #import 6 | #import 7 | 8 | @class TETerrain; 9 | 10 | @interface TEModelPlacement : NSManagedObject 11 | 12 | @property (nonatomic) float angle; 13 | @property (nonatomic) int32_t index; 14 | @property (nonatomic, retain) NSString * modelName; 15 | @property (nonatomic) float positionX; 16 | @property (nonatomic) float positionY; 17 | @property (nonatomic) float positionZ; 18 | @property (nonatomic, retain) TETerrain *terrain; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /iOS examples/ch12_EXAMPLES/OpenGLES_Ch12_1/OpenGLES_Ch12_1/Model/TEModelPlacement.m: -------------------------------------------------------------------------------- 1 | // 2 | // TEModelPlacement.m 3 | // 4 | 5 | #import "TEModelPlacement.h" 6 | #import "TETerrain.h" 7 | 8 | 9 | @implementation TEModelPlacement 10 | 11 | @dynamic angle; 12 | @dynamic index; 13 | @dynamic modelName; 14 | @dynamic positionX; 15 | @dynamic positionY; 16 | @dynamic positionZ; 17 | @dynamic terrain; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /iOS examples/ch12_EXAMPLES/OpenGLES_Ch12_1/OpenGLES_Ch12_1/Model/TEParticleEmitter.h: -------------------------------------------------------------------------------- 1 | // 2 | // TEParticleEmitter.h 3 | // OpenGLES_Ch12_1 4 | // 5 | 6 | #import 7 | 8 | @class UtilityModel; 9 | @class UtilityBillboardParticleManager; 10 | 11 | 12 | ///////////////////////////////////////////////////////////////// 13 | // Type for blocks called to emit particles 14 | typedef void (^TEParticleEmitterBlock)( 15 | GLKVector3 position, 16 | UtilityBillboardParticleManager *manager, 17 | NSTimeInterval elapsedTime, 18 | id owner); 19 | 20 | 21 | @interface TEParticleEmitter : NSObject 22 | 23 | @property (assign, nonatomic, readonly) 24 | GLKVector3 position; 25 | 26 | - (id)initWithModel:(UtilityModel *)aModel; 27 | 28 | - (void)updateWithParticleEmitterBlock: 29 | (TEParticleEmitterBlock)aBlock 30 | manager:(UtilityBillboardParticleManager *)manager 31 | elapsedTime:(NSTimeInterval)someSeconds 32 | owner:(id)anOwner; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /iOS examples/ch12_EXAMPLES/OpenGLES_Ch12_1/OpenGLES_Ch12_1/Model/TETerrain.m: -------------------------------------------------------------------------------- 1 | // 2 | // TETerrain.m 3 | // 4 | 5 | #import "TETerrain.h" 6 | #import "TEModelPlacement.h" 7 | 8 | 9 | @implementation TETerrain 10 | 11 | @dynamic detailTextureInfo0; 12 | @dynamic detailTextureInfo1; 13 | @dynamic detailTextureInfo2; 14 | @dynamic detailTextureInfo3; 15 | @dynamic detailTextureScale0; 16 | @dynamic detailTextureScale1; 17 | @dynamic detailTextureScale2; 18 | @dynamic detailTextureScale3; 19 | @dynamic glVertexAttributeBufferID; 20 | @dynamic hasWater; 21 | @dynamic heightScaleFactor; 22 | @dynamic length; 23 | @dynamic lightAndWeightsTextureInfo; 24 | @dynamic lightDirectionX; 25 | @dynamic lightDirectionY; 26 | @dynamic lightDirectionZ; 27 | @dynamic metersPerUnit; 28 | @dynamic modelsData; 29 | @dynamic positionAttributesData; 30 | @dynamic waterHeight; 31 | @dynamic width; 32 | @dynamic modelPlacements; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /iOS examples/ch12_EXAMPLES/OpenGLES_Ch12_1/OpenGLES_Ch12_1/OpenGLES_Ch12_1-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'OpenGLES_Ch12_1' target in the 'OpenGLES_Ch12_1' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /iOS examples/ch12_EXAMPLES/OpenGLES_Ch12_1/OpenGLES_Ch12_1/View/TECart+viewAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // TECart+viewAdditions.h 3 | // OpenGLES_Ch12_1 4 | // 5 | 6 | #import "TECart.h" 7 | 8 | @class UtilityModelEffect; 9 | 10 | 11 | @interface TECart (viewAdditions) 12 | 13 | - (void)drawWithEffect:(UtilityModelEffect *)anEffect; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /iOS examples/ch12_EXAMPLES/OpenGLES_Ch12_1/OpenGLES_Ch12_1/View/TETerrainTile.h: -------------------------------------------------------------------------------- 1 | // 2 | // TETerrainTile.h 3 | // TerrainViewer 4 | // 5 | 6 | #import 7 | 8 | @class TETerrain; 9 | 10 | 11 | @interface TETerrainTile : NSObject 12 | 13 | @property (assign, nonatomic, readonly) NSInteger originX; 14 | @property (assign, nonatomic, readonly) NSInteger originY; 15 | @property (strong, nonatomic, readonly) NSSet * 16 | containedModelPlacements; 17 | 18 | - (id)initWithTerrain:(TETerrain *)aTerrain 19 | tileOriginX:(NSInteger)x 20 | tileOriginY:(NSInteger)y 21 | tileWidth:(NSInteger)aWidth 22 | tileLength:(NSInteger)aLength; 23 | 24 | - (void)draw; 25 | - (void)drawSimplified; 26 | 27 | - (void)manageContainedModelPlacements:(NSSet *)somePlacements; 28 | - (NSSet *)containedModelPlacements; 29 | 30 | @end 31 | 32 | static const NSInteger TETerrainTileDefaultWidth = 32; 33 | static const NSInteger TETerrainTileDefaultLength = 32; 34 | -------------------------------------------------------------------------------- /iOS examples/ch12_EXAMPLES/OpenGLES_Ch12_1/OpenGLES_Ch12_1/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /iOS examples/ch12_EXAMPLES/OpenGLES_Ch12_1/OpenGL_ES_for_iOS_114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch12_EXAMPLES/OpenGLES_Ch12_1/OpenGL_ES_for_iOS_114x114.png -------------------------------------------------------------------------------- /iOS examples/ch12_EXAMPLES/OpenGLES_Ch12_1/OpenGL_ES_for_iOS_57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch12_EXAMPLES/OpenGLES_Ch12_1/OpenGL_ES_for_iOS_57x57.png -------------------------------------------------------------------------------- /iOS examples/ch12_EXAMPLES/OpenGLES_Ch12_1/OpenGL_ES_for_iOS_72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch12_EXAMPLES/OpenGLES_Ch12_1/OpenGL_ES_for_iOS_72x72.png -------------------------------------------------------------------------------- /iOS examples/ch12_EXAMPLES/Resources/BOOSTa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch12_EXAMPLES/Resources/BOOSTa.png -------------------------------------------------------------------------------- /iOS examples/ch12_EXAMPLES/Resources/cart007.modelplist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch12_EXAMPLES/Resources/cart007.modelplist -------------------------------------------------------------------------------- /iOS examples/ch12_EXAMPLES/Resources/cartTextures.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch12_EXAMPLES/Resources/cartTextures.png -------------------------------------------------------------------------------- /iOS examples/ch12_EXAMPLES/Resources/eyePOV.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch12_EXAMPLES/Resources/eyePOV.png -------------------------------------------------------------------------------- /iOS examples/ch12_EXAMPLES/Resources/skybox004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch12_EXAMPLES/Resources/skybox004.png -------------------------------------------------------------------------------- /iOS examples/ch12_EXAMPLES/Resources/texture0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xcoders/OpenGL/c08599cef73721529a5c4a1f88a3d34714da522f/iOS examples/ch12_EXAMPLES/Resources/texture0.png --------------------------------------------------------------------------------