summaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorRay <[email protected]>2020-02-26 20:47:08 +0100
committerRay <[email protected]>2020-02-26 20:47:08 +0100
commitfa4e0c1a2645826dde90792e4081cbcbf6784968 (patch)
treee43bf9236b64a5dc913d2c7161d29aaf3497797d /examples
parent10464493391f1b4c7714caf0eb45cc76f0053c1e (diff)
downloadraylib-fa4e0c1a2645826dde90792e4081cbcbf6784968.tar.gz
raylib-fa4e0c1a2645826dde90792e4081cbcbf6784968.zip
Reviewed example
Diffstat (limited to 'examples')
-rw-r--r--examples/others/rlgl_standalone.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/examples/others/rlgl_standalone.c b/examples/others/rlgl_standalone.c
index 506ddfdb..25490525 100644
--- a/examples/others/rlgl_standalone.c
+++ b/examples/others/rlgl_standalone.c
@@ -54,6 +54,8 @@
#include <GLFW/glfw3.h> // Windows/Context and inputs management
+#inclde <stdio.h> // Requried for: printf()
+
#define RED (Color){ 230, 41, 55, 255 } // Red
#define RAYWHITE (Color){ 245, 245, 245, 255 } // My own White (raylib logo)
#define DARKGRAY (Color){ 80, 80, 80, 255 } // Dark Gray
@@ -61,8 +63,8 @@
//----------------------------------------------------------------------------------
// Module specific Functions Declaration
//----------------------------------------------------------------------------------
-static void ErrorCallback(int error, const char* description);
-static void KeyCallback(GLFWwindow* window, int key, int scancode, int action, int mods);
+static void ErrorCallback(int error, const char *description);
+static void KeyCallback(GLFWwindow *window, int key, int scancode, int action, int mods);
// Drawing functions (uses rlgl functionality)
static void DrawGrid(int slices, float spacing);
@@ -86,10 +88,10 @@ int main(void)
if (!glfwInit())
{
- TraceLog(LOG_WARNING, "GLFW3: Can not initialize GLFW");
+ printf("GLFW3: Can not initialize GLFW\n");
return 1;
}
- else TraceLog(LOG_INFO, "GLFW3: GLFW initialized successfully");
+ else printf("GLFW3: GLFW initialized successfully\n");
glfwWindowHint(GLFW_SAMPLES, 4);
glfwWindowHint(GLFW_DEPTH_BITS, 16);
@@ -105,7 +107,7 @@ int main(void)
glfwTerminate();
return 2;
}
- else TraceLog(LOG_INFO, "GLFW3: Window created successfully");
+ else printf("GLFW3: Window created successfully\n");
glfwSetWindowPos(window, 200, 200);
@@ -215,13 +217,13 @@ int main(void)
//----------------------------------------------------------------------------------
// GLFW3: Error callback
-static void ErrorCallback(int error, const char* description)
+static void ErrorCallback(int error, const char *description)
{
- TraceLog(LOG_ERROR, description);
+ fprintf(stderr, description);
}
// GLFW3: Keyboard callback
-static void KeyCallback(GLFWwindow* window, int key, int scancode, int action, int mods)
+static void KeyCallback(GLFWwindow *window, int key, int scancode, int action, int mods)
{
if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS)
{