mirror of
https://github.com/jmarshall23/DoomRTX.git
synced 2026-08-18 11:44:51 +02:00
DXR raytracing now works in the preview window.
This commit is contained in:
@@ -705,7 +705,7 @@ EndFrame
|
||||
Returns the number of msec spent in the back end
|
||||
=============
|
||||
*/
|
||||
void idRenderSystemLocal::EndFrame( int *frontEndMsec, int *backEndMsec ) {
|
||||
void idRenderSystemLocal::EndFrame( int *frontEndMsec, int *backEndMsec, bool swapBuffer) {
|
||||
emptyCommand_t *cmd;
|
||||
|
||||
if ( !glConfig.isInitialized ) {
|
||||
@@ -734,8 +734,11 @@ void idRenderSystemLocal::EndFrame( int *frontEndMsec, int *backEndMsec ) {
|
||||
GL_CheckErrors();
|
||||
|
||||
// add the swapbuffers command
|
||||
cmd = (emptyCommand_t *)R_GetCommandBuffer( sizeof( *cmd ) );
|
||||
cmd->commandId = RC_SWAP_BUFFERS;
|
||||
if (swapBuffer)
|
||||
{
|
||||
cmd = (emptyCommand_t*)R_GetCommandBuffer(sizeof(*cmd));
|
||||
cmd->commandId = RC_SWAP_BUFFERS;
|
||||
}
|
||||
|
||||
// start the back end up again with the new command list
|
||||
R_IssueRenderCommands();
|
||||
|
||||
@@ -235,7 +235,7 @@ public:
|
||||
virtual void BeginFrame( int windowWidth, int windowHeight ) = 0;
|
||||
|
||||
// if the pointers are not NULL, timing info will be returned
|
||||
virtual void EndFrame( int *frontEndMsec, int *backEndMsec ) = 0;
|
||||
virtual void EndFrame( int *frontEndMsec, int *backEndMsec, bool swapBuffer = true) = 0;
|
||||
|
||||
// aviDemo uses this.
|
||||
// Will automatically tile render large screen shots if necessary
|
||||
|
||||
@@ -719,7 +719,7 @@ public:
|
||||
virtual void WriteDemoPics();
|
||||
virtual void DrawDemoPics();
|
||||
virtual void BeginFrame( int windowWidth, int windowHeight );
|
||||
virtual void EndFrame( int *frontEndMsec, int *backEndMsec );
|
||||
virtual void EndFrame( int *frontEndMsec, int *backEndMsec, bool swapBuffer = true );
|
||||
virtual void TakeScreenshot( int width, int height, const char *fileName, int downSample, renderView_t *ref );
|
||||
virtual void CropRenderSize( int width, int height, bool makePowerOfTwo = false, bool forceDimensions = false );
|
||||
virtual void CaptureRenderToImage( const char *imageName );
|
||||
|
||||
Reference in New Issue
Block a user