updating to latest VEFontCache... tested 10k draw call target (worked)
This commit is contained in:
39
thirdparty/stb/src/Makefile
vendored
39
thirdparty/stb/src/Makefile
vendored
@ -6,55 +6,22 @@ else
|
||||
all: unix
|
||||
endif
|
||||
|
||||
$(info Current OS is: $(OS))
|
||||
|
||||
wasm:
|
||||
mkdir -p ../lib
|
||||
$(CC) -c -Os --target=wasm32 --sysroot=$(shell odin root)/vendor/libc stb_image.c -o ../lib/stb_image_wasm.o -DSTBI_NO_STDIO
|
||||
$(CC) -c -Os --target=wasm32 --sysroot=$(shell odin root)/vendor/libc stb_image_write.c -o ../lib/stb_image_write_wasm.o -DSTBI_WRITE_NO_STDIO
|
||||
$(CC) -c -Os --target=wasm32 --sysroot=$(shell odin root)/vendor/libc stb_image_resize.c -o ../lib/stb_image_resize_wasm.o
|
||||
$(CC) -c -Os --target=wasm32 --sysroot=$(shell odin root)/vendor/libc stb_truetype.c -o ../lib/stb_truetype_wasm.o
|
||||
# $(CC) -c -Os --target=wasm32 --sysroot=$(shell odin root)/vendor/libc stb_vorbis.c -o ../lib/stb_vorbis_wasm.o -DSTB_VORBIS_NO_STDIO
|
||||
$(CC) -c -Os --target=wasm32 --sysroot=$(shell odin root)/vendor/libc stb_rect_pack.c -o ../lib/stb_rect_pack_wasm.o
|
||||
$(CC) -c -Os --target=wasm32 stb_sprintf.c -o ../lib/stb_sprintf_wasm.o
|
||||
|
||||
unix:
|
||||
mkdir -p ../lib
|
||||
$(CC) -c -O2 -Os -fPIC stb_image.c stb_image_write.c stb_image_resize.c stb_truetype.c stb_rect_pack.c stb_vorbis.c stb_sprintf.c
|
||||
$(AR) rcs ../lib/stb_image.a stb_image.o
|
||||
$(AR) rcs ../lib/stb_image_write.a stb_image_write.o
|
||||
$(AR) rcs ../lib/stb_image_resize.a stb_image_resize.o
|
||||
$(CC) -c -O2 -Os -fPIC stb_truetype.c
|
||||
$(AR) rcs ../lib/stb_truetype.a stb_truetype.o
|
||||
$(AR) rcs ../lib/stb_rect_pack.a stb_rect_pack.o
|
||||
$(AR) rcs ../lib/stb_vorbis.a stb_vorbis.o
|
||||
$(AR) rcs ../lib/stb_sprintf.a stb_sprintf.o
|
||||
#$(CC) -fPIC -shared -Wl,-soname=stb_image.so -o ../lib/stb_image.so stb_image.o
|
||||
#$(CC) -fPIC -shared -Wl,-soname=stb_image_write.so -o ../lib/stb_image_write.so stb_image_write.o
|
||||
#$(CC) -fPIC -shared -Wl,-soname=stb_image_resize.so -o ../lib/stb_image_resize.so stb_image_resize.o
|
||||
#$(CC) -fPIC -shared -Wl,-soname=stb_truetype.so -o ../lib/stb_truetype.so stb_image_truetype.o
|
||||
#$(CC) -fPIC -shared -Wl,-soname=stb_rect_pack.so -o ../lib/stb_rect_pack.so stb_rect_packl.o
|
||||
#$(CC) -fPIC -shared -Wl,-soname=stb_vorbis.so -o ../lib/stb_vorbis.so stb_vorbisl.o
|
||||
rm *.o
|
||||
|
||||
darwin:
|
||||
mkdir -p ../lib
|
||||
$(CC) -arch x86_64 -c -O2 -Os -fPIC stb_image.c -o stb_image-x86_64.o -mmacosx-version-min=10.12
|
||||
$(CC) -arch arm64 -c -O2 -Os -fPIC stb_image.c -o stb_image-arm64.o -mmacosx-version-min=10.12
|
||||
lipo -create stb_image-x86_64.o stb_image-arm64.o -output ../lib/darwin/stb_image.a
|
||||
$(CC) -arch x86_64 -c -O2 -Os -fPIC stb_image_write.c -o stb_image_write-x86_64.o -mmacosx-version-min=10.12
|
||||
$(CC) -arch arm64 -c -O2 -Os -fPIC stb_image_write.c -o stb_image_write-arm64.o -mmacosx-version-min=10.12
|
||||
lipo -create stb_image_write-x86_64.o stb_image_write-arm64.o -output ../lib/darwin/stb_image_write.a
|
||||
$(CC) -arch x86_64 -c -O2 -Os -fPIC stb_image_resize.c -o stb_image_resize-x86_64.o -mmacosx-version-min=10.12
|
||||
$(CC) -arch arm64 -c -O2 -Os -fPIC stb_image_resize.c -o stb_image_resize-arm64.o -mmacosx-version-min=10.12
|
||||
lipo -create stb_image_resize-x86_64.o stb_image_resize-arm64.o -output ../lib/darwin/stb_image_resize.a
|
||||
$(CC) -arch x86_64 -c -O2 -Os -fPIC stb_truetype.c -o stb_truetype-x86_64.o -mmacosx-version-min=10.12
|
||||
$(CC) -arch arm64 -c -O2 -Os -fPIC stb_truetype.c -o stb_truetype-arm64.o -mmacosx-version-min=10.12
|
||||
lipo -create stb_truetype-x86_64.o stb_truetype-arm64.o -output ../lib/darwin/stb_truetype.a
|
||||
$(CC) -arch x86_64 -c -O2 -Os -fPIC stb_rect_pack.c -o stb_rect_pack-x86_64.o -mmacosx-version-min=10.12
|
||||
$(CC) -arch arm64 -c -O2 -Os -fPIC stb_rect_pack.c -o stb_rect_pack-arm64.o -mmacosx-version-min=10.12
|
||||
lipo -create stb_rect_pack-x86_64.o stb_rect_pack-arm64.o -output ../lib/darwin/stb_rect_pack.a
|
||||
$(CC) -arch x86_64 -c -O2 -Os -fPIC stb_vorbis.c -o stb_vorbis-x86_64.o -mmacosx-version-min=10.12
|
||||
$(CC) -arch arm64 -c -O2 -Os -fPIC stb_vorbis.c -o stb_vorbis-arm64.o -mmacosx-version-min=10.12
|
||||
lipo -create stb_vorbis-x86_64.o stb_vorbis-arm64.o -output ../lib/darwin/stb_vorbis.a
|
||||
$(CC) -arch x86_64 -c -O2 -Os -fPIC stb_sprintf.c -o stb_sprintf-x86_64.o -mmacosx-version-min=10.12
|
||||
$(CC) -arch arm64 -c -O2 -Os -fPIC stb_sprintf.c -o stb_sprintf-arm64.o -mmacosx-version-min=10.12
|
||||
lipo -create stb_sprintf-x86_64.o stb_sprintf-arm64.o -output ../lib/darwin/stb_sprintf.a
|
||||
rm *.o
|
||||
|
10824
thirdparty/stb/src/gb/gb.h
vendored
10824
thirdparty/stb/src/gb/gb.h
vendored
File diff suppressed because it is too large
Load Diff
2
thirdparty/stb/src/stb_image.c
vendored
2
thirdparty/stb/src/stb_image.c
vendored
@ -1,2 +0,0 @@
|
||||
#define STB_IMAGE_IMPLEMENTATION
|
||||
#include "stb_image.h"
|
7897
thirdparty/stb/src/stb_image.h
vendored
7897
thirdparty/stb/src/stb_image.h
vendored
File diff suppressed because it is too large
Load Diff
14
thirdparty/stb/src/stb_truetype.h
vendored
14
thirdparty/stb/src/stb_truetype.h
vendored
@ -415,9 +415,9 @@ int main(int arg, char **argv)
|
||||
#pragma region ODIN: CUSTOM ALLOCATOR
|
||||
|
||||
#ifdef STB_TRUETYPE_IMPLEMENTATION
|
||||
#define GB_IMPLEMENTATION
|
||||
#define ZPL_IMPLEMENTATION
|
||||
#endif
|
||||
#include "gb/gb.h"
|
||||
#include "zpl/zpl.h"
|
||||
|
||||
#ifdef STBTT_STATIC
|
||||
#define STBTT_DEF static
|
||||
@ -429,21 +429,21 @@ int main(int arg, char **argv)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
STBTT_DEF void stbtt_SetAllocator( gbAllocator allocator );
|
||||
STBTT_DEF void stbtt_SetAllocator( zpl_allocator allocator );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef STBTT_malloc
|
||||
#define STBTT_malloc(x,u) ((void)(u), gb_alloc(stbtt__allocator, x))
|
||||
#define STBTT_free(x,u) ((void)(u), gb_free(stbtt__allocator, x))
|
||||
#define STBTT_malloc(x,u) ((void)(u), zpl_alloc(stbtt__allocator, x))
|
||||
#define STBTT_free(x,u) ((void)(u), zpl_free(stbtt__allocator, x))
|
||||
#endif
|
||||
|
||||
#ifdef STB_TRUETYPE_IMPLEMENTATION
|
||||
gb_global gbAllocator stbtt__allocator = { gb_heap_allocator_proc, NULL };
|
||||
zpl_global zpl_allocator stbtt__allocator = { zpl_heap_allocator_proc, NULL };
|
||||
|
||||
STBTT_DEF void stbtt_SetAllocator( gbAllocator allocator ) {
|
||||
STBTT_DEF void stbtt_SetAllocator( zpl_allocator allocator ) {
|
||||
stbtt__allocator = allocator;
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user