本文整理匯總了C++中GLimp_LogComment函數的典型用法代碼示例。如果您正苦於以下問題:C++ GLimp_LogComment函數的具體用法?C++ GLimp_LogComment怎麽用?C++ GLimp_LogComment使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了GLimp_LogComment函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: FBO_Bind
/*
============
FBO_Bind
============
*/
void FBO_Bind(FBO_t * fbo)
{
if (glState.currentFBO == fbo)
return;
if (r_logFile->integer)
{
// don't just call LogComment, or we will get a call to va() every frame!
if (fbo)
GLimp_LogComment(va("--- FBO_Bind( %s ) ---\n", fbo->name));
else
GLimp_LogComment("--- FBO_Bind ( NULL ) ---\n");
}
if (!fbo)
{
qglBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
//qglBindRenderbufferEXT(GL_RENDERBUFFER_EXT, 0);
glState.currentFBO = NULL;
return;
}
qglBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbo->frameBuffer);
/*
if(fbo->colorBuffers[0])
{
qglBindRenderbufferEXT(GL_RENDERBUFFER_EXT, fbo->colorBuffers[0]);
}
*/
/*
if(fbo->depthBuffer)
{
qglBindRenderbufferEXT(GL_RENDERBUFFER_EXT, fbo->depthBuffer);
qglFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, fbo->depthBuffer);
}
*/
glState.currentFBO = fbo;
}
示例2: RB_EndSurface
/*
===================
RB_EndSurface
===================
*/
void RB_EndSurface(void)
{
shaderCommands_t *input = &tess;
if (input->numIndexes == 0)
{
return;
}
if (input->indexes[input->maxShaderIndicies - 1] != 0)
{
ri.Error(ERR_DROP, "RB_EndSurface() - input->maxShaderIndicies(%i) hit", input->maxShaderIndicies);
}
if (input->xyz[input->maxShaderVerts - 1].v[0] != 0)
{
ri.Error(ERR_DROP, "RB_EndSurface() - input->maxShaderVerts(%i) hit", input->maxShaderVerts);
}
if (tess.shader == tr.shadowShader)
{
RB_ShadowTessEnd();
return;
}
// for debugging of sort order issues, stop rendering after a given sort value
if (r_debugSort->integer && r_debugSort->integer < tess.shader->sort)
{
return;
}
// update performance counters
backEnd.pc.c_shaders++;
backEnd.pc.c_vertexes += tess.numVertexes;
backEnd.pc.c_indexes += tess.numIndexes;
backEnd.pc.c_totalIndexes += tess.numIndexes * tess.numPasses;
// call off to shader specific tess end function
tess.currentStageIteratorFunc();
// draw debugging stuff
if (r_showtris->integer)
{
DrawTris(input);
}
if (r_shownormals->integer)
{
DrawNormals(input);
}
// clear shader so we can tell we don't have any unclosed surfaces
tess.numIndexes = 0;
GLimp_LogComment("----------\n");
}
示例3: R_BindNullIBO
/*
============
R_BindNullIBO
============
*/
void R_BindNullIBO()
{
GLimp_LogComment( "--- R_BindNullIBO ---\n" );
if ( glState.currentIBO )
{
glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, 0 );
glState.currentIBO = nullptr;
glState.vertexAttribPointersSet = 0;
}
}
示例4: R_BindNullIBO
/*
============
R_BindNullIBO
============
*/
void R_BindNullIBO(void)
{
GLimp_LogComment("--- R_BindNullIBO ---\n");
if(glState.currentIBO)
{
qglBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, 0);
glState.currentIBO = NULL;
glState.vertexAttribPointersSet = 0;
}
}
示例5: R_BindNullVBO
/*
============
R_BindNullVBO
============
*/
void R_BindNullVBO()
{
GLimp_LogComment( "--- R_BindNullVBO ---\n" );
if ( glState.currentVBO )
{
glBindBuffer( GL_ARRAY_BUFFER, 0 );
glState.currentVBO = nullptr;
}
GL_CheckErrors();
}
示例6: RB_EndSurface
/*
=============
RB_SwapBuffers
=============
*/
const void *RB_SwapBuffers( const void *data ) {
const swapBuffersCommand_t *cmd;
// finish any 2D drawing if needed
if ( tess.numIndexes ) {
RB_EndSurface();
}
// texture swapping test
if ( r_showImages->integer ) {
RB_ShowImages();
}
cmd = (const swapBuffersCommand_t *)data;
// we measure overdraw by reading back the stencil buffer and
// counting up the number of increments that have happened
#ifndef USE_OPENGLES
if ( r_measureOverdraw->integer ) {
int i;
long sum = 0;
unsigned char *stencilReadback;
stencilReadback = ri.Hunk_AllocateTempMemory( glConfig.vidWidth * glConfig.vidHeight );
qglReadPixels( 0, 0, glConfig.vidWidth, glConfig.vidHeight, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, stencilReadback );
for ( i = 0; i < glConfig.vidWidth * glConfig.vidHeight; i++ ) {
sum += stencilReadback[i];
}
backEnd.pc.c_overDraw += sum;
ri.Hunk_FreeTempMemory( stencilReadback );
}
#endif
if ( !glState.finishCalled ) {
qglFinish();
}
GLimp_LogComment( "***************** RB_SwapBuffers *****************\n\n\n" );
GLimp_EndFrame();
backEnd.projection2D = qfalse;
#ifdef USE_BLOOM
backEnd.doneBloom = qfalse;
backEnd.doneSurfaces = qfalse;
#endif
return (const void *)( cmd + 1 );
}
示例7: R_BindNullVBO
/*
============
R_BindNullVBO
============
*/
void R_BindNullVBO(void)
{
GLimp_LogComment("--- R_BindNullVBO ---\n");
if(glState.currentVBO)
{
qglBindBufferARB(GL_ARRAY_BUFFER_ARB, 0);
glState.currentVBO = NULL;
}
GL_CheckErrors();
}
示例8: GL_SelectTexture
/*
** GL_SelectTexture
*/
void GL_SelectTexture( int unit ) {
if ( glState.currenttmu == unit ) {
return;
}
if ( unit == 0 ) {
qglActiveTextureARB( GL_TEXTURE0_ARB );
GLimp_LogComment( "glActiveTextureARB( GL_TEXTURE0_ARB )\n" );
qglClientActiveTextureARB( GL_TEXTURE0_ARB );
GLimp_LogComment( "glClientActiveTextureARB( GL_TEXTURE0_ARB )\n" );
} else if ( unit == 1 ) {
qglActiveTextureARB( GL_TEXTURE1_ARB );
GLimp_LogComment( "glActiveTextureARB( GL_TEXTURE1_ARB )\n" );
qglClientActiveTextureARB( GL_TEXTURE1_ARB );
GLimp_LogComment( "glClientActiveTextureARB( GL_TEXTURE1_ARB )\n" );
} else {
ri.Error( ERR_DROP, "GL_SelectTexture: unit = %i", unit );
}
glState.currenttmu = unit;
}
示例9: Tess_InstantQuad
/*
==============
Tess_InstantQuad
==============
*/
void Tess_InstantQuad( vec4_t quadVerts[ 4 ] )
{
GLimp_LogComment( "--- Tess_InstantQuad ---\n" );
tess.multiDrawPrimitives = 0;
tess.numVertexes = 0;
tess.numIndexes = 0;
tess.attribsSet = 0;
Tess_MapVBOs( false );
VectorCopy( quadVerts[ 0 ], tess.verts[ tess.numVertexes ].xyz );
Vector4Set( tess.verts[ tess.numVertexes ].color, 255, 255, 255, 255 );
tess.verts[ tess.numVertexes ].texCoords[ 0 ] = floatToHalf( 0.0f );
tess.verts[ tess.numVertexes ].texCoords[ 1 ] = floatToHalf( 0.0f );
tess.numVertexes++;
VectorCopy( quadVerts[ 1 ], tess.verts[ tess.numVertexes ].xyz );
Vector4Set( tess.verts[ tess.numVertexes ].color, 255, 255, 255, 255 );
tess.verts[ tess.numVertexes ].texCoords[ 0 ] = floatToHalf( 1.0f );
tess.verts[ tess.numVertexes ].texCoords[ 1 ] = floatToHalf( 0.0f );
tess.numVertexes++;
VectorCopy( quadVerts[ 2 ], tess.verts[ tess.numVertexes ].xyz );
Vector4Set( tess.verts[ tess.numVertexes ].color, 255, 255, 255, 255 );
tess.verts[ tess.numVertexes ].texCoords[ 0 ] = floatToHalf( 1.0f );
tess.verts[ tess.numVertexes ].texCoords[ 1 ] = floatToHalf( 1.0f );
tess.numVertexes++;
VectorCopy( quadVerts[ 3 ], tess.verts[ tess.numVertexes ].xyz );
Vector4Set( tess.verts[ tess.numVertexes ].color, 255, 255, 255, 255 );
tess.verts[ tess.numVertexes ].texCoords[ 0 ] = floatToHalf( 0.0f );
tess.verts[ tess.numVertexes ].texCoords[ 1 ] = floatToHalf( 1.0f );
tess.numVertexes++;
tess.indexes[ tess.numIndexes++ ] = 0;
tess.indexes[ tess.numIndexes++ ] = 1;
tess.indexes[ tess.numIndexes++ ] = 2;
tess.indexes[ tess.numIndexes++ ] = 0;
tess.indexes[ tess.numIndexes++ ] = 2;
tess.indexes[ tess.numIndexes++ ] = 3;
Tess_UpdateVBOs( );
GL_VertexAttribsState( ATTR_POSITION | ATTR_TEXCOORD | ATTR_COLOR );
Tess_DrawElements();
tess.multiDrawPrimitives = 0;
tess.numVertexes = 0;
tess.numIndexes = 0;
tess.attribsSet = 0;
GL_CheckErrors();
}
示例10: GLSL_BindNullProgram
void GLSL_BindNullProgram(void)
{
if(r_logFile->integer)
{
GLimp_LogComment("--- GL_BindNullProgram ---\n");
}
if(glState.currentProgram)
{
qglUseProgramObjectARB(0);
glState.currentProgram = NULL;
}
}
示例11: Tess_SurfaceEntity
/*
====================
Tess_SurfaceEntity
Entities that have a single procedurally generated surface
====================
*/
static void Tess_SurfaceEntity( surfaceType_t* )
{
GLimp_LogComment( "--- Tess_SurfaceEntity ---\n" );
switch ( backEnd.currentEntity->e.reType )
{
case RT_SPRITE:
Tess_SurfaceSprite();
break;
default:
break;
}
}
示例12: GLSL_BindProgram
void GLSL_BindProgram(shaderProgram_t * program)
{
GLuint programObject = program ? program->program : 0;
char *name = program ? program->name : "NULL";
if(r_logFile->integer)
{
// don't just call LogComment, or we will get a call to va() every frame!
GLimp_LogComment(va("--- GLSL_BindProgram( %s ) ---\n", name));
}
if (GL_UseProgramObject(programObject))
backEnd.pc.c_glslShaderBinds++;
}
示例13: FBO_Bind
/*
============
FBO_Bind
============
*/
void FBO_Bind(FBO_t * fbo)
{
if (glState.currentFBO == fbo)
return;
if (r_logFile->integer)
{
// don't just call LogComment, or we will get a call to va() every frame!
GLimp_LogComment(va("--- FBO_Bind( %s ) ---\n", fbo ? fbo->name : "NULL"));
}
GL_BindFramebuffer(GL_FRAMEBUFFER_EXT, fbo ? fbo->frameBuffer : 0);
glState.currentFBO = fbo;
}
示例14: R_BindNullFBO
/*
============
R_BindNullFBO
============
*/
void R_BindNullFBO( void )
{
if ( r_logFile->integer )
{
GLimp_LogComment( "--- R_BindNullFBO ---\n" );
}
if ( glState.currentFBO )
{
glBindFramebufferEXT( GL_FRAMEBUFFER_EXT, 0 );
glBindRenderbufferEXT( GL_RENDERBUFFER_EXT, 0 );
glState.currentFBO = NULL;
}
}
示例15: GLimp_LogComment
/*
=============
RB_SetColor
=============
*/
const void *RB_SetColor( const void *data )
{
const setColorCommand_t *cmd;
GLimp_LogComment( "--- RB_SetColor ---\n" );
cmd = ( const setColorCommand_t * ) data;
backEnd.color2D[ 0 ] = cmd->color[ 0 ];
backEnd.color2D[ 1 ] = cmd->color[ 1 ];
backEnd.color2D[ 2 ] = cmd->color[ 2 ];
backEnd.color2D[ 3 ] = cmd->color[ 3 ];
return ( const void * )( cmd + 1 );
}