From b8f9392efd43b6105716834812ec1b09f78924b7 Mon Sep 17 00:00:00 2001 From: Alug Date: Tue, 18 Nov 2025 19:00:59 +0100 Subject: [PATCH 1/7] delet I_UpdateNoBlit this didnt do anything anymore --- src/android/i_video.c | 5 ++--- src/d_main.c | 4 ---- src/dedicated/i_video.c | 7 ------- src/f_wipe.c | 1 - src/i_video.h | 4 ---- src/m_menu.c | 1 - src/sdl/i_system.cpp | 14 ++++++++++---- src/sdl/i_video.c | 28 ---------------------------- 8 files changed, 12 insertions(+), 52 deletions(-) diff --git a/src/android/i_video.c b/src/android/i_video.c index f3054038e..ed593e5aa 100644 --- a/src/android/i_video.c +++ b/src/android/i_video.c @@ -50,9 +50,8 @@ const char *VID_GetModeName(INT32 modenum) return "A320x240"; } -void I_UpdateNoBlit(void){} - -void I_FinishUpdate(void) { +void I_FinishUpdate(void) +{ LOGD("FRAME!"); (*jni_env)->CallVoidMethod(jni_env, androidVideo, videoFrameCB); } diff --git a/src/d_main.c b/src/d_main.c index ba34eb66e..c5eaf719c 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -407,10 +407,6 @@ static boolean D_Display(void) R_ExecuteSetViewSize(); forcerefresh = true; // force background redraw } - - // draw buffered stuff to screen - // Used only by linux GGI version - I_UpdateNoBlit(); } // save the current screen if about to wipe diff --git a/src/dedicated/i_video.c b/src/dedicated/i_video.c index 8227233a8..1d784d601 100644 --- a/src/dedicated/i_video.c +++ b/src/dedicated/i_video.c @@ -65,13 +65,6 @@ void I_OsPolling(void) I_GetConsoleEvents(); } -// -// I_UpdateNoBlit -// -void I_UpdateNoBlit(void) -{ -} - // // I_FinishUpdate // diff --git a/src/f_wipe.c b/src/f_wipe.c index 2ce95751d..6615cb53c 100644 --- a/src/f_wipe.c +++ b/src/f_wipe.c @@ -384,7 +384,6 @@ void F_RunWipe(UINT8 wipetype, boolean drawMenu) F_DoWipe(fmask); I_OsPolling(); - I_UpdateNoBlit(); if (rendermode != render_none && drawMenu) { diff --git a/src/i_video.h b/src/i_video.h index ad29983fa..3f048de8b 100644 --- a/src/i_video.h +++ b/src/i_video.h @@ -101,10 +101,6 @@ void VID_PrepareModeList(void); */ extern boolean allow_fullscreen; -/** \brief Update video system without updating frame -*/ -void I_UpdateNoBlit(void); - /** \brief Update video system with updating frame */ void I_FinishUpdate(void); diff --git a/src/m_menu.c b/src/m_menu.c index caa7dfd0f..5892050ac 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -7528,7 +7528,6 @@ static void M_ConnectIP(INT32 choice) M_DrawTextBox(56, BASEVIDHEIGHT/2-12, 24, 2); V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT/2, 0, "Connecting to server..."); I_OsPolling(); - I_UpdateNoBlit(); if (rendermode == render_soft) I_FinishUpdate(); // page flip or blit buffer } diff --git a/src/sdl/i_system.cpp b/src/sdl/i_system.cpp index 96c22061f..aa8a32866 100644 --- a/src/sdl/i_system.cpp +++ b/src/sdl/i_system.cpp @@ -283,7 +283,7 @@ static void I_ShutdownConsole(void) { I_OutputMsg("Shutdown tty console\n"); consolevent = SDL_FALSE; - tcsetattr (STDIN_FILENO, TCSADRAIN, &tty_tc); + tcsetattr(STDIN_FILENO, TCSADRAIN, &tty_tc); } } @@ -303,7 +303,8 @@ static void I_StartupConsole(void) if (framebuffer) consolevent = SDL_FALSE; - if (!consolevent) return; + if (!consolevent) + return; if (isatty(STDIN_FILENO)!=1) { @@ -311,6 +312,7 @@ static void I_StartupConsole(void) consolevent = SDL_FALSE; return; } + memset(&tty_con, 0x00, sizeof(tty_con)); tcgetattr (0, &tty_tc); tty_erase = tty_tc.c_cc[VERASE]; @@ -372,6 +374,7 @@ void I_GetConsoleEvents(void) tty_con.buffer[tty_con.cursor] = '\0'; tty_Back(); } + ev.data1 = KEY_BACKSPACE; } else if (key < ' ') // check if this is a control char @@ -387,7 +390,8 @@ void I_GetConsoleEvents(void) // shut down, most unix programs behave this way I_Quit(); } - else continue; + else + continue; } else if (tty_con.cursor < sizeof(tty_con.buffer)) { @@ -397,7 +401,9 @@ void I_GetConsoleEvents(void) // print the current line (this is differential) write(STDOUT_FILENO, &key, 1); } - if (ev.data1) D_PostEvent(&ev); + + if (ev.data1) + D_PostEvent(&ev); //tty_FlushIn(); } } diff --git a/src/sdl/i_video.c b/src/sdl/i_video.c index 3b3c6b79f..6d57e5bec 100644 --- a/src/sdl/i_video.c +++ b/src/sdl/i_video.c @@ -151,7 +151,6 @@ static UINT32 localPalette[256]; Uint16 realwidth = BASEVIDWIDTH; Uint16 realheight = BASEVIDHEIGHT; #define HalfWarpMouse(x,y) if (wrapmouseok) SDL_WarpMouseInWindow(window, (Uint16)(x/2),(Uint16)(y/2)) -static SDL_bool exposevideo = SDL_FALSE; static SDL_bool usesdl2soft = SDL_FALSE; static SDL_bool borderlesswindow = SDL_FALSE; @@ -1395,31 +1394,6 @@ static void SDLSetMode(INT32 width, INT32 height, SDL_bool fullscreen) } } -// -// I_UpdateNoBlit -// -void I_UpdateNoBlit(void) -{ - if (rendermode == render_none) - return; - - if (exposevideo) - { -#ifdef HWRENDER - if (rendermode == render_opengl) - { - OglSdlFinishUpdate(cv_vidwait.value); - return; - } - -#endif - SDL_RenderCopy(renderer, texture, NULL, NULL); - SDL_RenderPresent(renderer); - } - - exposevideo = SDL_FALSE; -} - // // I_FinishUpdate // @@ -1479,8 +1453,6 @@ void I_FinishUpdate(void) SDL_RenderCopy(renderer, texture, &src_rect, NULL); SDL_RenderPresent(renderer); } - - exposevideo = SDL_FALSE; } // From 2ee8dc09d19c673858216c9f1e650f305b28b84b Mon Sep 17 00:00:00 2001 From: Alug Date: Tue, 18 Nov 2025 21:52:42 +0100 Subject: [PATCH 2/7] fix opengl portals (and its contents) being culled in some cases they shouldnt be we do culling per our viewmatrix since a while, which wasnt properly set up for portals beforehand and used whatever was last which was then incorrectly applied to portal culling :chaobaba: --- src/hardware/hw_main.cpp | 12 ++++++++---- src/hardware/hw_portal.c | 6 +++--- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/hardware/hw_main.cpp b/src/hardware/hw_main.cpp index 498c7042a..680d1ac85 100644 --- a/src/hardware/hw_main.cpp +++ b/src/hardware/hw_main.cpp @@ -5435,10 +5435,14 @@ void HWR_RenderViewpoint(gl_portal_t *rootportal, player_t *player, int stencil_ currentportallist = &portallist; HWR_SetPortalState(GLPORTAL_SEARCH); - HWR_ClearClipper(); + HWR_SetTransform(fpov); + HWR_ClearSprites(); + HWR_ClearClipper(); if (rootportal) + { HWR_PortalClipping(rootportal); + } validcount++; @@ -5456,14 +5460,14 @@ void HWR_RenderViewpoint(gl_portal_t *rootportal, player_t *player, int stencil_ } } - // draw normal things in current frame in current incremented stencil buffer area - HWR_SetStencilState(HWR_STENCIL_NORMAL, stencil_level); - HWR_SetTransform(fpov); HWR_ClearSprites(); HWR_ClearClipper(); + // draw normal things in current frame in current incremented stencil buffer area + HWR_SetStencilState(HWR_STENCIL_NORMAL, stencil_level); + if constexpr (Type == RenderViewpointType::kPortal) { if (allow_portals && rootportal) diff --git a/src/hardware/hw_portal.c b/src/hardware/hw_portal.c index d8ad87354..952bd0e66 100644 --- a/src/hardware/hw_portal.c +++ b/src/hardware/hw_portal.c @@ -38,7 +38,7 @@ void HWR_PortalClipping(gl_portal_t *portal) gld_clipper_SafeAddClipRange(portal->angle1, portal->angle2); } -static gl_portal_t* HWR_Portal_Add (seg_t *seg) +static gl_portal_t* HWR_Portal_Add(seg_t *seg) { gl_portal_t *portal = Z_Malloc(sizeof(gl_portal_t), PU_STATIC, NULL); @@ -120,8 +120,8 @@ void HWR_PortalFrame(gl_portal_t* portal) viewz = portal->viewz; viewangle = portal->viewangle; - //viewsin = FINESINE(viewangle>>ANGLETOFINESHIFT); - //viewcos = FINECOSINE(viewangle>>ANGLETOFINESHIFT); + viewsin = FINESINE(viewangle>>ANGLETOFINESHIFT); + viewcos = FINECOSINE(viewangle>>ANGLETOFINESHIFT); if (portal->clipline != -1) { From 92df8ffe01ed9a318b51f8a0e0721b5dda073b9b Mon Sep 17 00:00:00 2001 From: Alug Date: Tue, 18 Nov 2025 22:36:09 +0100 Subject: [PATCH 3/7] remove thread.h include, use "thread_local" for everything we enforce c++ 17, thread_local is a c++11 extension, so this should work everywhere --- src/r_draw_span.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/r_draw_span.cpp b/src/r_draw_span.cpp index e5ee15463..ca41b17c8 100644 --- a/src/r_draw_span.cpp +++ b/src/r_draw_span.cpp @@ -14,13 +14,7 @@ /// \note no includes because this is included as part of r_draw.cpp #ifdef HAVE_THREADS -#ifdef _WIN32 -#include -#define local_for_thread static __thread -#else -#include -#define local_for_thread thread_local static -#endif +#define local_for_thread static thread_local #else #define local_for_thread static #endif From 5dda681c8a244a59bd435127d8d48883296fa796 Mon Sep 17 00:00:00 2001 From: Alug Date: Wed, 19 Nov 2025 00:25:53 +0100 Subject: [PATCH 4/7] clean up some more render float maths - dont use M_PIl in double or float maths - dont use M_PI in float maths (use M_PIf) - use tanf instead of tan --- src/doomdef.h | 6 +++++- src/hardware/hw_clip.c | 6 +++--- src/hardware/hw_main.cpp | 5 +++-- src/hardware/r_opengl/r_opengl.c | 6 ++++-- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/doomdef.h b/src/doomdef.h index 87a7d936d..1a4daf21d 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -477,7 +477,7 @@ extern INT32 cv_debug; // Misc stuff for later... // ======================= -#define ANG2RAD(angle) ((float)((angle)*M_PI)/ANGLE_180) +#define ANG2RAD(angle) ((float)((angle)*M_PIf) / (float)ANGLE_180) // Modifier key variables, accessible anywhere extern UINT8 shiftdown, ctrldown, altdown; @@ -526,6 +526,10 @@ UINT32 quickncasehash (const char *p, size_t n) #define M_PIl 3.1415926535897932384626433832795029L #endif +#ifndef M_PIf +#define M_PIf 3.14159265f +#endif + // Floating point comparison epsilons from float.h #ifndef FLT_EPSILON #define FLT_EPSILON 1.1920928955078125e-7f diff --git a/src/hardware/hw_clip.c b/src/hardware/hw_clip.c index 624dc4234..3365136b3 100644 --- a/src/hardware/hw_clip.c +++ b/src/hardware/hw_clip.c @@ -177,7 +177,7 @@ static void gld_clipper_RemoveRange(clipnode_t *range) void gld_clipper_SafeAddClipRange(angle_t startangle, angle_t endangle) { - if(startangle > endangle) + if (startangle > endangle) { // The range has to added in two parts. gld_clipper_AddClipRange(startangle, ANGLE_MAX); @@ -319,7 +319,7 @@ angle_t gld_FrustumAngle(angle_t tiltangle) double floatangle; angle_t a1; - float tilt = (float)fabs(((double)(int)tiltangle) / ANG1); + float tilt = fabsf(((float)(int)tiltangle) / (float)ANG1); if (tilt > 90.0f) tilt = 90.0f; @@ -330,7 +330,7 @@ angle_t gld_FrustumAngle(angle_t tiltangle) // ok, this is a gross hack that barely works... // but at least it doesn't overestimate too much... - clipfov = atan(1 / (GLdouble)projMatrix[0]) * 360.0 / M_PIl; + clipfov = atan(1 / (GLdouble)projMatrix[0]) * 360.0 / M_PI; floatangle = 2.0 + (45.0 + ((double)tilt / 1.9)) * clipfov / 90.0; if (floatangle >= 180.0) return 0xffffffff; diff --git a/src/hardware/hw_main.cpp b/src/hardware/hw_main.cpp index 680d1ac85..7cc4cbdfc 100644 --- a/src/hardware/hw_main.cpp +++ b/src/hardware/hw_main.cpp @@ -260,7 +260,8 @@ static void CV_screentextures_OnChange(void) static void CV_glframebuffer_OnChange(void) { ONLY_IF_GL_LOADED - if ((cv_glframebuffer.value != 0 && cv_glscreentextures.value != 2) || (!supportFBO && cv_glframebuffer.value != 0)) // screen FBO needs screen textures + if ((cv_glframebuffer.value != 0 && cv_glscreentextures.value != 2) + || (!supportFBO && cv_glframebuffer.value != 0)) // screen FBO needs screen textures CV_SetValue(&cv_glframebuffer, 0); I_DownSample(); @@ -5113,7 +5114,7 @@ static gl_sky_t gl_sky; static void HWR_SkyDomeVertex(gl_sky_t *sky, gl_skyvertex_t *vbo, int r, int c, signed char yflip, float delta, boolean foglayer) { - static constexpr float radians = (float)(M_PIl / 180.0f); + static constexpr float radians = (M_PIf / 180.0f); static constexpr float scale = 10000.0f; static constexpr float maxSideAngle = 60.0f * radians; diff --git a/src/hardware/r_opengl/r_opengl.c b/src/hardware/r_opengl/r_opengl.c index 024dd2629..30eff78ac 100644 --- a/src/hardware/r_opengl/r_opengl.c +++ b/src/hardware/r_opengl/r_opengl.c @@ -1145,7 +1145,7 @@ static void GL_Perspective(GLfloat fovy, GLfloat aspect) return; } - const GLfloat focallength = (GLfloat)(1.0f / (GLfloat)tan(fovy * (GLfloat)M_PIl / 360.0f)); + const GLfloat focallength = (1.0f / tanf(fovy * M_PIf / 360.0f)); m[0][0] = focallength / aspect; m[1][1] = focallength; @@ -3196,11 +3196,13 @@ void GL_SetTransform(FTransform *stransform) if (special_splitscreen) { - used_fov = (atanf(tanf(used_fov * (float)M_PI / 360.0f) * 0.8f) * 360.0f / (float)M_PI); + used_fov = (atanf(tanf(used_fov * M_PIf / 360.0f) * 0.8f) * 360.0f / M_PIf); GL_Perspective(used_fov, 2*ASPECT_RATIO); } else + { GL_Perspective(used_fov, ASPECT_RATIO); + } pglGetFloatv(GL_PROJECTION_MATRIX, projMatrix); // added for new coronas' code (without depth buffer) pglMatrixMode(GL_MODELVIEW); From ad828b8f4b4879d2fb74230d3b1a1a13e02618e0 Mon Sep 17 00:00:00 2001 From: Alug Date: Tue, 18 Nov 2025 23:27:07 +0100 Subject: [PATCH 5/7] reduce scope of some fps counter vars --- src/screen.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/screen.c b/src/screen.c index f588d0e38..b292c646d 100644 --- a/src/screen.c +++ b/src/screen.c @@ -343,8 +343,6 @@ boolean SCR_IsAspectCorrect(INT32 width, INT32 height) return (width % BASEVIDWIDTH == 0 && height % BASEVIDHEIGHT == 0 && width / BASEVIDWIDTH == height / BASEVIDHEIGHT); } -double averageFPS = 0.0f; - #define USE_FPS_SAMPLES #ifdef USE_FPS_SAMPLES @@ -352,16 +350,16 @@ double averageFPS = 0.0f; #define NUM_FPS_SAMPLES (32) // Number of samples to store static double total_frame_time = 0.0; -static int frame_index; - static double fps_samples[NUM_FPS_SAMPLES]; #endif -static boolean fps_init = false; -static precise_t fps_enter = 0; +static double averageFPS = 0.0f; void SCR_CalculateFPS(void) { + static boolean fps_init = false; + static int frame_index = 0; + static precise_t fps_enter = 0; precise_t fps_finish = 0; double frameElapsed = 0.0; From 86c1b2cbefc392c23c70ac928519bbbdf718f3c3 Mon Sep 17 00:00:00 2001 From: Alug Date: Wed, 19 Nov 2025 02:15:37 +0100 Subject: [PATCH 6/7] simplify the vector buffer stuff honestly doesent make that much sense in most cases to grow capacity * 2 (slightly misunderstood some stuff on implementation) and in other cases dont need to manually check for resize --- src/r_draw_span.cpp | 6 +----- src/r_patch.cpp | 10 ++-------- src/r_patchrotation.cpp | 7 ++----- 3 files changed, 5 insertions(+), 18 deletions(-) diff --git a/src/r_draw_span.cpp b/src/r_draw_span.cpp index ca41b17c8..806cee954 100644 --- a/src/r_draw_span.cpp +++ b/src/r_draw_span.cpp @@ -215,11 +215,7 @@ static void R_GetTiltedLighting(std::vector& tiltlighting, const drawspan const float planelightfloat = PLANELIGHTFLOAT; const fixed_t lightstart = FloatToFixed(iz * planelightfloat); const fixed_t lightend = FloatToFixed((iz + ds->szp.x * width) * planelightfloat); - - if (tiltlighting.size() != (size_t)viewwidth) - { - tiltlighting.resize(viewwidth); - } + tiltlighting.resize((size_t)viewwidth); R_CalcTiltedLighting(tiltlighting, ds->x1, ds->x2, lightstart, lightend); //CONS_Printf("tilted lighting %f to %f (foc %f)\n", FixedToFloat(lightstart), FixedToFloat(lightend), focallengthf); diff --git a/src/r_patch.cpp b/src/r_patch.cpp index 515f5ea38..60d4acb98 100644 --- a/src/r_patch.cpp +++ b/src/r_patch.cpp @@ -487,11 +487,8 @@ void *R_PixelsToPatch(UINT8 *raw, INT16 width, INT16 height, INT16 leftoffset, I size_t maxoutsize = maxcolumnsize * width + (8 + 4 * width); // so, a 512x512 flat should maximally need 393,760 (384.53 KiB) bytes. // quite a bit smaller than 64 megabytes, and much less annoying to the windows debug allocator! - while (imgbuf.size() < maxoutsize) - { - imgbuf.resize(imgbuf.size() * 2); - } + imgbuf.resize(maxoutsize); imgptr = imgbuf.data(); // Write image size and offset @@ -621,11 +618,8 @@ void *R_MaskedFlatToPatch(UINT16 *raw, INT16 width, INT16 height, INT16 leftoffs size_t maxoutsize = maxcolumnsize * width + (8 + 4 * width); // so, a 512x512 flat should maximally need 393,760 (384.53 KiB) bytes. // quite a bit smaller than 64 megabytes, and much less annoying to the windows debug allocator! - while (imgbuf.size() < maxoutsize) - { - imgbuf.resize(imgbuf.size() * 2); - } + imgbuf.resize(maxoutsize); imgptr = imgbuf.data(); // Write image size and offset diff --git a/src/r_patchrotation.cpp b/src/r_patchrotation.cpp index 485a8b9f1..9fdda001b 100644 --- a/src/r_patchrotation.cpp +++ b/src/r_patchrotation.cpp @@ -128,7 +128,7 @@ void RotatedPatch_DoRotation(rotsprite_t *rotsprite, patch_t *patch, INT32 angle UINT32 i; patch_t *rotated; - static std::vector rawdst(1024 * 1024), rawconv(1024 * 1024); // 1 MB should be enough for most cases + static std::vector rawdst(512 * 1024), rawconv(512 * 1024); // 1 MB should be enough for most cases UINT16 *rawout; size_t size; @@ -185,10 +185,7 @@ void RotatedPatch_DoRotation(rotsprite_t *rotsprite, patch_t *patch, INT32 angle if (!size) size = (width * height); - while (rawdst.size() < size) - { - rawdst.resize(rawdst.size() * 2); - } + rawdst.resize(size); for (i = 0; i < size; i++) rawdst[i] = 0xFF00; From b5c1f21ac1f132b925ed2f6b302729f9fe4506b1 Mon Sep 17 00:00:00 2001 From: Alug Date: Wed, 19 Nov 2025 18:06:39 +0100 Subject: [PATCH 7/7] mark all batching variables with static they are only used within this file, no need to advertise them as global --- src/hardware/hw_batching.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/hardware/hw_batching.c b/src/hardware/hw_batching.c index 3e0c2320b..5ee94fe41 100644 --- a/src/hardware/hw_batching.c +++ b/src/hardware/hw_batching.c @@ -21,28 +21,28 @@ // The texture for the next polygon given to HWR_ProcessPolygon. // Set with HWR_SetCurrentTexture. -GLMipmap_t *current_texture = NULL; +static GLMipmap_t *current_texture = NULL; -boolean currently_batching = false; +static boolean currently_batching = false; -FOutVector* finalVertexArray = NULL;// contains subset of sorted vertices and texture coordinates to be sent to gpu -UINT32* finalVertexIndexArray = NULL;// contains indexes for glDrawElements, taking into account fan->triangles conversion +static FOutVector* finalVertexArray = NULL;// contains subset of sorted vertices and texture coordinates to be sent to gpu +static UINT32* finalVertexIndexArray = NULL;// contains indexes for glDrawElements, taking into account fan->triangles conversion // NOTE have this alloced as 3x finalVertexArray size -int finalVertexArrayAllocSize = 65536; +static int finalVertexArrayAllocSize = 65536; //GLubyte* colorArray = NULL;// contains color data to be sent to gpu, if needed //int colorArrayAllocSize = 65536; // not gonna use this for now, just sort by color and change state when it changes // later maybe when using vertex attributes if it's needed -PolygonArrayEntry* polygonArray = NULL ;// contains the polygon data from DrawPolygon, waiting to be processed -PolygonArrayEntry **polygonArraySorted = NULL; // contains sorted pointers to polygonArray -int polygonArraySize = 0; -int polygonArrayAllocSize = 65536; +static PolygonArrayEntry* polygonArray = NULL ;// contains the polygon data from DrawPolygon, waiting to be processed +static PolygonArrayEntry **polygonArraySorted = NULL; // contains sorted pointers to polygonArray +static int polygonArraySize = 0; +static int polygonArrayAllocSize = 65536; -FOutVector* unsortedVertexArray = NULL; // contains unsorted vertices and texture coordinates from DrawPolygon -int unsortedVertexArraySize = 0; -int unsortedVertexArrayAllocSize = 65536; +static FOutVector* unsortedVertexArray = NULL; // contains unsorted vertices and texture coordinates from DrawPolygon +static int unsortedVertexArraySize = 0; +static int unsortedVertexArrayAllocSize = 65536; // Enables batching mode. HWR_ProcessPolygon will collect polygons instead of passing them directly to the rendering backend. // Call HWR_RenderBatches to render all the collected geometry. @@ -260,7 +260,7 @@ void HWR_RenderBatches(void) nextSurfaceInfo.LightInfo.light_level = 0; nextSurfaceInfo.LightInfo.directional = false; - currently_batching = false;// no longer collecting batches + currently_batching = false; // no longer collecting batches if (!polygonArraySize) {