mirror of https://github.com/stella-emu/stella.git
A little renaming in the GL class. I now know why we're getting white
textures in OSX. It seems the textures have to be completely reloaded after the window changes size, even if it's still large enough to hold the previous textures. I assume the GL context is being reset each time SDL_SetVideoMode is called (although this doesn't happen in Linux or Win32). git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1559 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
f0212fe4de
commit
f599e1611d
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: FrameBufferGL.cxx,v 1.111 2008-12-10 17:11:34 stephena Exp $
|
||||
// $Id: FrameBufferGL.cxx,v 1.112 2008-12-10 18:11:21 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#ifdef DISPLAY_OPENGL
|
||||
|
@ -72,7 +72,7 @@ static void (APIENTRY* p_glTexParameteri)( GLenum, GLenum, GLint );
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
FrameBufferGL::FrameBufferGL(OSystem* osystem)
|
||||
: FrameBuffer(osystem),
|
||||
myTiaSurface(NULL),
|
||||
myBaseSurface(NULL),
|
||||
myFilterParamName("GL_NEAREST"),
|
||||
myWidthScaleFactor(1.0),
|
||||
myHeightScaleFactor(1.0),
|
||||
|
@ -352,8 +352,8 @@ cerr << "dimensions: " << endl
|
|||
<< " imageh = " << mode.image_h << endl
|
||||
<< endl;
|
||||
|
||||
delete myTiaSurface;
|
||||
myTiaSurface = new FBSurfaceGL(*this, baseWidth, baseHeight,
|
||||
delete myBaseSurface;
|
||||
myBaseSurface = new FBSurfaceGL(*this, baseWidth, baseHeight,
|
||||
mode.image_w, mode.image_h);
|
||||
|
||||
// Make sure any old parts of the screen are erased
|
||||
|
@ -374,8 +374,8 @@ void FrameBufferGL::drawMediaSource()
|
|||
uInt8* previousFrame = mediasrc.previousFrameBuffer();
|
||||
uInt32 width = mediasrc.width();
|
||||
uInt32 height = mediasrc.height();
|
||||
uInt32 pitch = myTiaSurface->pitch();
|
||||
uInt16* buffer = (uInt16*) myTiaSurface->pixels();
|
||||
uInt32 pitch = myBaseSurface->pitch();
|
||||
uInt16* buffer = (uInt16*) myBaseSurface->pixels();
|
||||
|
||||
// TODO - is this fast enough?
|
||||
if(!myUsePhosphor)
|
||||
|
@ -434,8 +434,8 @@ void FrameBufferGL::drawMediaSource()
|
|||
// And blit the surface
|
||||
if(myDirtyFlag)
|
||||
{
|
||||
myTiaSurface->addDirtyRect(0, 0, 0, 0);
|
||||
myTiaSurface->update();
|
||||
myBaseSurface->addDirtyRect(0, 0, 0, 0);
|
||||
myBaseSurface->update();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -465,7 +465,7 @@ void FrameBufferGL::enablePhosphor(bool enable, int blend)
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
Uint32 FrameBufferGL::mapRGB(Uint8 r, Uint8 g, Uint8 b) const
|
||||
{
|
||||
return myTiaSurface->mapRGB(r, g, b);
|
||||
return myBaseSurface->mapRGB(r, g, b);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: FrameBufferGL.hxx,v 1.59 2008-12-08 18:56:53 stephena Exp $
|
||||
// $Id: FrameBufferGL.hxx,v 1.60 2008-12-10 18:11:21 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#ifndef FRAMEBUFFER_GL_HXX
|
||||
|
@ -35,7 +35,7 @@ class FBSurfaceGL;
|
|||
This class implements an SDL OpenGL framebuffer.
|
||||
|
||||
@author Stephen Anthony
|
||||
@version $Id: FrameBufferGL.hxx,v 1.59 2008-12-08 18:56:53 stephena Exp $
|
||||
@version $Id: FrameBufferGL.hxx,v 1.60 2008-12-10 18:11:21 stephena Exp $
|
||||
*/
|
||||
class FrameBufferGL : public FrameBuffer
|
||||
{
|
||||
|
@ -151,8 +151,8 @@ class FrameBufferGL : public FrameBuffer
|
|||
bool loadFuncs();
|
||||
|
||||
private:
|
||||
// The TIA surface (wraps an SDL surface)
|
||||
FBSurfaceGL* myTiaSurface;
|
||||
// The lower-most base surface (could be TIA or dialog-based)
|
||||
FBSurfaceGL* myBaseSurface;
|
||||
|
||||
/*
|
||||
// Holds all items specifically needed by GL commands
|
||||
|
@ -201,7 +201,7 @@ class FrameBufferGL : public FrameBuffer
|
|||
A surface suitable for OpenGL rendering mode.
|
||||
|
||||
@author Stephen Anthony
|
||||
@version $Id: FrameBufferGL.hxx,v 1.59 2008-12-08 18:56:53 stephena Exp $
|
||||
@version $Id: FrameBufferGL.hxx,v 1.60 2008-12-10 18:11:21 stephena Exp $
|
||||
*/
|
||||
class FBSurfaceGL : public FBSurface
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue