2
0
raysan5 10 жил өмнө
parent
commit
8847602061

+ 1 - 1
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
     //--------------------------------------------------------------------------------------

+ 10 - 0
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)
 *

+ 6 - 6
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
 

+ 0 - 0
examples/models_cubesmap.png → examples/models_cubicmap.png


+ 5 - 5
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
 

+ 0 - 0
examples/resources/cubesmap.png → examples/resources/cubicmap.png


+ 2 - 2
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
     //---------------------------------------------------------------------------------------

+ 1 - 1
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
     //--------------------------------------------------------------------------------------

+ 1 - 1
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 - [email protected])
 *