Fixed PSP rendering
This commit is contained in:
@@ -52,6 +52,11 @@ void cameraPushMatrix(camera_t *camera) {
|
||||
|
||||
switch(camera->projType) {
|
||||
case CAMERA_PROJECTION_TYPE_ORTHOGRAPHIC:
|
||||
assertTrue(
|
||||
camera->orthographic.right != camera->orthographic.left &&
|
||||
camera->orthographic.top != camera->orthographic.bottom,
|
||||
"Invalid orthographic projection parameters"
|
||||
);
|
||||
glm_ortho(
|
||||
camera->orthographic.left,
|
||||
camera->orthographic.right,
|
||||
@@ -117,7 +122,6 @@ void cameraPushMatrix(camera_t *camera) {
|
||||
glm_vec3_copy(camera->lookatPixelPerfect.target, position);
|
||||
glm_vec3_add(position, camera->lookatPixelPerfect.offset, position);
|
||||
position[2] += z;
|
||||
|
||||
glm_lookat(
|
||||
position,
|
||||
camera->lookatPixelPerfect.target,
|
||||
|
||||
@@ -41,6 +41,9 @@ void screenInit() {
|
||||
SCREEN.frameBufferMeshVertices
|
||||
);
|
||||
#endif
|
||||
|
||||
// Init screen to backbuffer mode by default
|
||||
screenBind();
|
||||
}
|
||||
|
||||
void screenBind() {
|
||||
|
||||
@@ -170,6 +170,7 @@ void textureBind(const texture_t *texture) {
|
||||
#if DISPLAY_SDL2
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
glBindTexture(GL_TEXTURE_2D, texture->id);
|
||||
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
|
||||
#endif
|
||||
TEXTURE_BOUND = texture;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user