mirror of
https://github.com/allankoechke/raylib-cpp.git
synced 2026-12-01 01:18:52 +00:00
updates
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
# Ignore the following tests.
|
||||
set(CTEST_CUSTOM_TESTS_IGNORE
|
||||
pkg-config--static
|
||||
)
|
||||
@@ -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<Bunny> bunnies;
|
||||
|
||||
|
||||
@@ -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();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user