aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorraysan5 <raysan5@gmail.com>2015-01-02 20:58:06 +0100
committerraysan5 <raysan5@gmail.com>2015-01-02 20:58:06 +0100
commit8847602061d964592c468757eb535770771af1f0 (patch)
treef9f38b6d214dc7981c20a749009d80fc948a2214
parente6bc655d6acf69daeff084829cfee08aba9a71a8 (diff)
downloadraylib-8847602061d964592c468757eb535770771af1f0.tar.gz
raylib-8847602061d964592c468757eb535770771af1f0.zip
Examples review...
-rw-r--r--examples/audio_music_stream.c2
-rw-r--r--examples/core_basic_window.c10
-rw-r--r--examples/models_cubicmap.c12
-rw-r--r--examples/models_cubicmap.png (renamed from examples/models_cubesmap.png)bin27438 -> 27438 bytes
-rw-r--r--examples/models_heightmap.c10
-rw-r--r--examples/resources/cubicmap.png (renamed from examples/resources/cubesmap.png)bin173 -> 173 bytes
-rw-r--r--examples/textures_image_loading.c4
-rw-r--r--examples/textures_mipmaps.c2
-rw-r--r--src/rlgl.h2
9 files changed, 26 insertions, 16 deletions
diff --git a/examples/audio_music_stream.c b/examples/audio_music_stream.c
index 5fd4a054..560347e6 100644
--- a/examples/audio_music_stream.c
+++ b/examples/audio_music_stream.c
@@ -27,8 +27,8 @@ int main()
PlayMusicStream("resources/audio/guitar_noodling.ogg"); // Play music stream
int framesCounter = 0;
- float volume = 1.0;
float timePlayed = 0;
+ //float volume = 1.0;
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//--------------------------------------------------------------------------------------
diff --git a/examples/core_basic_window.c b/examples/core_basic_window.c
index 505d8df4..c6ad8445 100644
--- a/examples/core_basic_window.c
+++ b/examples/core_basic_window.c
@@ -2,6 +2,16 @@
*
* raylib [core] example - Basic window
*
+* Welcome to raylib!
+*
+* To test examples, just press F6 and execute raylib_compile_execute script
+* Note that compiled executable is placed in the same folder as .c file
+*
+* You can find all basic examples on C:\raylib\raylib\examples folder or
+* raylib official webpage: www.raylib.com
+*
+* Enjoy using raylib. :)
+*
* This example has been created using raylib 1.0 (www.raylib.com)
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
*
diff --git a/examples/models_cubicmap.c b/examples/models_cubicmap.c
index 08398ad4..60e93c6d 100644
--- a/examples/models_cubicmap.c
+++ b/examples/models_cubicmap.c
@@ -1,6 +1,6 @@
/*******************************************************************************************
*
-* raylib [models] example - Cubesmap loading and drawing
+* raylib [models] example - Cubicmap loading and drawing
*
* This example has been created using raylib 1.2 (www.raylib.com)
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
@@ -23,11 +23,11 @@ int main()
// Define the camera to look into our 3d world
Camera camera = {{ 7.0, 7.0, 7.0 }, { 0.0, 0.0, 0.0 }, { 0.0, 1.0, 0.0 }};
- Image img = LoadImage("resources/cubesmap.png"); // Load cubesmap image (RAM)
- Texture2D texture = CreateTexture(img, false); // Convert image to texture (VRAM)
- Model map = LoadCubesmap(img); // Load cubesmap model
- SetModelTexture(&map, texture); // Bind texture to model
- Vector3 mapPosition = { -1, 0.0, -1 }; // Set model position
+ Image img = LoadImage("resources/cubicmap.png"); // Load cubesmap image (RAM)
+ Texture2D texture = LoadTextureFromImage(img, false); // Convert image to texture (VRAM)
+ Model map = LoadCubicmap(img); // Load cubicmap model
+ SetModelTexture(&map, texture); // Bind texture to model
+ Vector3 mapPosition = { -1, 0.0, -1 }; // Set model position
UnloadImage(img); // Unload cubesmap image from RAM, already uploaded to VRAM
diff --git a/examples/models_cubesmap.png b/examples/models_cubicmap.png
index f686ba21..f686ba21 100644
--- a/examples/models_cubesmap.png
+++ b/examples/models_cubicmap.png
Binary files differ
diff --git a/examples/models_heightmap.c b/examples/models_heightmap.c
index 6e807b8c..7121c261 100644
--- a/examples/models_heightmap.c
+++ b/examples/models_heightmap.c
@@ -23,11 +23,11 @@ int main()
// Define the camera to look into our 3d world
Camera camera = {{ 10.0, 12.0, 10.0 }, { 0.0, 0.0, 0.0 }, { 0.0, 1.0, 0.0 }};
- Image img = LoadImage("resources/heightmap.png"); // Load heightmap image (RAM)
- Texture2D texture = CreateTexture(img, false); // Convert image to texture (VRAM)
- Model map = LoadHeightmap(img, 4); // Load heightmap model
- SetModelTexture(&map, texture); // Bind texture to model
- Vector3 mapPosition = { -4, 0.0, -4 }; // Set model position
+ Image img = LoadImage("resources/heightmap.png"); // Load heightmap image (RAM)
+ Texture2D texture = LoadTextureFromImage(img, false); // Convert image to texture (VRAM)
+ Model map = LoadHeightmap(img, 4); // Load heightmap model
+ SetModelTexture(&map, texture); // Bind texture to model
+ Vector3 mapPosition = { -4, 0.0, -4 }; // Set model position
UnloadImage(img); // Unload heightmap image from RAM, already uploaded to VRAM
diff --git a/examples/resources/cubesmap.png b/examples/resources/cubicmap.png
index 87b95d50..87b95d50 100644
--- a/examples/resources/cubesmap.png
+++ b/examples/resources/cubicmap.png
Binary files differ
diff --git a/examples/textures_image_loading.c b/examples/textures_image_loading.c
index 179cf84c..b7fc2cfc 100644
--- a/examples/textures_image_loading.c
+++ b/examples/textures_image_loading.c
@@ -24,8 +24,8 @@ int main()
// NOTE: Textures MUST be loaded after Window initialization (OpenGL context is required)
- Image img = LoadImage("resources/raylib_logo.png"); // Loaded in CPU memory (RAM)
- Texture2D texture = CreateTexture(img, false); // Image converted to texture, GPU memory (VRAM)
+ Image img = LoadImage("resources/raylib_logo.png"); // Loaded in CPU memory (RAM)
+ Texture2D texture = LoadTextureFromImage(img, false); // Image converted to texture, GPU memory (VRAM)
UnloadImage(img); // Once image has been converted to texture and uploaded to VRAM, it can be unloaded from RAM
//---------------------------------------------------------------------------------------
diff --git a/examples/textures_mipmaps.c b/examples/textures_mipmaps.c
index ee79f513..d3ba1708 100644
--- a/examples/textures_mipmaps.c
+++ b/examples/textures_mipmaps.c
@@ -27,7 +27,7 @@ int main()
// with mipmaps option set to true on CreateTexture()
Image image = LoadImage("resources/raylib_logo.png"); // Load image to CPU memory (RAM)
- Texture2D texture = CreateTexture(image, true); // Create texture and generate mipmaps
+ Texture2D texture = LoadTextureFromImage(image, true); // Create texture and generate mipmaps
UnloadImage(image); // Once texture has been created, we can unload image data from RAM
//--------------------------------------------------------------------------------------
diff --git a/src/rlgl.h b/src/rlgl.h
index 5fa9c486..b42b388b 100644
--- a/src/rlgl.h
+++ b/src/rlgl.h
@@ -5,7 +5,7 @@
* raylib now uses OpenGL 1.1 style functions (rlVertex) that are mapped to selected OpenGL version:
* OpenGL 1.1 - Direct map rl* -> gl*
* OpenGL 3.3+ - Vertex data is stored in VAOs, call rlglDraw() to render
-* OpenGL ES 2 - Same behaviour as OpenGL 3.3+
+* OpenGL ES 2 - Vertex data is stored in VBOs or VAOs (when available), call rlglDraw() to render
*
* Copyright (c) 2014 Ramon Santamaria (Ray San - raysan@raysanweb.com)
*