fixing minor bugs

This commit is contained in:
Vladislav Khorev 2013-02-10 15:34:32 +00:00
parent b3eb112ae3
commit 1ba2538baf
2 changed files with 9 additions and 35 deletions

View File

@ -14,43 +14,10 @@ bool RedBkgPref = false;
JNIEXPORT void JNICALL Java_fishrungames_wallpapertemplate_JniWrapper_Init(JNIEnv * env, jobject obj, jint width, jint height)
{
Application = JniInitApp<TAndroidApplication>(width, height, 800.f, 480.f);
Application = JniInitApp<TAndroidApplication>(width, height, width, height);
boost::get<TPanoramicCamera>(Renderer->Camera).SetAlpha((lastOffsetX) * pi / 180.f);
/*
RenderMutex.lock();
try
{
if (Application->IsInited())
{
App->OuterDeinit(); //Clean up what is left at previous launch (if applicable)
}
App->Width = width;
App->Height = height;
if (width > height)
{
App->OuterInit(width, height, 800.f, 480.f);
}
else
{
App->OuterInit(width, height, 480.f, 800.f);
}
Renderer->SetAlpha((lastOffsetX) * pi / 180.f);
App->Inited = true;
}
catch (...)
{
throw;
}
RenderMutex.unlock();*/
}
@ -62,6 +29,7 @@ JNIEXPORT void JNICALL Java_fishrungames_wallpapertemplate_JniWrapper_SetOffset(
{
OffsetChanged = true;
lastOffsetX = offsetX;
boost::get<TPanoramicCamera>(Renderer->Camera).SetAlpha((lastOffsetX) * pi / 180.f);
}
}

View File

@ -75,6 +75,9 @@ void TAndroidApplication::DrawAllScene()
Renderer->PopProjectionMatrix();
Renderer->PushPerspectiveProjectionMatrix(pi/6, Renderer->GetMatrixWidth() / Renderer->GetMatrixHeight(), 1.f, 4500.f);
glClear(GL_DEPTH_BUFFER_BIT);
Renderer->SetGLCamView();
@ -82,6 +85,9 @@ void TAndroidApplication::DrawAllScene()
//LiteModel->DrawVBO();
FlexModel.Draw();
Renderer->PopProjectionMatrix();
}
void TAndroidApplication::InnerInit()