mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-02-03 12:31:15 +00:00
Update renderer.cpp
This commit is contained in:
parent
1d72239f6f
commit
b461e7a2d2
@ -77,7 +77,7 @@ Direct3DRMRenderer* OpenGLES2Renderer::Create(DWORD width, DWORD height)
|
|||||||
GLuint depthRb;
|
GLuint depthRb;
|
||||||
glGenRenderbuffers(1, &depthRb);
|
glGenRenderbuffers(1, &depthRb);
|
||||||
glBindRenderbuffer(GL_RENDERBUFFER, depthRb);
|
glBindRenderbuffer(GL_RENDERBUFFER, depthRb);
|
||||||
const char* extensions = (const char*)glGetString(GL_EXTENSIONS);
|
const char* extensions = (const char*) glGetString(GL_EXTENSIONS);
|
||||||
if (strstr(extensions, "GL_OES_depth24")) {
|
if (strstr(extensions, "GL_OES_depth24")) {
|
||||||
glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT24_OES, width, height);
|
glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT24_OES, width, height);
|
||||||
}
|
}
|
||||||
@ -464,7 +464,7 @@ void OpenGLES2Renderer::GetDesc(D3DDEVICEDESC* halDesc, D3DDEVICEDESC* helDesc)
|
|||||||
halDesc->dcmColorModel = D3DCOLORMODEL::RGB;
|
halDesc->dcmColorModel = D3DCOLORMODEL::RGB;
|
||||||
halDesc->dwFlags = D3DDD_DEVICEZBUFFERBITDEPTH;
|
halDesc->dwFlags = D3DDD_DEVICEZBUFFERBITDEPTH;
|
||||||
halDesc->dwDeviceZBufferBitDepth = DDBD_16;
|
halDesc->dwDeviceZBufferBitDepth = DDBD_16;
|
||||||
const char* extensions = (const char*)glGetString(GL_EXTENSIONS);
|
const char* extensions = (const char*) glGetString(GL_EXTENSIONS);
|
||||||
if (strstr(extensions, "GL_OES_depth24")) {
|
if (strstr(extensions, "GL_OES_depth24")) {
|
||||||
halDesc->dwDeviceZBufferBitDepth |= DDBD_24;
|
halDesc->dwDeviceZBufferBitDepth |= DDBD_24;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user