mirror of
https://github.com/allankoechke/raylib-cpp.git
synced 2026-12-01 17:29:38 +00:00
Update raylib to latest from master
This commit is contained in:
@@ -56,7 +56,7 @@ int main(void)
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
// Delay initialization of variables due to physics reset async
|
||||
physics.RunStep();
|
||||
physics.UpdateStep();
|
||||
|
||||
if (needsReset)
|
||||
{
|
||||
|
||||
@@ -532,6 +532,20 @@ class Image : public ::Image {
|
||||
return ::LoadImagePalette(*this, maxPaletteSize, colorsCount);
|
||||
}
|
||||
|
||||
/**
|
||||
* Unload color data loaded with LoadImageColors()
|
||||
*/
|
||||
inline void UnloadColors(::Color* colors) {
|
||||
::UnloadImageColors(colors);
|
||||
}
|
||||
|
||||
/**
|
||||
* Unload colors palette loaded with LoadImagePalette()
|
||||
*/
|
||||
inline void UnloadPalette(::Color* colors) {
|
||||
::UnloadImagePalette(colors);
|
||||
}
|
||||
|
||||
/**
|
||||
* Load texture from image data
|
||||
*/
|
||||
|
||||
@@ -149,6 +149,13 @@ class Mesh : public ::Mesh {
|
||||
Unload();
|
||||
}
|
||||
|
||||
/**
|
||||
* Upload mesh vertex data to GPU (VRAM)
|
||||
*/
|
||||
inline void Upload() {
|
||||
::UploadMesh(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Export mesh data to file
|
||||
*/
|
||||
@@ -194,14 +201,6 @@ class Mesh : public ::Mesh {
|
||||
return *this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Smooth (average) vertex normals
|
||||
*/
|
||||
inline Mesh& NormalsSmooth() {
|
||||
::MeshNormalsSmooth(this);
|
||||
return *this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load model from generated mesh
|
||||
*/
|
||||
|
||||
@@ -68,8 +68,8 @@ class Physics {
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline Physics& RunStep() {
|
||||
::RunPhysicsStep();
|
||||
inline Physics& UpdateStep() {
|
||||
::UpdatePhysicsStep();
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -78,10 +78,6 @@ class Physics {
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline bool IsEnabled() const {
|
||||
return ::IsPhysicsEnabled();
|
||||
}
|
||||
|
||||
inline Physics& SetGravity(float x, float y) {
|
||||
::SetPhysicsGravity(x, y);
|
||||
return *this;
|
||||
|
||||
@@ -264,18 +264,16 @@ class Vector2 : public ::Vector2 {
|
||||
}
|
||||
|
||||
/**
|
||||
* Draw line using quadratic bezier curves with a control point
|
||||
*
|
||||
* TODO(RobLoach): Add this one this commit makes it in: https://github.com/raysan5/raylib/commit/521ed1cef0c0dbc752cb79f70c21bb4fc3bf70d4
|
||||
* Draw line using quadratic bezier curves with a control point.
|
||||
*/
|
||||
// inline Vector2& DrawLineBezierQuad(
|
||||
// ::Vector2 endPos,
|
||||
// ::Vector2 controlPos,
|
||||
// float thick,
|
||||
// ::Color color) {
|
||||
// ::DrawLineBezierQuad(*this, endPos, controlPos, thick, color);
|
||||
// return *this;
|
||||
//}
|
||||
inline Vector2& DrawLineBezierQuad(
|
||||
::Vector2 endPos,
|
||||
::Vector2 controlPos,
|
||||
float thick,
|
||||
::Color color) {
|
||||
::DrawLineBezierQuad(*this, endPos, controlPos, thick, color);
|
||||
return *this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Draw a color-filled circle (Vector version)
|
||||
|
||||
Reference in New Issue
Block a user