summaryrefslogtreecommitdiffhomepage
path: root/src/rlgl.h
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2014-04-09 20:25:26 +0200
committerraysan5 <[email protected]>2014-04-09 20:25:26 +0200
commite6b82cb111c3485c5e6131fe29791f938305bce3 (patch)
tree01f1a6968b784d07d63f6bf741c1527145cea25c /src/rlgl.h
parentc04f37d0f5f75c3e112d71444e589513396c9d0f (diff)
downloadraylib-e6b82cb111c3485c5e6131fe29791f938305bce3.tar.gz
raylib-e6b82cb111c3485c5e6131fe29791f938305bce3.zip
Lots of changes, most of them under testing-review
Added a Tracing/Log system Added OGG stream music support (DOESN'T WORK) Added Compressed textures support * This update is probably very buggy...
Diffstat (limited to 'src/rlgl.h')
-rw-r--r--src/rlgl.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/rlgl.h b/src/rlgl.h
index 174310dd..0cd53661 100644
--- a/src/rlgl.h
+++ b/src/rlgl.h
@@ -33,17 +33,20 @@
#ifndef RLGL_STANDALONE
#include "raylib.h" // Required for typedef: Model
+ #include "utils.h" // Required for function TraceLog()
#endif
+#include "raymath.h" // Required for data type Matrix and Matrix functions
+
// Select desired OpenGL version
-#define USE_OPENGL_11
-//#define USE_OPENGL_33
+//#define USE_OPENGL_11
+#define USE_OPENGL_33
//#define USE_OPENGL_ES2
//----------------------------------------------------------------------------------
// Defines and Macros
//----------------------------------------------------------------------------------
-#define MAX_LINES_BATCH 1024
+#define MAX_LINES_BATCH 8192 // 1024
#define MAX_TRIANGLES_BATCH 2048
#define MAX_QUADS_BATCH 8192
@@ -57,7 +60,7 @@ typedef enum { RL_PROJECTION, RL_MODELVIEW, RL_TEXTURE } MatrixMode;
typedef enum { RL_LINES, RL_TRIANGLES, RL_QUADS } DrawMode;
#ifdef RLGL_STANDALONE
- typedef struct Model Model;
+typedef struct Model Model;
#endif
typedef struct {
@@ -125,19 +128,20 @@ void rlClearScreenBuffers(); // Clear used screen buffers (color
//------------------------------------------------------------------------------------
// Functions Declaration - rlgl functionality
//------------------------------------------------------------------------------------
-#ifdef USE_OPENGL_33
+#if defined(USE_OPENGL_33) || defined(USE_OPENGL_ES2)
void rlglInit(); // Initialize rlgl (shaders, VAO, VBO...)
void rlglClose(); // De-init rlgl
void rlglDraw(); // Draw VAOs
unsigned int rlglLoadModel(VertexData data);
+unsigned int rlglLoadCompressedTexture(unsigned char *data, int width, int height, int mipmapCount, int format);
#endif
-void rlglDrawModel(Model model, bool wires); // Draw model
+void rlglDrawModel(Model model, Vector3 position, float scale, bool wires); // Draw model
void rlglInitGraphicsDevice(int fbWidth, int fbHeight); // Initialize Graphics Device (OpenGL stuff)
unsigned int rlglLoadTexture(int width, int height, unsigned char *pixels); // Load in GPU OpenGL texture
byte *rlglReadScreenPixels(int width, int height); // Read screen pixel data (color buffer)
-#ifdef USE_OPENGL_33
+#if defined(USE_OPENGL_33) || defined(USE_OPENGL_ES2)
void PrintProjectionMatrix(); // DEBUG: Print projection matrix
void PrintModelviewMatrix(); // DEBUG: Print modelview matrix
#endif