Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ typedef struct {
void *address;
} ProcMap;

int _ogx_functions_c = 0; /* referenced by gc_gl.c, see the comment in there */

#define PROC(name) { #name, name }
static const ProcMap s_proc_map[] = {
//PROC(glAccum),
Expand Down
7 changes: 7 additions & 0 deletions src/gc_gl.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,13 @@ typedef struct
char _ogx_log_level = 0;
static GXTexObj s_zbuffer_texture;
static uint8_t s_zbuffer_texels[2 * 32] ATTRIBUTE_ALIGN(32);
/* Force the inclusion of functions.c's TU in the build when GL functions are
* used. In this way, if a client library (such as SDL) defines weak symbols
* for the opengx functions it uses, a client application which actually uses
* opengx will link and use its real implementation; at the same time, a client
* which does not use OpenGL is not forced to link with opengx. */
extern int _ogx_functions_c;
void *_ogx_force_proctable = &_ogx_functions_c;

static void draw_arrays_general(DrawMode gxmode, int first, int count, int ne,
int color_provide, int texen);
Expand Down