本文整理汇总了C++中R_IssueRenderCommands函数的典型用法代码示例。如果您正苦于以下问题:C++ R_IssueRenderCommands函数的具体用法?C++ R_IssueRenderCommands怎么用?C++ R_IssueRenderCommands使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了R_IssueRenderCommands函数的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: RE_EndFrame
/*
=============
RE_EndFrame
Returns the number of msec spent in the back end
=============
*/
void RE_EndFrame( int *frontEndMsec, int *backEndMsec ) {
swapBuffersCommand_t *cmd;
//printf("here 2a\n");
if ( !tr.registered ) {
printf("tr.registered == false\n");
return;
}
//printf("here 2b\n");
cmd = R_GetCommandBuffer( sizeof( *cmd ) );
if ( !cmd ) {
printf("R_GetCommandBuffer == 0\n");
return;
}
cmd->commandId = RC_SWAP_BUFFERS;
//printf("here 2c\n");
R_IssueRenderCommands( qtrue );
//printf("here 2d\n");
// use the other buffers next frame, because another CPU
// may still be rendering into the current ones
R_ToggleSmpFrame();
//printf("here 2e\n");
if ( frontEndMsec ) {
*frontEndMsec = tr.frontEndMsec;
}
tr.frontEndMsec = 0;
if ( backEndMsec ) {
*backEndMsec = backEnd.pc.msec;
}
backEnd.pc.msec = 0;
//printf("here 2f\n");
}
开发者ID:elhobbs,项目名称:quake3,代码行数:42,代码来源:tr_cmds.c
示例2: RE_EndFrame
/*
=============
RE_EndFrame
Returns the number of msec spent in the back end
=============
*/
void RE_EndFrame(int *frontEndMsec, int *backEndMsec)
{
renderCommandList_t *cmdList;
if (!tr.registered)
{
return;
}
// Needs to use reserved space, so no R_GetCommandBuffer.
cmdList = &backEndData->commands;
assert(cmdList);
// add swap-buffers command
*( int * )(cmdList->cmds + cmdList->used) = RC_SWAP_BUFFERS;
cmdList->used += sizeof(swapBuffersCommand_t);
R_IssueRenderCommands(qtrue);
// use the other buffers next frame, because another CPU
// may still be rendering into the current ones
R_InitNextFrame();
if (frontEndMsec)
{
*frontEndMsec = tr.frontEndMsec;
}
tr.frontEndMsec = 0;
if (backEndMsec)
{
*backEndMsec = backEnd.pc.msec;
}
backEnd.pc.msec = 0;
}
开发者ID:Mailaender,项目名称:etlegacy,代码行数:41,代码来源:tr_cmds.c
示例3: R_IssueRenderCommands
/*
==============
CaptureRenderToFile
==============
*/
void idRenderSystemLocal::CaptureRenderToFile( const char *fileName, bool fixAlpha ) {
if ( !glConfig.isInitialized ) {
return;
}
renderCrop_t *rc = &renderCrops[currentRenderCrop];
guiModel->EmitFullScreen();
guiModel->Clear();
R_IssueRenderCommands();
qglReadBuffer( GL_BACK );
// include extra space for OpenGL padding to word boundaries
int c = ( rc->width + 3 ) * rc->height;
byte *data = (byte *)R_StaticAlloc( c * 3 );
qglReadPixels( rc->x, rc->y, rc->width, rc->height, GL_RGB, GL_UNSIGNED_BYTE, data );
byte *data2 = (byte *)R_StaticAlloc( c * 4 );
for ( int i = 0 ; i < c ; i++ ) {
data2[ i * 4 ] = data[ i * 3 ];
data2[ i * 4 + 1 ] = data[ i * 3 + 1 ];
data2[ i * 4 + 2 ] = data[ i * 3 + 2 ];
data2[ i * 4 + 3 ] = 0xff;
}
R_WriteTGA( fileName, data2, rc->width, rc->height, true );
R_StaticFree( data );
R_StaticFree( data2 );
}
开发者ID:Deepfreeze32,项目名称:idtech4cdk,代码行数:39,代码来源:RenderSystem.cpp
示例4: RE_EndFrame
/*
=============
RE_EndFrame
Returns the number of msec spent in the back end
=============
*/
void RE_EndFrame( int *frontEndMsec, int *backEndMsec ) {
swapBuffersCommand_t *cmd;
if ( !tr.registered ) {
return;
}
cmd = (swapBuffersCommand_t *) R_GetCommandBuffer( sizeof( *cmd ) );
if ( !cmd ) {
return;
}
cmd->commandId = RC_SWAP_BUFFERS;
R_IssueRenderCommands( qtrue );
// use the other buffers next frame, because another CPU
// may still be rendering into the current ones
R_ToggleSmpFrame();
if ( frontEndMsec ) {
*frontEndMsec = tr.frontEndMsec;
}
tr.frontEndMsec = 0;
if ( backEndMsec ) {
*backEndMsec = backEnd.pc.msec;
}
backEnd.pc.msec = 0;
for(int i=0;i<MAX_LIGHT_STYLES;i++)
{
styleUpdated[i] = false;
}
}
开发者ID:Cancerous,项目名称:massive-tyrion,代码行数:39,代码来源:tr_cmds.cpp
示例5: RE_EndFrame
/*
=============
RE_EndFrame
Returns the number of msec spent in the back end
=============
*/
void RE_EndFrame( int *frontEndMsec, int *backEndMsec ) {
swapBuffersCommand_t *cmd;
if ( !tr.registered ) {
return;
}
cmd = (swapBuffersCommand_t *) R_GetCommandBuffer( sizeof( *cmd ) );
if ( !cmd ) {
return;
}
cmd->commandId = RC_SWAP_BUFFERS;
R_IssueRenderCommands( qtrue );
// use the other buffers next frame, because another CPU
// may still be rendering into the current ones
R_InitNextFrame();
if ( frontEndMsec ) {
*frontEndMsec = tr.frontEndMsec;
}
tr.frontEndMsec = 0;
if ( backEndMsec ) {
*backEndMsec = backEnd.pc.msec;
}
backEnd.pc.msec = 0;
}
开发者ID:Wookiee-,项目名称:jaPRO,代码行数:34,代码来源:tr_cmds.cpp
示例6: R_IssuePendingRenderCommands
/*
====================
R_IssuePendingRenderCommands
Issue any pending commands and wait for them to complete.
====================
*/
void R_IssuePendingRenderCommands( void ) {
if ( !tr.registered ) {
return;
}
R_IssueRenderCommands( qfalse );
}
开发者ID:MAN-AT-ARMS,项目名称:iortcw-archive,代码行数:14,代码来源:tr_cmds.c
示例7: RE_EndFrame
/*
=============
RE_EndFrame
Returns the number of msec spent in the back end
=============
*/
void RE_EndFrame( int *frontEndMsec, int *backEndMsec ) {
swapBuffersCommand_t *cmd;
if ( !tr.registered ) {
return;
}
cmd = R_GetCommandBuffer( sizeof( *cmd ) );
if ( !cmd ) {
return;
}
cmd->commandId = RC_SWAP_BUFFERS;
R_IssueRenderCommands( qtrue );
R_InitNextFrame();
if ( frontEndMsec ) {
*frontEndMsec = tr.frontEndMsec;
}
tr.frontEndMsec = 0;
if ( backEndMsec ) {
*backEndMsec = backEnd.pc.msec;
}
backEnd.pc.msec = 0;
}
开发者ID:mecwerks,项目名称:spearmint-ios,代码行数:32,代码来源:tr_cmds.c
示例8: R_SyncRenderThread
/*
====================
R_SyncRenderThread
Issue any pending commands and wait for them to complete.
After exiting, the render thread will have completed its work
and will remain idle and the main thread is free to issue
OpenGL calls until R_IssueRenderCommands is called.
====================
*/
void R_SyncRenderThread( void ) {
#ifndef _XBOX
if ( !tr.registered ) {
return;
}
R_IssueRenderCommands( qfalse );
#endif
}
开发者ID:Camron,项目名称:OpenJK,代码行数:18,代码来源:tr_cmds.cpp
示例9: R_SyncRenderThread
/*
====================
R_SyncRenderThread
Issue any pending commands and wait for them to complete.
After exiting, the render thread will have completed its work
and will remain idle and the main thread is free to issue
OpenGL calls until R_IssueRenderCommands is called.
====================
*/
void R_SyncRenderThread( void ) {
if ( !tr.registered ) {
return;
}
R_IssueRenderCommands( qfalse );
if ( !glConfig.smpActive ) {
return;
}
GLimp_FrontEndSleep();
}
开发者ID:entdark,项目名称:q3mme,代码行数:21,代码来源:tr_cmds.c
示例10: R_PerformanceCounters
/*
=============
EndFrame
Returns the number of msec spent in the back end
=============
*/
void idRenderSystemLocal::EndFrame( int *frontEndMsec, int *backEndMsec, bool swapFrontBack ) {
emptyCommand_t *cmd;
if ( !glConfig.isInitialized ) {
return;
}
// close any gui drawing
guiModel->EmitFullScreen();
guiModel->Clear();
// save out timing information
if ( frontEndMsec ) {
*frontEndMsec = pc.frontEndMsec;
}
if ( backEndMsec ) {
*backEndMsec = backEnd.pc.msec;
}
// print any other statistics and clear all of them
R_PerformanceCounters();
// check for dynamic changes that require some initialization
R_CheckCvars();
// check for errors
GL_CheckErrors();
// add the swapbuffers command
if(swapFrontBack)
{
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();
// use the other buffers next frame, because another CPU
// may still be rendering into the current buffers
R_ToggleSmpFrame();
// we can now release the vertexes used this frame
vertexCache.EndFrame();
if ( session->writeDemo ) {
session->writeDemo->WriteInt( DS_RENDER );
session->writeDemo->WriteInt( DC_END_FRAME );
if ( r_showDemo.GetBool() ) {
common->Printf( "write DC_END_FRAME\n" );
}
}
}
开发者ID:Deepfreeze32,项目名称:idtech4cdk,代码行数:61,代码来源:RenderSystem.cpp
示例11: R_SyncRenderThread
/*
====================
R_SyncRenderThread
Issue any pending commands and wait for them to complete.
After exiting, the render thread will have completed its work
and will remain idle and the main thread is free to issue
OpenGL calls until R_IssueRenderCommands is called.
====================
*/
void R_SyncRenderThread() {
if (!tr.registered) {
return;
}
R_IssueRenderCommands(false);
if (!glConfig.smpActive) {
return;
}
GLimp_SyncRenderThread();
}
开发者ID:Kangz,项目名称:Unvanquished,代码行数:23,代码来源:tr_cmds.cpp
示例12: memset
frameInfo_t idRenderSystemLocal::LocalEndFrame() {
frameInfo_t info;
memset(&info, 0, sizeof(info));
if (!glConfig.isInitialized) {
return info;
}
// close any gui drawing
guiModel->EmitFullScreen();
guiModel->Clear();
// save out timing information
info.time.frontEndMsec = pc.frontEndMsec;
info.time.backEndMsec = backEnd.pc.msec;
// print any other statistics and clear all of them
R_PerformanceCounters();
// check for errors
GL_CheckErrors(false);
// add the swapbuffers command
auto cmd = R_GetCommandBuffer<emptyCommand_t>();
cmd->commandId = RC_SWAP_BUFFERS;
// start the back end up again with the new command list
info.framebuffer = R_IssueRenderCommands();
// use the other buffers next frame, because another CPU
// may still be rendering into the current buffers
R_ToggleSmpFrame();
// we can now release the vertexes used this frame
vertexCache.EndFrame();
if (session->writeDemo) {
session->writeDemo->WriteInt(DS_RENDER);
session->writeDemo->WriteInt(DC_END_FRAME);
if (r_showDemo.GetBool()) {
common->Printf("write DC_END_FRAME\n");
}
}
return info;
}
开发者ID:RobertBeckebans,项目名称:fhDOOM,代码行数:46,代码来源:RenderSystem.cpp
示例13: RE_EndFrame
/*
=============
RE_EndFrame
Returns the number of msec spent in the back end
=============
*/
void RE_EndFrame( int *frontEndMsec, int *backEndMsec )
{
swapBuffersCommand_t *cmd;
if ( !tr.registered )
{
return;
}
GLimp_HandleCvars();
cmd = (swapBuffersCommand_t*) R_GetCommandBuffer( sizeof( *cmd ) );
if ( !cmd )
{
return;
}
cmd->commandId = RC_SWAP_BUFFERS;
R_IssueRenderCommands( qtrue );
// use the other buffers next frame, because another CPU
// may still be rendering into the current ones
R_ToggleSmpFrame();
// update the results of the vis tests
R_UpdateVisTests();
if ( frontEndMsec )
{
*frontEndMsec = tr.frontEndMsec;
}
tr.frontEndMsec = 0;
if ( backEndMsec )
{
*backEndMsec = backEnd.pc.msec;
}
backEnd.pc.msec = 0;
}
开发者ID:Foe-of-Eternity,项目名称:Unvanquished,代码行数:50,代码来源:tr_cmds.cpp
示例14: RE_EndFrame
/*
=============
RE_EndFrame
Returns the number of msec spent in the back end
=============
*/
void RE_EndFrame( int *frontEndMsec, int *backEndMsec ) {
if ( !tr.registered ) {
return;
}
if ( !R_GetCommandBuffer( RC_SWAP_BUFFERS, 0 ) ) {
return;
}
R_IssueRenderCommands( qtrue );
// use the other buffers next frame, because another CPU
// may still be rendering into the current ones
R_ToggleSmpFrame();
if ( frontEndMsec ) {
*frontEndMsec = tr.frontEndMsec;
}
tr.frontEndMsec = 0;
if ( backEndMsec ) {
*backEndMsec = backEnd.pc.msec;
}
backEnd.pc.msec = 0;
}
开发者ID:entdark,项目名称:q3mme,代码行数:29,代码来源:tr_cmds.c
示例15: R_GenerateReflectionRawData
void __cdecl R_GenerateReflectionRawData(DiskGfxReflectionProbe* probeRawData)
{
if (!*g_ffDir)
{
sprintf_s(g_ffDir, "%s/%s/", Dvar_GetString("fs_basepath"), Dvar_GetString("fs_game"));
}
refdef_s refdef;
char* ptr = *((char**)0x02FF5354);
refdef_s* refsrc = (refdef_s*)(ptr + 0x8C100);
memcpy(&refdef, refsrc, sizeof(refdef_s));
refdef.vieworg[1] = probeRawData->origin[0];
refdef.vieworg[2] = probeRawData->origin[1];
refdef.yaw = probeRawData->origin[2];
R_InitPrimaryLights(refdef.primaryLights[0].dir);
for (int cubemapShot = 1; cubemapShot < 7; cubemapShot++)
{
R_BeginCubemapShot(256, 0);
R_BeginFrame();
GfxCmdArray* s_cmdList = *(GfxCmdArray**)0x03B370C0;
GfxBackEndData* frontEndDataOut = *(GfxBackEndData**)0x03B3708C;
frontEndDataOut->cmds = &s_cmdList->cmds[s_cmdList->usedTotal];
frontEndDataOut->viewInfo[frontEndDataOut->viewInfoCount].cmds = NULL;
R_ClearScene(0);
FX_BeginUpdate(0);
R_CalcCubeMapViewValues(&refdef, cubemapShot, 256);
float* vec = (float*)0x3AC3060;
vec[0] = refdef.vieworg[0];
vec[1] = refdef.vieworg[1];
vec[2] = refdef.vieworg[2];
int* unk1 = (int*)0x3AC3058; *unk1 = refdef.time;
float* unk2 = (float*)0x3AC305C; *unk2 = refdef.time * 0.001f;
R_UpdateFrameFog(refdef.localClientNum);
R_UpdateFrameSun();
float zFar = R_GetFarPlaneDist();
FxCameraUpdate fxUpdateCmd;
memset(&fxUpdateCmd, 0, sizeof(FxCameraUpdate));
FxCmd cmd;
memset(&cmd, 0, sizeof(FxCmd));
FX_GetCameraUpdateFromRefdefAndZFar(&fxUpdateCmd, &refdef, zFar);
FX_SetNextUpdateCamera(0, &fxUpdateCmd);
FX_FillUpdateCmd(0, &cmd);
Sys_ResetUpdateSpotLightEffectEvent();
Sys_AddWorkerCmdInternal((void*)0x00BA5420, &cmd, 0);
Sys_ResetUpdateNonDependentEffectsEvent();
Sys_AddWorkerCmdInternal((void*)0x00BA52E0, &cmd, 0);
Sys_AddWorkerCmdInternal((void*)0x00BA5300, &cmd, 0);
Sys_AddWorkerCmdInternal((void*)0x00BA5330, &cmd, 0);
R_RenderScene(&refdef, 0);
R_EndFrame();
R_IssueRenderCommands(3);
R_EndCubemapShot(cubemapShot);
}
R_CreateReflectionRawDataFromCubemapShot(probeRawData);
}
开发者ID:akiraaisha,项目名称:LinkerMod,代码行数:68,代码来源:reflection_fix.cpp
示例16: RE_EndFrame
void RE_EndFrame( int *frontEndMsec, int *backEndMsec ) {
swapBuffersCommand_t *cmd;
float x;
float y;
float w;
float h;
GLuint texID;
static int b = 0;
if ( !tr.registered ) {
return;
}
cmd = R_GetCommandBuffer( sizeof( *cmd ) );
if ( !cmd ) {
return;
}
cmd->commandId = RC_SWAP_BUFFERS;
R_IssueRenderCommands( qtrue );
//*** Rift post processing
if (vr_warpingShader->integer)
{
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, 0);
if (!backEnd.projection2D)
{
RB_SetGL2D();
}
glViewport(0, 0, glConfig.vidWidth, glConfig.vidHeight); // Render on the whole framebuffer, complete from the lower left corner to the upper right
// Use our shader
glUseProgram(glConfig.oculusProgId);
glEnable(GL_TEXTURE_2D);
{
float VPX = 0.0f;
float VPY = 0.0f;
float VPW = glConfig.vidWidth; // ViewPort Width
float VPH = glConfig.vidHeight;
SetupShaderDistortion(0, VPX, VPY, VPW, VPH); // Left Eye
}
// Set our "renderedTexture" sampler to user Texture Unit 0
texID = glGetUniformLocation(glConfig.oculusProgId, "texid");
glUniform1i(texID, 0);
qglColor3f( tr.identityLight, tr.identityLight, tr.identityLight );
// if (stereoFrame == STEREO_LEFT)
{
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, glConfig.oculusRenderTargetLeft);
x = 0.0f;
y = 0.0f;
w = glConfig.vidWidth;
h = glConfig.vidHeight;
qglBegin (GL_QUADS);
qglTexCoord2f( 0, 1 );
qglVertex2f( x, y );
qglTexCoord2f( 1, 1 );
qglVertex2f( x + w/2, y );
qglTexCoord2f( 1, 0 );
qglVertex2f( x + w/2, y + h );
qglTexCoord2f( 0, 0 );
qglVertex2f( x, y + h );
qglEnd();
}
//else
{
{
float VPX = 0;
float VPY = 0.0f;
float VPW = glConfig.vidWidth; // ViewPort Width
float VPH = glConfig.vidHeight;
SetupShaderDistortion(1, VPX, VPY, VPW, VPH); // Right Eye
}
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, glConfig.oculusRenderTargetRight);
x = glConfig.vidWidth*0.5f;
y = 0.0f;
w = glConfig.vidWidth;
//.........这里部分代码省略.........
开发者ID:PostalDude,项目名称:vrquake3,代码行数:101,代码来源:tr_cmds.c
示例17: R_SyncRenderThread
/*
====================
R_SyncRenderThread
Issue any pending commands and wait for them to complete.
After exiting, the render thread will have completed its work
and will remain idle and the main thread is free to issue
OpenGL calls until R_IssueRenderCommands is called.
====================
*/
void R_SyncRenderThread( void ) {
if ( !tr.registered ) {
return;
}
R_IssueRenderCommands( qfalse );
}
开发者ID:CairnTrenor,项目名称:OpenJK,代码行数:16,代码来源:tr_cmds.cpp
注:本文中的R_IssueRenderCommands函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论