Skip to content

Commit 0753b1b

Browse files
committed
Update raylib
1 parent 0953865 commit 0753b1b

File tree

9 files changed

+36
-107
lines changed

9 files changed

+36
-107
lines changed

include/Camera3D.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ class Camera3D : public ::Camera3D {
3737
}
3838

3939
Camera3D(::Vector3 positionValue, ::Vector3 targetValue, ::Vector3 upValue,
40-
float fovyValue = 0, int typeValue = 0) {
40+
float fovyValue = 0, int projectionValue = 0) {
4141
position = positionValue;
4242
target = targetValue;
4343
up = upValue;
4444
fovy = fovyValue;
45-
type = typeValue;
45+
projection = projectionValue;
4646
}
4747

4848
Camera3D() {}
@@ -51,7 +51,7 @@ class Camera3D : public ::Camera3D {
5151
GETTERSETTER(::Vector3, Target, target)
5252
GETTERSETTER(::Vector3, Up, up)
5353
GETTERSETTER(float, Fovy, fovy)
54-
GETTERSETTER(int, Type, type)
54+
GETTERSETTER(int, Projection, projection)
5555

5656
Camera3D& operator=(const ::Camera3D& camera) {
5757
set(camera);
@@ -171,7 +171,7 @@ class Camera3D : public ::Camera3D {
171171
target = camera.target;
172172
up = camera.up;
173173
fovy = camera.fovy;
174-
type = camera.type;
174+
projection = camera.projection;
175175
}
176176
};
177177

include/Material.hpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ class Material : public ::Material {
6060

6161
GETTERSETTER(::Shader, Shader, shader)
6262
GETTERSETTER(::MaterialMap*, Maps, maps)
63-
GETTERSETTER(float*, Params, params)
63+
// TODO(RobLoach): Resolve the Material params being a float[4].
64+
//GETTERSETTER(const float*, Params, params)
6465

6566
Material& operator=(const ::Material& material) {
6667
set(material);
@@ -89,7 +90,10 @@ class Material : public ::Material {
8990
inline void set(const ::Material& material) {
9091
shader = material.shader;
9192
maps = material.maps;
92-
params = material.params;
93+
params[0] = material.params[0];
94+
params[1] = material.params[1];
95+
params[2] = material.params[2];
96+
params[3] = material.params[3];
9397
}
9498
};
9599
} // namespace raylib

include/Matrix.hpp

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -116,36 +116,6 @@ class Matrix : public ::Matrix {
116116
&& m15 == other.m15;
117117
}
118118

119-
/**
120-
* Set a custom projection matrix (replaces internal projection matrix)
121-
*/
122-
inline Matrix& SetProjection() {
123-
::SetMatrixProjection(*this);
124-
return *this;
125-
}
126-
127-
/**
128-
* Set a custom modelview matrix (replaces internal modelview matrix)
129-
*/
130-
inline Matrix& SetModelview() {
131-
::SetMatrixModelview(*this);
132-
return *this;
133-
}
134-
135-
/**
136-
* Get internal modelview matrix
137-
*/
138-
static Matrix GetModelview() {
139-
return ::GetMatrixModelview();
140-
}
141-
142-
/**
143-
* Get internal projection matrix
144-
*/
145-
static Matrix GetProjection() {
146-
return ::GetMatrixProjection();
147-
}
148-
149119
#ifndef RAYLIB_CPP_NO_MATH
150120
/**
151121
* Returns the trace of the matrix (sum of the values along the diagonal)

include/Mouse.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,6 @@ class Mouse {
8787
return ::GetMouseWheelMove();
8888
}
8989

90-
static inline int GetCursor() {
91-
return ::GetMouseCursor();
92-
}
93-
9490
static inline void SetCursor(int cursor) {
9591
::SetMouseCursor(cursor);
9692
}

include/Shader.hpp

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,6 @@ class Shader : public ::Shader {
4343
locs = Locs;
4444
}
4545

46-
Shader() {
47-
set(GetShaderDefault());
48-
}
49-
5046
Shader(const std::string& vsFileName, const std::string& fsFileName) {
5147
set(::LoadShader(vsFileName.c_str(), fsFileName.c_str()));
5248
}
@@ -55,10 +51,6 @@ class Shader : public ::Shader {
5551
return ::LoadShader(vsFileName.c_str(), fsFileName.c_str());
5652
}
5753

58-
static ::Shader LoadCode(const std::string& vsCode, const std::string& fsCode) {
59-
return ::LoadShaderCode(vsCode.c_str(), fsCode.c_str());
60-
}
61-
6254
GETTERSETTER(unsigned int, Id, id)
6355
GETTERSETTER(int*, Locs, locs)
6456

@@ -137,22 +129,6 @@ class Shader : public ::Shader {
137129
return *this;
138130
}
139131

140-
::TextureCubemap GenTextureCubemap(const ::Texture2D& panorama, int size, int format) const {
141-
return ::GenTextureCubemap(*this, panorama, size, format);
142-
}
143-
144-
::TextureCubemap GenTextureIrradiance(const ::Texture2D& panorama, int size) const {
145-
return ::GenTextureIrradiance(*this, panorama, size);
146-
}
147-
148-
::TextureCubemap GenTexturePrefilter(const ::Texture2D& panorama, int size) const {
149-
return ::GenTexturePrefilter(*this, panorama, size);
150-
}
151-
152-
::Texture2D GenTextureBRDF(int size) const {
153-
return ::GenTextureBRDF(*this, size);
154-
}
155-
156132
protected:
157133
inline void set(const ::Shader& shader) {
158134
id = shader.id;

include/Texture.hpp

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,19 @@ class Texture : public ::Texture {
3939
set(texture);
4040
}
4141

42-
Texture() {
43-
set(::GetTextureDefault());
44-
}
45-
4642
Texture(const ::Image& image) {
4743
LoadFromImage(image);
4844
}
4945

46+
/**
47+
* Load cubemap from image, multiple image cubemap layouts supported.
48+
*
49+
* @see LoadTextureCubemap()
50+
*/
51+
Texture(const ::Image& image, int layout) {
52+
LoadCubemap(image, layout);
53+
}
54+
5055
/**
5156
* Load texture from file into GPU memory (VRAM)
5257
*/
@@ -86,7 +91,7 @@ class Texture : public ::Texture {
8691
/**
8792
* Load cubemap from image, multiple image cubemap layouts supported
8893
*/
89-
void LoadTextureCubemap(const ::Image& image, int layoutType) {
94+
void LoadCubemap(const ::Image& image, int layoutType) {
9095
set(::LoadTextureCubemap(image, layoutType));
9196
}
9297

@@ -235,14 +240,6 @@ class Texture : public ::Texture {
235240
return ::GetPixelDataSize(width, height, format);
236241
}
237242

238-
/**
239-
* Define default texture used to draw shapes
240-
*/
241-
inline Texture& SetShapes(::Rectangle source) {
242-
::SetShapesTexture(*this, source);
243-
return *this;
244-
}
245-
246243
protected:
247244
inline void set(const ::Texture& texture) {
248245
id = texture.id;

include/Vector4.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ class Vector4 : public ::Vector4 {
148148
return ::QuaternionFromAxisAngle(axis, angle);
149149
}
150150

151-
static Vector4 FromEuler(const float roll, const float pitch, const float yaw) {
152-
return ::QuaternionFromEuler(roll, pitch, yaw);
151+
static Vector4 FromEuler(const float yaw, const float pitch, const float roll) {
152+
return ::QuaternionFromEuler(yaw, pitch, roll);
153153
}
154154

155155
static Vector4 FromEuler(const ::Vector3& vector3) {

include/VrSimulator.hpp

Lines changed: 13 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,15 @@
3131
namespace raylib {
3232
class VrSimulator {
3333
public:
34-
VrSimulator() {
35-
Init();
36-
}
37-
38-
VrSimulator(::VrDeviceInfo info, ::Shader distortion) {
39-
Init();
40-
Set(info, distortion);
34+
VrSimulator(::VrDeviceInfo& info) {
35+
Init(info);
4136
}
4237

4338
/**
4439
* Init VR simulator for selected device parameters
4540
*/
46-
inline void Init() {
47-
InitVrSimulator();
41+
inline void Init(::VrDeviceInfo info) {
42+
InitVrSimulator(info);
4843
}
4944

5045
/**
@@ -78,27 +73,11 @@ class VrSimulator {
7873
return *this;
7974
}
8075

81-
/**
82-
* Set stereo rendering configuration parameters
83-
*/
84-
inline VrSimulator& Set(::VrDeviceInfo info, ::Shader distortion) {
85-
::SetVrConfiguration(info, distortion);
86-
return *this;
87-
}
88-
89-
/**
90-
* Enable/Disable VR experience
91-
*/
92-
inline VrSimulator& Toggle() {
93-
::ToggleVrMode();
94-
return *this;
95-
}
96-
9776
/**
9877
* Begin VR simulator stereo rendering
9978
*/
100-
inline VrSimulator& BeginDrawing() {
101-
::BeginVrDrawing();
79+
inline VrSimulator& BeginDrawing(::RenderTexture2D& target) {
80+
::BeginVrDrawing(target);
10281
return *this;
10382
}
10483

@@ -116,6 +95,13 @@ class VrSimulator {
11695
inline void Close() {
11796
::CloseVrSimulator();
11897
}
98+
99+
/**
100+
* Get stereo rendering configuration parameters
101+
*/
102+
inline VrStereoConfig GetConfig(VrDeviceInfo& device) {
103+
return GetVrConfig(device);
104+
}
119105
};
120106
} // namespace raylib
121107

vendor/raylib

Submodule raylib updated 266 files

0 commit comments

Comments
 (0)