• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ GLimp_LogComment函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GLimp_LogComment函数的典型用法代码示例。如果您正苦于以下问题:C++ GLimp_LogComment函数的具体用法?C++ GLimp_LogComment怎么用?C++ GLimp_LogComment使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了GLimp_LogComment函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:alexanderkress,项目名称:ioq3,代码行数:47,代码来源:tr_fbo.c


示例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");
}
开发者ID:ptitSeb,项目名称:etlegacy,代码行数:59,代码来源:tr_shade.c


示例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;
	}
}
开发者ID:norfenstein,项目名称:unvqx,代码行数:16,代码来源:tr_vbo.cpp


示例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;
	}
}
开发者ID:SonnyJim,项目名称:ioq3,代码行数:16,代码来源:tr_vbo.c


示例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();
}
开发者ID:norfenstein,项目名称:unvqx,代码行数:17,代码来源:tr_vbo.cpp


示例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 );
}
开发者ID:MAN-AT-ARMS,项目名称:iortcw-archive,代码行数:59,代码来源:tr_backend.c


示例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();
}
开发者ID:SonnyJim,项目名称:ioq3,代码行数:17,代码来源:tr_vbo.c


示例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;
}
开发者ID:NewsNoobDude,项目名称:RTCW-SP-linux,代码行数:24,代码来源:tr_backend.c


示例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();
}
开发者ID:norfenstein,项目名称:unvqx,代码行数:57,代码来源:tr_surface.cpp


示例10: GLSL_BindNullProgram

void GLSL_BindNullProgram(void)
{
	if(r_logFile->integer)
	{
		GLimp_LogComment("--- GL_BindNullProgram ---\n");
	}

	if(glState.currentProgram)
	{
		qglUseProgramObjectARB(0);
		glState.currentProgram = NULL;
	}
}
开发者ID:customizations,项目名称:ioquake3.js,代码行数:13,代码来源:tr_glsl.c


示例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;
	}
}
开发者ID:norfenstein,项目名称:unvqx,代码行数:20,代码来源:tr_surface.cpp


示例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++;
}
开发者ID:ElCoyote27,项目名称:ioq3,代码行数:14,代码来源:tr_glsl.c


示例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;
}
开发者ID:ElCoyote27,项目名称:ioq3,代码行数:19,代码来源:tr_fbo.c


示例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;
	}
}
开发者ID:Foe-of-Eternity,项目名称:Unvanquished,代码行数:19,代码来源:tr_fbo.cpp


示例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 );
	}
开发者ID:Sixthly,项目名称:Unvanquished,代码行数:20,代码来源:tr_backend_d3d10.cpp


示例16: RB_FogOff

void RB_FogOff( void )
{
	GLimp_LogComment( "--- RB_FogOff() ---\n" );

#if 0

	if ( !fogIsOn )
	{
		return;
	}

	glDisable( GL_FOG );
	fogIsOn = qfalse;
#endif
}
开发者ID:Gireen,项目名称:Unvanquished,代码行数:15,代码来源:tr_fog.cpp


示例17: Tess_SurfaceSprite

static void Tess_SurfaceSprite()
{
	vec3_t delta, left, up;
	float  radius;
	vec4_t color;

	GLimp_LogComment( "--- Tess_SurfaceSprite ---\n" );

	radius = backEnd.currentEntity->e.radius;

	if( tess.surfaceShader->autoSpriteMode == 1 ) {
		// the calculations are done in GLSL shader

		Tess_AddSprite( backEnd.currentEntity->e.origin, 
				backEnd.currentEntity->e.shaderRGBA,
				radius, backEnd.currentEntity->e.rotation );
		return;
	}

	VectorSubtract( backEnd.currentEntity->e.origin, backEnd.viewParms.pvsOrigin, delta );

	if( VectorNormalize( delta ) < NORMAL_EPSILON )
		return;

	CrossProduct( backEnd.viewParms.orientation.axis[ 2 ], delta, left );

	if( VectorNormalize( left ) < NORMAL_EPSILON )
		VectorSet( left, 1, 0, 0 );

	if( backEnd.currentEntity->e.rotation != 0 )
		RotatePointAroundVector( left, delta, left, backEnd.currentEntity->e.rotation );

	CrossProduct( delta, left, up );

	VectorScale( left, radius, left );
	VectorScale( up, radius, up );

	if ( backEnd.viewParms.isMirror )
		VectorSubtract( vec3_origin, left, left );

	color[ 0 ] = backEnd.currentEntity->e.shaderRGBA[ 0 ] * ( 1.0 / 255.0 );
	color[ 1 ] = backEnd.currentEntity->e.shaderRGBA[ 1 ] * ( 1.0 / 255.0 );
	color[ 2 ] = backEnd.currentEntity->e.shaderRGBA[ 2 ] * ( 1.0 / 255.0 );
	color[ 3 ] = backEnd.currentEntity->e.shaderRGBA[ 3 ] * ( 1.0 / 255.0 );

	Tess_AddQuadStamp( backEnd.currentEntity->e.origin, left, up, color );
}
开发者ID:norfenstein,项目名称:unvqx,代码行数:47,代码来源:tr_surface.cpp


