Skip to content

Commit

Permalink
fixed makefile for crossplatform
Browse files Browse the repository at this point in the history
  • Loading branch information
ColleagueRiley committed Aug 25, 2023
1 parent a5fe3ad commit e0ccc14
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# RFont
Simple single header modular font rendering librayr
Simple single header modular font rendering lubrary

NOTE:
this project is very WIP and is not useable yet\
Expand Down
9 changes: 9 additions & 0 deletions RFont.h
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,16 @@ void RFont_draw_text_len(RFont_font* font, const char* text, size_t len, i32 x,
}

#if !defined(RFONT_NO_OPENGL) && !defined(RFONT_NO_GRAPHICS)

#ifndef __APPLE__
#include <GL/gl.h>
#else
#include <OpenGL/gl.h>
#endif

#ifndef GL_TEXTURE_SWIZZLE_RGBA
#define GL_TEXTURE_SWIZZLE_RGBA 0x8E46
#endif

u32 RFont_create_atlas(u32 atlasWidth, u32 atlasHeight) {
u32 id = 0;
Expand Down
2 changes: 1 addition & 1 deletion example/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ifeq ($(detected_OS),Darwin) # Mac OS X
LIBS := ./ext/Silicon/*.o -lm -framework Foundation -framework AppKit -framework OpenGL -framework CoreVideo
endif
ifeq ($(detected_OS),Linux)
LIBS := -I./include -lX11 -lGLX -lm
LIBS := -I./include -lX11 -lGLX -lm -lGL
endif

all:
Expand Down

0 comments on commit e0ccc14

Please sign in to comment.