[android] detect size
This commit is contained in:
parent
6dc2752c81
commit
e9657beaa6
@ -256,6 +256,16 @@ namespace video
|
|||||||
|
|
||||||
genericDriverInit(params.WindowSize, params.Stencilbuffer);
|
genericDriverInit(params.WindowSize, params.Stencilbuffer);
|
||||||
|
|
||||||
|
#ifdef _IRR_COMPILE_WITH_ANDROID_DEVICE_
|
||||||
|
int backingWidth;
|
||||||
|
int backingHeight;
|
||||||
|
eglQuerySurface(EglDisplay, EglSurface, EGL_WIDTH, &backingWidth);
|
||||||
|
eglQuerySurface(EglDisplay, EglSurface, EGL_HEIGHT, &backingHeight);
|
||||||
|
core::dimension2d<u32> WindowSize(backingWidth, backingHeight);
|
||||||
|
CNullDriver::ScreenSize = WindowSize;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// set vsync
|
// set vsync
|
||||||
if (params.Vsync)
|
if (params.Vsync)
|
||||||
eglSwapInterval(EglDisplay, 1);
|
eglSwapInterval(EglDisplay, 1);
|
||||||
@ -268,7 +278,7 @@ namespace video
|
|||||||
ExposedData.OGLESIPhone.AppDelegate = Device;
|
ExposedData.OGLESIPhone.AppDelegate = Device;
|
||||||
Device->displayInitialize(&ExposedData.OGLESIPhone.Context, &ExposedData.OGLESIPhone.View);
|
Device->displayInitialize(&ExposedData.OGLESIPhone.Context, &ExposedData.OGLESIPhone.View);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
GLint backingWidth;
|
GLint backingWidth;
|
||||||
GLint backingHeight;
|
GLint backingHeight;
|
||||||
glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH, &backingWidth);
|
glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH, &backingWidth);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user