summaryrefslogtreecommitdiffhomepage
path: root/src/rlgl.c
diff options
context:
space:
mode:
authorRay <[email protected]>2018-03-16 13:47:01 +0100
committerRay <[email protected]>2018-03-16 13:47:01 +0100
commit61e0e4b4f37cc66135445bc87af7c92399fa69ee (patch)
tree73d5b551497d345a5f2696aa33a21a7ed25c583a /src/rlgl.c
parent9318dc98ce647acd9a718243555996618e95b959 (diff)
downloadraylib-61e0e4b4f37cc66135445bc87af7c92399fa69ee.tar.gz
raylib-61e0e4b4f37cc66135445bc87af7c92399fa69ee.zip
Complete review of raymath for API consistency
Diffstat (limited to 'src/rlgl.c')
-rw-r--r--src/rlgl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rlgl.c b/src/rlgl.c
index 46e0668d..8b9f18e8 100644
--- a/src/rlgl.c
+++ b/src/rlgl.c
@@ -470,7 +470,7 @@ void rlRotatef(float angleDeg, float x, float y, float z)
Matrix matRotation = MatrixIdentity();
Vector3 axis = (Vector3){ x, y, z };
- Vector3Normalize(&axis);
+ axis = Vector3Normalize(axis);
matRotation = MatrixRotate(axis, angleDeg*DEG2RAD);
// NOTE: We transpose matrix with multiplication order
@@ -570,7 +570,7 @@ void rlEnd(void)
// This way, rlTranslatef(), rlRotatef()... behaviour is the same than OpenGL 1.1
// Apply transformation matrix to all temp vertices
- for (int i = 0; i < tempBufferCount; i++) Vector3Transform(&tempBuffer[i], *currentMatrix);
+ for (int i = 0; i < tempBufferCount; i++) tempBuffer[i] = Vector3Transform(tempBuffer[i], *currentMatrix);
// Deactivate tempBuffer usage to allow rlVertex3f do its job
useTempBuffer = false;
@@ -1356,13 +1356,13 @@ Vector3 rlUnproject(Vector3 source, Matrix proj, Matrix view)
// Calculate unproject matrix (multiply view patrix by projection matrix) and invert it
Matrix matViewProj = MatrixMultiply(view, proj);
- MatrixInvert(&matViewProj);
+ matViewProj= MatrixInvert(matViewProj);
// Create quaternion from source point
Quaternion quat = { source.x, source.y, source.z, 1.0f };
// Multiply quat point by unproject matrix
- QuaternionTransform(&quat, matViewProj);
+ quat = QuaternionTransform(quat, matViewProj);
// Normalized world points in vectors
result.x = quat.x/quat.w;