mirror of
https://github.com/libretro/RetroArch
synced 2025-03-17 10:21:26 +00:00
Avoid ugly #undefs.
This commit is contained in:
parent
fea9aa9e9c
commit
2d3fed35e7
@ -381,7 +381,7 @@ void gfx_ctx_set_projection(gl_t *gl, const struct gl_ortho *ortho, bool allow_r
|
||||
|
||||
glVertexPointer(2, GL_FLOAT, 0, vertex_ptr);
|
||||
|
||||
glOrtho(ortho->left, ortho->right, ortho->bottom, ortho->top, ortho->near, ortho->far);
|
||||
glOrtho(ortho->left, ortho->right, ortho->bottom, ortho->top, ortho->znear, ortho->zfar);
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glLoadIdentity();
|
||||
}
|
||||
|
@ -406,7 +406,7 @@ void gfx_ctx_set_projection(gl_t *gl, const struct gl_ortho *ortho, bool allow_r
|
||||
if (allow_rotate)
|
||||
glRotatef(gl->rotation, 0, 0, 1);
|
||||
|
||||
glOrtho(ortho->left, ortho->right, ortho->bottom, ortho->top, ortho->near, ortho->far);
|
||||
glOrtho(ortho->left, ortho->right, ortho->bottom, ortho->top, ortho->znear, ortho->zfar);
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glLoadIdentity();
|
||||
}
|
||||
|
13
gfx/gl.c
13
gfx/gl.c
@ -452,8 +452,8 @@ void gl_set_viewport(gl_t *gl, unsigned width, unsigned height, bool force_full,
|
||||
ortho.right = 1.0f;
|
||||
ortho.bottom = 0.0f;
|
||||
ortho.top = 1.0f;
|
||||
ortho.near = -1.0f;
|
||||
ortho.far = 1.0f;
|
||||
ortho.znear = -1.0f;
|
||||
ortho.zfar = 1.0f;
|
||||
|
||||
if (gl->keep_aspect && !force_full)
|
||||
{
|
||||
@ -514,14 +514,7 @@ void gl_set_viewport(gl_t *gl, unsigned width, unsigned height, bool force_full,
|
||||
|
||||
static void gl_set_rotation(void *data, unsigned rotation)
|
||||
{
|
||||
struct gl_ortho ortho = {0};
|
||||
|
||||
ortho.left = 0;
|
||||
ortho.right = 1;
|
||||
ortho.bottom = 0;
|
||||
ortho.top = 1;
|
||||
ortho.near = -1;
|
||||
ortho.far = 1;
|
||||
struct gl_ortho ortho = {0, 1, 0, 1, -1, 1};
|
||||
|
||||
gl_t *gl = (gl_t*)driver.video_data;
|
||||
gl->rotation = 90 * rotation;
|
||||
|
@ -107,17 +107,14 @@ struct gl_fbo_scale
|
||||
bool valid;
|
||||
};
|
||||
|
||||
// DOS creeps into Win32, yay.
|
||||
#undef near
|
||||
#undef far
|
||||
struct gl_ortho
|
||||
{
|
||||
GLfloat left;
|
||||
GLfloat right;
|
||||
GLfloat bottom;
|
||||
GLfloat top;
|
||||
GLfloat near;
|
||||
GLfloat far;
|
||||
GLfloat znear;
|
||||
GLfloat zfar;
|
||||
};
|
||||
|
||||
struct gl_tex_info
|
||||
|
Loading…
x
Reference in New Issue
Block a user