diff options
| author | Ray <raysan5@gmail.com> | 2016-06-07 23:44:53 +0200 |
|---|---|---|
| committer | Ray <raysan5@gmail.com> | 2016-06-07 23:44:53 +0200 |
| commit | ee795150fa21f239533d4c9ffadf56366c89a8ca (patch) | |
| tree | 2879d0b48e5a125bd3f204382225111c1d4de2e9 /src | |
| parent | 5631f822bd9195d494915d3b2bb80caf47a65068 (diff) | |
| download | raylib-ee795150fa21f239533d4c9ffadf56366c89a8ca.tar.gz raylib-ee795150fa21f239533d4c9ffadf56366c89a8ca.zip | |
Updated some code
Diffstat (limited to 'src')
| -rw-r--r-- | src/rlgl.c | 16 | ||||
| -rw-r--r-- | src/rlgl.h | 5 |
2 files changed, 13 insertions, 8 deletions
@@ -48,8 +48,13 @@ #ifdef __APPLE__ #include <OpenGL/gl3.h> // OpenGL 3 library for OSX #else - #define GLAD_IMPLEMENTATION - #include "external/glad.h" // GLAD extensions loading library, includes OpenGL headers + #define GLAD_IMPLEMENTATION +#if defined(RLGL_STANDALONE) + #include "glad.h" // GLAD extensions loading library, includes OpenGL headers +#else + #include "external/glad.h" // GLAD extensions loading library, includes OpenGL headers +#endif + #endif #endif @@ -159,10 +164,6 @@ typedef struct { // TODO: Store draw state -> blending mode, shader } DrawCall; -#if defined(RLGL_STANDALONE) -typedef enum { INFO = 0, ERROR, WARNING, DEBUG, OTHER } TraceLogType; -#endif - //---------------------------------------------------------------------------------- // Global Variables Definition //---------------------------------------------------------------------------------- @@ -259,7 +260,6 @@ static Color *GenNextMipmap(Color *srcData, int srcWidth, int srcHeight); #endif #if defined(RLGL_STANDALONE) -static void TraceLog(int msgType, const char *text, ...); float *MatrixToFloat(Matrix mat); // Converts Matrix to float array #endif @@ -3344,7 +3344,7 @@ static Color *GenNextMipmap(Color *srcData, int srcWidth, int srcHeight) #if defined(RLGL_STANDALONE) // Output a trace log message // NOTE: Expected msgType: (0)Info, (1)Error, (2)Warning -static void TraceLog(int msgType, const char *text, ...) +void TraceLog(int msgType, const char *text, ...) { va_list args; va_start(args, text); @@ -230,6 +230,9 @@ typedef enum { OPENGL_11 = 1, OPENGL_33, OPENGL_ES_20 } GlVersion; // Color blending modes (pre-defined) typedef enum { BLEND_ALPHA = 0, BLEND_ADDITIVE, BLEND_MULTIPLIED } BlendMode; + + // TraceLog message types + typedef enum { INFO = 0, ERROR, WARNING, DEBUG, OTHER } TraceLogType; #endif #ifdef __cplusplus @@ -339,6 +342,8 @@ void EndBlendMode(void); // End blend Light CreateLight(int type, Vector3 position, Color diffuse); // Create a new light, initialize it and add to pool void DestroyLight(Light light); // Destroy a light and take it out of the list + +void TraceLog(int msgType, const char *text, ...); #endif #ifdef __cplusplus |
