Add RageDisplay::Update().

ResolutionChanged() is now called by the LowLevelWindow when
the res changes, instead of the other way around.
This commit is contained in:
Glenn Maynard
2003-04-12 02:28:26 +00:00
parent 98628c554b
commit 60dc76cff8
2 changed files with 10 additions and 11 deletions
+8 -10
View File
@@ -111,6 +111,11 @@ RageDisplay::RageDisplay( bool windowed, int width, int height, int bpp, int rat
LOG->Info("Packed pixel formats are known to cause problems with this driver."); LOG->Info("Packed pixel formats are known to cause problems with this driver.");
} }
void RageDisplay::Update(float fDeltaTime)
{
wind->Update(fDeltaTime);
}
bool RageDisplay::IsSoftwareRenderer() bool RageDisplay::IsSoftwareRenderer()
{ {
return return
@@ -231,15 +236,10 @@ bool RageDisplay::SetVideoMode( bool windowed, int width, int height, int bpp, i
/* Set vsync the Windows way, if we can. (What other extensions are there /* Set vsync the Windows way, if we can. (What other extensions are there
* to do this, for other archs?) */ * to do this, for other archs?) */
if(m_oglspecs->WGL_EXT_swap_control) { if(m_oglspecs->WGL_EXT_swap_control)
GLExt::wglSwapIntervalEXT(vsync); GLExt::wglSwapIntervalEXT(vsync);
}
SetViewport(0,0); ResolutionChanged();
/* Clear any junk that's in the framebuffer. */
Clear();
Flip();
return NewOpenGLContext; return NewOpenGLContext;
} }
@@ -308,10 +308,8 @@ void RageDisplay::DumpOpenGLDebugInfo()
#endif #endif
} }
void RageDisplay::ResolutionChanged(int width, int height) void RageDisplay::ResolutionChanged()
{ {
wind->ResolutionChanged(width, height);
SetViewport(0,0); SetViewport(0,0);
/* Clear any junk that's in the framebuffer. */ /* Clear any junk that's in the framebuffer. */
+2 -1
View File
@@ -28,13 +28,14 @@ class RageDisplay
public: public:
RageDisplay( bool windowed, int width, int height, int bpp, int rate, bool vsync ); RageDisplay( bool windowed, int width, int height, int bpp, int rate, bool vsync );
~RageDisplay(); ~RageDisplay();
void Update(float fDeltaTime);
bool IsSoftwareRenderer(); bool IsSoftwareRenderer();
bool SetVideoMode( bool windowed, int width, int height, int bpp, int rate, bool vsync ); bool SetVideoMode( bool windowed, int width, int height, int bpp, int rate, bool vsync );
/* Call this when the resolution has been changed externally: */ /* Call this when the resolution has been changed externally: */
void ResolutionChanged(int width, int height); void ResolutionChanged();
void Clear(); void Clear();
void Flip(); void Flip();