From 7936a1fcacbdbdf6bc04958a2b63c3225f3dc955 Mon Sep 17 00:00:00 2001
From: Hayden Kowalchuk <hayden@hkowsoftware.com>
Date: Wed, 3 Jul 2019 13:08:07 -0400
Subject: [PATCH] feat: minor change

---
 GL/draw.c | 21 ++++++++++-----------
 Makefile  |  7 ++++---
 2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/GL/draw.c b/GL/draw.c
index cbe6338..f9c5de9 100644
--- a/GL/draw.c
+++ b/GL/draw.c
@@ -628,10 +628,10 @@ static inline void _readUVData(const GLuint first, const GLuint count, Vertex* o
 }
 
 static inline void _readSTData(const GLuint first, const GLuint count, VertexExtra* extra) {
-    if((ENABLED_VERTEX_ATTRIBUTES & ST_ENABLED_FLAG) != ST_ENABLED_FLAG) {
+    /*if((ENABLED_VERTEX_ATTRIBUTES & ST_ENABLED_FLAG) != ST_ENABLED_FLAG) {
         _fillZero2fVE(count, extra->st);
         return;
-    }
+    }*/
 
     const GLubyte ststride = (ST_POINTER.stride) ? ST_POINTER.stride : ST_POINTER.size * byte_size(ST_POINTER.type);
     const void* stptr = ((GLubyte*) ST_POINTER.ptr + (first * ststride));
@@ -1057,9 +1057,9 @@ static void submitVertices(GLenum mode, GLsizei first, GLuint count, GLenum type
     //glActiveTextureARB(GL_TEXTURE0);
     //glGetBooleanv(GL_TEXTURE_2D, &doTexture);
 
-    doMultitexture = _GetBooleanTextureEnabled(GL_TEXTURE1);
-    //glActiveTextureARB(GL_TEXTURE1);
-    //glGetBooleanv(GL_TEXTURE_2D, &doMultitexture);
+    //doMultitexture = _GetBooleanTextureEnabled(GL_TEXTURE1);
+    glActiveTextureARB(GL_TEXTURE1);
+    glGetBooleanv(GL_TEXTURE_2D, &doMultitexture);
 
     doLighting = _glIsLightingEnabled();
 
@@ -1177,7 +1177,6 @@ static void submitVertices(GLenum mode, GLsizei first, GLuint count, GLenum type
     }
 
     TextureObject* texture1 = _glGetTexture1();
-
     /* Multitexture implicitly disabled */
     if(!texture1 || ((ENABLED_VERTEX_ATTRIBUTES & ST_ENABLED_FLAG) != ST_ENABLED_FLAG)) {
         /* Multitexture actively disabled */
@@ -1215,12 +1214,12 @@ static void submitVertices(GLenum mode, GLsizei first, GLuint count, GLenum type
     GLboolean blendEnabled = glIsEnabled(GL_BLEND);
     GLboolean depthEnabled = glIsEnabled(GL_DEPTH_TEST);
 
-    glDepthFunc(GL_EQUAL);
-    glEnable(GL_BLEND);
+    //glDepthFunc(GL_EQUAL);
+    //glEnable(GL_BLEND);
+    
+    /* This is modulation, we need to switch depending on the texture env mode! */
+    //glBlendFunc(GL_DST_COLOR, GL_ZERO);
     
-        /* This is modulation, we need to switch depending on the texture env mode! */
-    glBlendFunc(GL_DST_COLOR, GL_ZERO);
-
     /* Send the buffer again to the transparent list */
     push(mtHeader, mtStart, target->count, _glTransparentPolyList(), 1);
 
diff --git a/Makefile b/Makefile
index cc4ae95..fc8b0b0 100644
--- a/Makefile
+++ b/Makefile
@@ -7,13 +7,14 @@
 
 TARGET = libGLdc.a
 OBJS = GL/gldc.o
-#OBJS = GL/draw.o GL/flush.o GL/framebuffer.o GL/immediate.o GL/lighting.o GL/state.o GL/texture.o GL/glu.o
-#OBJS += GL/matrix.o GL/fog.o GL/error.o GL/clip.o containers/stack.o containers/named_array.o containers/aligned_vector.o GL/profiler.o
+//OBJS = GL/draw.o GL/flush.o GL/framebuffer.o GL/immediate.o GL/lighting.o GL/state.o GL/texture.o GL/glu.o
+//OBJS += GL/matrix.o GL/fog.o GL/error.o GL/clip.o containers/stack.o containers/named_array.o containers/aligned_vector.o GL/profiler.o
 OBJS += containers/stack.o containers/named_array.o containers/aligned_vector.o GL/profiler.o
 
 SUBDIRS =
 
-KOS_CFLAGS += -ffast-math -O3 -funroll-loops -Iinclude
+KOS_CFLAGS += -ffast-math -Os -Iinclude -funsafe-math-optimizations -fno-expensive-optimizations
+GCC_FLAGS = -mlra
 
 link:
 	$(KOS_AR) rcs $(TARGET) $(OBJS)