Skip to content

Commit 1edefd5

Browse files
committed
ecere/gfx/drivers/GL/GLAB: Avoid expensive call to glCheckFramebufferStatus() for WebGL
- ecere.epj: Disable _DEBUG flag for Emscripten
1 parent 4abfbe4 commit 1edefd5

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

ecere/ecere.epj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,6 @@
478478
"Name" : "Emscripten",
479479
"Options" : {
480480
"Warnings" : "Normal",
481-
"Debug" : true,
482481
"Optimization" : "Speed",
483482
"PreprocessorDefinitions" : [
484483
"ETC2_COMPRESS",

ecere/src/gfx/drivers/gl3/glab.ec

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -925,8 +925,13 @@ public struct GLFB
925925
this.h = height;
926926

927927
{
928+
#if !defined(_DEBUG) && defined(__EMSCRIPTEN__)
929+
// Expensive check in WebGL?
930+
result = true;
931+
#else
928932
int status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
929933
result = status == GL_FRAMEBUFFER_COMPLETE;
934+
#endif
930935

931936
#ifdef _DEBUG
932937
if(!result)

0 commit comments

Comments
 (0)