示例18: RB_FogOn

void RB_FogOn()
{
	GLimp_LogComment("--- RB_FogOn() ---\n");

#if 1
	if(fogIsOn)
	{
		return;
	}

//  if(r_uiFullScreen->integer) {   // don't fog in the menu
//      R_FogOff();
//      return;
//  }

	if(!r_wolfFog->integer)
	{
		return;
	}

//  if(backEnd.viewParms.isGLFogged) {
//      if(!(backEnd.viewParms.glFog.registered))
//          return;
//  }

	if(backEnd.refdef.rdflags & RDF_SKYBOXPORTAL)
	{							
		// don't force world fog on portal sky

		if(!(tr.glfogsettings[FOG_PORTALVIEW].registered))
		{
			return;
		}
	}
	else if(!tr.glfogNum)
	{
		return;
	}

#if defined(USE_D3D10)
	// TODO
#else
	glEnable(GL_FOG);
#endif
	fogIsOn = qtrue;
#endif
}
开发者ID:DerSaidin,项目名称:OpenWolf,代码行数:47,代码来源:tr_fog.cpp


示例19: R_BindVao

/*
============
R_BindVao
============
*/
void R_BindVao(vao_t * vao)
{
	if(!vao)
	{
		//R_BindNullVao();
		ri.Error(ERR_DROP, "R_BindVao: NULL vao");
		return;
	}

	if(r_logFile->integer)
	{
		// don't just call LogComment, or we will get a call to va() every frame!
		GLimp_LogComment(va("--- R_BindVao( %s ) ---\n", vao->name));
	}

	if(glState.currentVao != vao)
	{
		glState.currentVao = vao;

		glState.vertexAttribsInterpolation = 0;
		glState.vertexAnimation = qfalse;
		backEnd.pc.c_vaoBinds++;

		if (glRefConfig.vertexArrayObject)
		{
			qglBindVertexArray(vao->vao);

			// why you no save GL_ELEMENT_ARRAY_BUFFER binding, Intel?
			if (1)
				qglBindBuffer(GL_ELEMENT_ARRAY_BUFFER, vao->indexesIBO);

			// tess VAO always has buffers bound
			if (vao == tess.vao)
				qglBindBuffer(GL_ARRAY_BUFFER, vao->vertexesVBO);
		}
		else
		{
			qglBindBuffer(GL_ARRAY_BUFFER, vao->vertexesVBO);
			qglBindBuffer(GL_ELEMENT_ARRAY_BUFFER, vao->indexesIBO);

			// tess VAO doesn't have vertex pointers set until data is uploaded
			if (vao != tess.vao)
				Vao_SetVertexPointers(vao);
		}
	}
}
开发者ID:UniQP,项目名称:ioq3,代码行数:51,代码来源:tr_vbo.c


示例20: RB_EndSurface

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
	if ( r_measureOverdraw->integer ) {
		int i;
		long sum = 0;
		unsigned char *stencilReadback;

		stencilReadback = (unsigned char *) Z_Malloc( glConfig.vidWidth * glConfig.vidHeight, TAG_TEMP_WORKSPACE, qfalse );
		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;
		Z_Free( stencilReadback );
	}

    if ( !glState.finishCalled ) {
        qglFinish();
	}

    GLimp_LogComment( "***************** RB_SwapBuffers *****************\n\n\n" );

	GLimp_EndFrame();

	backEnd.projection2D = qfalse;

	return (const void *)(cmd + 1);
}
开发者ID:BishopExile,项目名称:OpenJK,代码行数:45,代码来源:tr_backend.cpp



注:本文中的GLimp_LogComment函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GLimp_Shutdown函数代码示例发布时间:2022-05-30
下一篇:
C++ GLfloat函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap