Updated Vector math to new naming

This commit is contained in:
raysan5
2017-07-22 22:15:50 +02:00
parent 3655c6e466
commit a766e2c480
4 changed files with 47 additions and 47 deletions

View File

@@ -455,7 +455,7 @@ void rlRotatef(float angleDeg, float x, float y, float z)
Matrix matRotation = MatrixIdentity();
Vector3 axis = (Vector3){ x, y, z };
VectorNormalize(&axis);
Vector3Normalize(&axis);
matRotation = MatrixRotate(axis, angleDeg*DEG2RAD);
*currentMatrix = MatrixMultiply(*currentMatrix, matRotation);
@@ -553,7 +553,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++) VectorTransform(&tempBuffer[i], *currentMatrix);
for (int i = 0; i < tempBufferCount; i++) Vector3Transform(&tempBuffer[i], *currentMatrix);
// Deactivate tempBuffer usage to allow rlVertex3f do its job
useTempBuffer = false;
@@ -1178,7 +1178,7 @@ void rlglInit(int width, int height)
// Init temp vertex buffer, used when transformation required (translate, rotate, scale)
tempBuffer = (Vector3 *)malloc(sizeof(Vector3)*TEMP_VERTEX_BUFFER_SIZE);
for (int i = 0; i < TEMP_VERTEX_BUFFER_SIZE; i++) tempBuffer[i] = VectorZero();
for (int i = 0; i < TEMP_VERTEX_BUFFER_SIZE; i++) tempBuffer[i] = Vector3Zero();
// Init draw calls tracking system
draws = (DrawCall *)malloc(sizeof(DrawCall)*MAX_DRAWS_BY_TEXTURE);