From feaecc7fb137232a85165b47f00c3b2e6a6ed2ef Mon Sep 17 00:00:00 2001 From: Hayden Kowalchuk Date: Sun, 29 Sep 2019 11:09:27 -0400 Subject: [PATCH] fix: add sqpcpy memcpy --- GL/private.h | 3 +++ Makefile | 11 +++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/GL/private.h b/GL/private.h index 8539ab5..4cd2acb 100644 --- a/GL/private.h +++ b/GL/private.h @@ -10,6 +10,9 @@ #define TRACE_ENABLED 0 #define TRACE() if(TRACE_ENABLED) {fprintf(stderr, "%s\n", __func__);} +#define FASTCPY(dst, src, bytes) \ + (bytes % 32 == 0) ? sq_cpy(dst, src, bytes) : memcpy(dst, src, bytes); + #define VERTEX_ENABLED_FLAG (1 << 0) #define UV_ENABLED_FLAG (1 << 1) #define ST_ENABLED_FLAG (1 << 2) diff --git a/Makefile b/Makefile index f4d33b5..61b2478 100644 --- a/Makefile +++ b/Makefile @@ -6,9 +6,9 @@ # Copyright (C) 2018 Luke Benstead 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/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 += containers/stack.o containers/named_array.o containers/aligned_vector.o GL/profiler.o SUBDIRS = @@ -50,4 +50,7 @@ offset: $(KOS_MAKE) -C samples/polygon_offset nehe07: - $(KOS_MAKE) -C samples/nehe07 dist \ No newline at end of file + $(KOS_MAKE) -C samples/nehe07 dist + +mipmap: + $(KOS_MAKE) -C samples/mipmap dist \ No newline at end of file