Update raylib to latest from master

This commit is contained in:
Rob Loach
2021-02-06 17:34:06 -05:00
parent ec62d8219d
commit 0953865260
5 changed files with 33 additions and 26 deletions

View File

@@ -56,7 +56,7 @@ int main(void)
// Update
//----------------------------------------------------------------------------------
// Delay initialization of variables due to physics reset async
physics.RunStep();
physics.UpdateStep();
if (needsReset)
{

View File

@@ -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
*/

View File

@@ -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
*/

View File

@@ -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;

View File

@@ -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)