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
This commit is contained in:
stephena 2012-05-10 10:30:58 +00:00
parent 29a38af737
commit 3a63ef57c3
2 changed files with 3 additions and 0 deletions

View File

@ -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;

View File

@ -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*));