Skip to content

Commit

Permalink
MEMORY: Trim glpoly_s struct.
Browse files Browse the repository at this point in the history
* drawflat_chain was dead code.
* all chains except next are unused by modern renderer.

Reduces total glpoly_s allocations by 15% if classic renderer is disabled.
  • Loading branch information
dsvensson committed Dec 12, 2024
1 parent 7c92ea9 commit 90b4f11
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gl_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,13 @@ typedef struct vbo_model_vert_s {

typedef struct glpoly_s {
struct glpoly_s *next;
#ifdef RENDERER_OPTION_CLASSIC_OPENGL
struct glpoly_s *chain; //next lightmap poly in chain
struct glpoly_s *fb_chain; //next fb poly in chain
struct glpoly_s *luma_chain; //next luma poly in chain
struct glpoly_s *caustics_chain; //next caustic poly in chain
struct glpoly_s *detail_chain; //next detail poly in chain
struct glpoly_s *drawflat_chain; //next drawflat poly in chain
#endif

unsigned int vbo_start;
int numverts;
Expand Down

0 comments on commit 90b4f11

Please sign in to comment.