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:
@@ -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. */
|
||||||
|
|||||||
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user