Testing SDL support
This commit is contained in:
@ -24,15 +24,15 @@ void cameraLook(camera_t *camera,
|
||||
}
|
||||
|
||||
void cameraPerspective(camera_t *camera,
|
||||
float fov, float aspect, float near, float far
|
||||
float fov, float aspect, float camNear, float camFar
|
||||
) {
|
||||
matrixIdentity(&camera->projection);
|
||||
matrixPerspective(&camera->projection, mathDeg2Rad(fov), aspect, near, far);
|
||||
matrixPerspective(&camera->projection,mathDeg2Rad(fov),aspect,camNear,camFar);
|
||||
}
|
||||
|
||||
void cameraOrtho(camera_t *camera,
|
||||
float left, float right, float bottom, float top, float near, float far
|
||||
float left, float right, float bottom, float top, float camNear, float camFar
|
||||
) {
|
||||
matrixIdentity(&camera->projection);
|
||||
matrixOrtho(&camera->projection, left, right, bottom, top, near, far);
|
||||
matrixOrtho(&camera->projection, left, right, bottom, top, camNear, camFar);
|
||||
}
|
@ -46,11 +46,11 @@ void cameraLook(camera_t *camera,
|
||||
* @param camera The camera to project.
|
||||
* @param fov The field of view of the camera (in degrees).
|
||||
* @param aspect The aspect ratio of the camera (w / h)
|
||||
* @param near The near plane clip.
|
||||
* @param far the far plane clip.
|
||||
* @param camNear The near plane clip.
|
||||
* @param camFar the far plane clip.
|
||||
*/
|
||||
void cameraPerspective(camera_t *camera,
|
||||
float fov, float aspect, float near, float far
|
||||
float fov, float aspect, float camNear, float camFar
|
||||
);
|
||||
|
||||
/**
|
||||
@ -60,9 +60,9 @@ void cameraPerspective(camera_t *camera,
|
||||
* @param left The left side of the viewport.
|
||||
* @param right The right side of the viewport.
|
||||
* @param bottom The bottom side of the viewport.
|
||||
* @param near The near plane clip.
|
||||
* @param far the far plane clip.
|
||||
* @param camNear The near plane clip.
|
||||
* @param camFar the far plane clip.
|
||||
*/
|
||||
void cameraOrtho(camera_t *camera,
|
||||
float left, float right, float bottom, float top, float near, float far
|
||||
float left, float right, float bottom, float top, float camNear, float camFar
|
||||
);
|
@ -38,15 +38,15 @@ void matrixLook(matrix_t *matrix,
|
||||
}
|
||||
|
||||
void matrixPerspective(matrix_t *matrix,
|
||||
float fov,float aspect,float near,float far
|
||||
float fov, float aspect, float camNear, float camFar
|
||||
) {
|
||||
glm_perspective(fov, aspect, near, far, matrix->internalMatrix);
|
||||
glm_perspective(fov, aspect, camNear, camFar, matrix->internalMatrix);
|
||||
}
|
||||
|
||||
void matrixOrtho(matrix_t *matrix,
|
||||
float left, float right, float bottom, float top, float near, float far
|
||||
float left, float right, float bottom, float top, float camNear, float camFar
|
||||
) {
|
||||
glm_ortho(left, right, bottom, top, near, far, matrix->internalMatrix);
|
||||
glm_ortho(left, right, bottom, top, camNear, camFar, matrix->internalMatrix);
|
||||
}
|
||||
|
||||
void matrixTranslate(matrix_t *matrix, float x, float y, float z) {
|
||||
|
@ -60,11 +60,11 @@ void matrixLook(matrix_t *matrix,
|
||||
* @param matrix Matrix to apply to.
|
||||
* @param fov Field of View (in radians) to use.
|
||||
* @param aspect Aspect ratio (w/h) of the viewport.
|
||||
* @param near Near vector, > 0.
|
||||
* @param far Far view vector.
|
||||
* @param camNear Near vector, > 0.
|
||||
* @param camFar Far view vector.
|
||||
*/
|
||||
void matrixPerspective(matrix_t *matrix,
|
||||
float fov,float aspect,float near,float far
|
||||
float fov,float aspect, float camNear, float camFar
|
||||
);
|
||||
|
||||
/**
|
||||
@ -75,11 +75,11 @@ void matrixPerspective(matrix_t *matrix,
|
||||
* @param right Right view position.
|
||||
* @param bottom Bottom view position.
|
||||
* @param top Top view position.
|
||||
* @param near Near vector, > 0.
|
||||
* @param far Far view vector.
|
||||
* @param camNear Near vector, > 0.
|
||||
* @param camFar Far view vector.
|
||||
*/
|
||||
void matrixOrtho(matrix_t *matrix,
|
||||
float left, float right, float bottom, float top, float near, float far
|
||||
float left, float right, float bottom, float top, float camNear, float camFar
|
||||
);
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user