diff --git a/CMakeLists.txt b/CMakeLists.txt index abd80f7..2c592aa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,6 @@ project (raylib-cpp) option(BUILD_EXAMPLES "Examples" TRUE) set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") -configure_file(${CMAKE_SOURCE_DIR}/cmake/CTestCustom.cmake ${CMAKE_BINARY_DIR}) add_subdirectory(include) diff --git a/cmake/CTestCustom.cmake b/cmake/CTestCustom.cmake deleted file mode 100644 index d550639..0000000 --- a/cmake/CTestCustom.cmake +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore the following tests. -set(CTEST_CUSTOM_TESTS_IGNORE - pkg-config--static -) \ No newline at end of file diff --git a/examples/textures/textures_bunnymark.cpp b/examples/textures/textures_bunnymark.cpp index fb9f341..d7c9e94 100644 --- a/examples/textures/textures_bunnymark.cpp +++ b/examples/textures/textures_bunnymark.cpp @@ -56,7 +56,7 @@ int main(void) raylib::Window w(screenWidth, screenHeight, "raylib [textures] example - bunnymark"); // Load bunny texture - const raylib::Texture2D texBunny("resources/wabbit_alpha.png"); + raylib::Texture2D texBunny("resources/wabbit_alpha.png"); std::vector bunnies; diff --git a/examples/textures/textures_image_drawing.cpp b/examples/textures/textures_image_drawing.cpp index 5e86c7a..1c90a4c 100644 --- a/examples/textures/textures_image_drawing.cpp +++ b/examples/textures/textures_image_drawing.cpp @@ -60,7 +60,7 @@ int main(void) // Draw //---------------------------------------------------------------------------------- - BeginDrawing(); + w.BeginDrawing(); background.ClearBackground(); @@ -70,7 +70,7 @@ int main(void) darkGray.DrawText("We are drawing only one texture from various images composed!", 240, 350, 10); darkGray.DrawText("Source images have been cropped, scaled, flipped and copied one over the other.", 190, 370, 10); - EndDrawing(); + w.EndDrawing(); //---------------------------------------------------------------------------------- } diff --git a/include/raylib/Texture2D.hpp b/include/raylib/Texture2D.hpp index 1991bde..cc25c97 100644 --- a/include/raylib/Texture2D.hpp +++ b/include/raylib/Texture2D.hpp @@ -80,6 +80,10 @@ namespace raylib { DrawTextureNPatch(*this, nPatchInfo, destRec, origin, rotation, tint); } + void Draw(::Vector3 position, float width, float height, float length, ::Color color = WHITE) { + DrawCubeTexture(*this, position, width, height, length, color); + } + void Unload() { UnloadTexture(*this); };