add concurrent rendering hooks
This commit is contained in:
@@ -157,6 +157,11 @@ public:
|
|||||||
virtual bool SupportsThreadedRendering() { return false; }
|
virtual bool SupportsThreadedRendering() { return false; }
|
||||||
virtual bool SupportsPerVertexMatrixScale() = 0;
|
virtual bool SupportsPerVertexMatrixScale() = 0;
|
||||||
|
|
||||||
|
// If threaded rendering is supported, these will be called from the rendering
|
||||||
|
// thread before and after rendering.
|
||||||
|
virtual void BeginConcurrentRendering() { }
|
||||||
|
virtual void EndConcurrentRendering() { }
|
||||||
|
|
||||||
/* return 0 if failed or internal texture resource handle
|
/* return 0 if failed or internal texture resource handle
|
||||||
* (unsigned in OpenGL, texture pointer in D3D) */
|
* (unsigned in OpenGL, texture pointer in D3D) */
|
||||||
virtual unsigned CreateTexture(
|
virtual unsigned CreateTexture(
|
||||||
|
|||||||
@@ -1606,6 +1606,21 @@ const RageDisplay::PixelFormatDesc *RageDisplay_OGL::GetPixelFormatDesc(PixelFor
|
|||||||
return &PIXEL_FORMAT_DESC[pf];
|
return &PIXEL_FORMAT_DESC[pf];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool RageDisplay_OGL::SupportsThreadedRendering()
|
||||||
|
{
|
||||||
|
return g_pWind->SupportsThreadedRendering();
|
||||||
|
}
|
||||||
|
|
||||||
|
void RageDisplay_OGL::BeginConcurrentRendering()
|
||||||
|
{
|
||||||
|
g_pWind->BeginConcurrentRendering();
|
||||||
|
}
|
||||||
|
|
||||||
|
void RageDisplay_OGL::EndConcurrentRendering()
|
||||||
|
{
|
||||||
|
g_pWind->EndConcurrentRendering();
|
||||||
|
}
|
||||||
|
|
||||||
void RageDisplay_OGL::DeleteTexture( unsigned uTexHandle )
|
void RageDisplay_OGL::DeleteTexture( unsigned uTexHandle )
|
||||||
{
|
{
|
||||||
unsigned int uTexID = uTexHandle;
|
unsigned int uTexID = uTexHandle;
|
||||||
|
|||||||
@@ -15,6 +15,10 @@ public:
|
|||||||
void ResolutionChanged();
|
void ResolutionChanged();
|
||||||
const PixelFormatDesc *GetPixelFormatDesc(PixelFormat pf) const;
|
const PixelFormatDesc *GetPixelFormatDesc(PixelFormat pf) const;
|
||||||
|
|
||||||
|
bool SupportsThreadedRendering();
|
||||||
|
void BeginConcurrentRendering();
|
||||||
|
void EndConcurrentRendering();
|
||||||
|
|
||||||
bool BeginFrame();
|
bool BeginFrame();
|
||||||
void EndFrame();
|
void EndFrame();
|
||||||
VideoModeParams GetActualVideoModeParams() const;
|
VideoModeParams GetActualVideoModeParams() const;
|
||||||
|
|||||||
@@ -25,6 +25,10 @@ public:
|
|||||||
virtual void Update() { }
|
virtual void Update() { }
|
||||||
|
|
||||||
virtual VideoModeParams GetActualVideoModeParams() const = 0;
|
virtual VideoModeParams GetActualVideoModeParams() const = 0;
|
||||||
|
|
||||||
|
virtual bool SupportsThreadedRendering() { return false; }
|
||||||
|
virtual void BeginConcurrentRendering() { }
|
||||||
|
virtual void EndConcurrentRendering() { }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user