mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-25 04:28:30 +00:00
Updated some code
This commit is contained in:
16
src/rlgl.c
16
src/rlgl.c
@@ -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
|
||||
|
Reference in New Issue
Block a user