JANITORIAL: Fix code formatting
This commit is contained in:
parent
d69cfbee44
commit
797ca3568d
2 changed files with 13 additions and 13 deletions
|
@ -1116,12 +1116,12 @@ void GrimEngine::mainLoop() {
|
|||
g_imuseState = -1;
|
||||
}
|
||||
|
||||
#if defined(__EMSCRIPTEN__)
|
||||
// If SDL_HINT_EMSCRIPTEN_ASYNCIFY is enabled, SDL pauses the application and gives
|
||||
// back control to the browser automatically by calling emscripten_sleep via SDL_Delay.
|
||||
// Without this the page would completely lock up.
|
||||
#if defined(__EMSCRIPTEN__)
|
||||
// If SDL_HINT_EMSCRIPTEN_ASYNCIFY is enabled, SDL pauses the application and gives
|
||||
// back control to the browser automatically by calling emscripten_sleep via SDL_Delay.
|
||||
// Without this the page would completely lock up.
|
||||
g_system->delayMillis(0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
uint32 endTime = g_system->getMillis();
|
||||
if (startTime > endTime)
|
||||
|
|
|
@ -160,17 +160,17 @@ void FrameBuffer::init() {
|
|||
glBindRenderbuffer(GL_RENDERBUFFER, _renderBuffers[0]);
|
||||
|
||||
const char *glVersion = (const char *)glGetString(GL_VERSION);
|
||||
if (strstr(glVersion,"WebGL 1.0") != NULL) {
|
||||
if (strstr(glVersion, "WebGL 1.0") != NULL) {
|
||||
// See https://www.khronos.org/registry/webgl/specs/latest/1.0/#FBO_ATTACHMENTS
|
||||
// and https://github.com/emscripten-core/emscripten/issues/4832
|
||||
#ifndef GL_DEPTH_STENCIL
|
||||
#define GL_DEPTH_STENCIL 0x84F9
|
||||
#endif
|
||||
#ifndef GL_DEPTH_STENCIL
|
||||
#define GL_DEPTH_STENCIL 0x84F9
|
||||
#endif
|
||||
glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_STENCIL, _texWidth, _texHeight);
|
||||
|
||||
#ifndef GL_DEPTH_STENCIL_ATTACHMENT
|
||||
#define GL_DEPTH_STENCIL_ATTACHMENT 0x821A
|
||||
#endif
|
||||
|
||||
#ifndef GL_DEPTH_STENCIL_ATTACHMENT
|
||||
#define GL_DEPTH_STENCIL_ATTACHMENT 0x821A
|
||||
#endif
|
||||
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, GL_RENDERBUFFER, _renderBuffers[0]);
|
||||
} else {
|
||||
glRenderbufferStorage(GL_RENDERBUFFER, useDepthComponent24() ? GL_DEPTH_COMPONENT24 : GL_DEPTH_COMPONENT16, _texWidth, _texHeight);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue