This commit is contained in:
Vladislav Khorev 2013-01-28 13:59:51 +00:00
parent 33401ffca5
commit 790c02aa68
3 changed files with 513 additions and 505 deletions

View File

@ -9,6 +9,9 @@
#import "ViewController.h" #import "ViewController.h"
#import "ios_api.h" #import "ios_api.h"
extern GLKView* defaultView;
@interface ViewController () { @interface ViewController () {
} }
@ -39,6 +42,7 @@
view.context = self.context; view.context = self.context;
view.drawableDepthFormat = GLKViewDrawableDepthFormat24; view.drawableDepthFormat = GLKViewDrawableDepthFormat24;
defaultView = view;
[self setupGL]; [self setupGL];
} }

View File

@ -46,8 +46,10 @@ void TMyApplication::InnerInit()
ResourceManager->SoundManager.LoadSound("shot.wav"); ResourceManager->SoundManager.LoadSound("shot.wav");
Renderer->MovePhi(pi/6); boost::get<TPanoramicCamera>(Renderer->Camera).MovePhi(pi/6);
Renderer->MoveDist(6.f); boost::get<TPanoramicCamera>(Renderer->Camera).MoveDist(6.f);
boost::get<TPanoramicCamera>(Renderer->Camera).CalcCamVec();
ResourceManager->LightManager.SetLightDirection(vec3(-1,0,-1)); ResourceManager->LightManager.SetLightDirection(vec3(-1,0,-1));
ResourceManager->LightManager.SetLightColor(vec4(1,0,0,1)); ResourceManager->LightManager.SetLightColor(vec4(1,0,0,1));
@ -64,6 +66,8 @@ void TMyApplication::InnerInit()
//Uncomment to start music playing //Uncomment to start music playing
//ResourceManager->SoundManager.PlayMusic("level1ogg.ogg"); //ResourceManager->SoundManager.PlayMusic("level1ogg.ogg");
Renderer->PushPerspectiveProjectionMatrix(pi/6, Renderer->GetMatrixWidth()/Renderer->GetMatrixHeight(), 1.f, 100.f);
*Console<<"Inner init end!\n"; *Console<<"Inner init end!\n";
} }