fixing minor bugs
This commit is contained in:
parent
b3eb112ae3
commit
1ba2538baf
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -75,12 +75,18 @@ void TAndroidApplication::DrawAllScene()
|
||||
|
||||
Renderer->PopProjectionMatrix();
|
||||
|
||||
Renderer->PushPerspectiveProjectionMatrix(pi/6, Renderer->GetMatrixWidth() / Renderer->GetMatrixHeight(), 1.f, 4500.f);
|
||||
|
||||
|
||||
glClear(GL_DEPTH_BUFFER_BIT);
|
||||
|
||||
Renderer->SetGLCamView();
|
||||
|
||||
//LiteModel->DrawVBO();
|
||||
FlexModel.Draw();
|
||||
|
||||
Renderer->PopProjectionMatrix();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user