From 3a63ef57c343f2e12c4203766655a73d3113299d Mon Sep 17 00:00:00 2001 From: stephena Date: Thu, 10 May 2012 10:30:58 +0000 Subject: [PATCH] Fix float vs. int pixel offsets which are causing graphical glitches. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2465 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- src/common/FrameBufferGL.cxx | 2 ++ src/common/FrameBufferGL.hxx | 1 + 2 files changed, 3 insertions(+) diff --git a/src/common/FrameBufferGL.cxx b/src/common/FrameBufferGL.cxx index 71bb46623..3c8310544 100644 --- a/src/common/FrameBufferGL.cxx +++ b/src/common/FrameBufferGL.cxx @@ -106,6 +106,7 @@ bool FrameBufferGL::loadFuncs(GLFunctionality functionality) OGL_INIT(Ortho,void,glOrtho,(GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble)); OGL_INIT(Viewport,void,glViewport,(GLint, GLint, GLsizei, GLsizei)); OGL_INIT(LoadIdentity,void,glLoadIdentity,(void)); + OGL_INIT(Translatef,void,glTranslatef,(GLfloat,GLfloat,GLfloat)); OGL_INIT(EnableClientState,void,glEnableClientState,(GLenum)); OGL_INIT(DisableClientState,void,glDisableClientState,(GLenum)); OGL_INIT(VertexPointer,void,glVertexPointer,(GLint,GLenum,GLsizei,const GLvoid*)); @@ -310,6 +311,7 @@ bool FrameBufferGL::setVidMode(VideoMode& mode) p_gl.Ortho(0.0, mode.screen_w, mode.screen_h, 0.0, -1.0, 1.0); p_gl.MatrixMode(GL_MODELVIEW); p_gl.LoadIdentity(); + p_gl.Translatef(0.375, 0.375, 0.0); //cerr << "dimensions: " << (fullScreen() ? "(full)" : "") << endl << mode << endl; diff --git a/src/common/FrameBufferGL.hxx b/src/common/FrameBufferGL.hxx index 0bf639cf2..dd36c9331 100644 --- a/src/common/FrameBufferGL.hxx +++ b/src/common/FrameBufferGL.hxx @@ -269,6 +269,7 @@ class FrameBufferGL : public FrameBuffer OGL_DECLARE(Ortho,void,glOrtho,(GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble)); OGL_DECLARE(Viewport,void,glViewport,(GLint, GLint, GLsizei, GLsizei)); OGL_DECLARE(LoadIdentity,void,glLoadIdentity,(void)); + OGL_DECLARE(Translatef,void,glTranslatef,(GLfloat,GLfloat,GLfloat)); OGL_DECLARE(EnableClientState,void,glEnableClientState,(GLenum)); OGL_DECLARE(DisableClientState,void,glDisableClientState,(GLenum)); OGL_DECLARE(VertexPointer,void,glVertexPointer,(GLint,GLenum,GLsizei,const GLvoid*));