本文整理汇总了C++中shaderCommands_t类的典型用法代码示例。如果您正苦于以下问题:C++ shaderCommands_t类的具体用法?C++ shaderCommands_t怎么用?C++ shaderCommands_t使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了shaderCommands_t类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: RB_EndSurface
/*
** RB_EndSurface
*/
void RB_EndSurface( void ) {
shaderCommands_t *input;
input = &tess;
if (input->numIndexes == 0 || input->numVertexes == 0) {
return;
}
if (input->indexes[SHADER_MAX_INDEXES-1] != 0) {
ri.Error (ERR_DROP, "RB_EndSurface() - SHADER_MAX_INDEXES hit");
}
if (input->xyz[SHADER_MAX_VERTEXES-1][0] != 0) {
ri.Error (ERR_DROP, "RB_EndSurface() - SHADER_MAX_VERTEXES hit");
}
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;
tess.numVertexes = 0;
tess.firstIndex = 0;
tess.multiDrawPrimitives = 0;
GLimp_LogComment( "----------\n" );
}
开发者ID:nikhileshmeshram,项目名称:ioquaketemp,代码行数:59,代码来源:tr_shade.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: RB_MaskTessEnd
void RB_MaskTessEnd( void ) {
shaderCommands_t *input;
input = &tess;
//qglClear( GL_COLOR_BUFFER_BIT );
qglColorMask(GL_FALSE,GL_FALSE,GL_FALSE,GL_FALSE);
qglDepthMask(GL_FALSE);
qglEnable(GL_STENCIL_TEST);
qglClearStencil(0);
qglClear(GL_STENCIL_BUFFER_BIT);
qglStencilFunc(GL_ALWAYS,1,1);
qglStencilOp(GL_KEEP,GL_KEEP,GL_REPLACE);
tess.currentStageIteratorFunc();
qglDepthMask(GL_TRUE);
qglColorMask(GL_TRUE,GL_TRUE,GL_TRUE,GL_TRUE);
qglStencilFunc(GL_EQUAL,1,1);
qglStencilOp(GL_KEEP,GL_KEEP,GL_KEEP);
}
开发者ID:redrumrobot,项目名称:quakeconstruct,代码行数:24,代码来源:tr_shade.c
示例4: RB_EndSurface
/*
** RB_EndSurface
*/
void RB_EndSurface( qboolean forceDepth ) {
shaderCommands_t *input;
GLenum prog;
int loc;
int i,size;
shaderStage_t stage;
image_t image;
char tex[MAX_QPATH];
input = &tess;
if ( tess.shader == tr.maskEndShader ) {
RB_MaskTessFinish();
return;
}
if (input->numIndexes == 0) {
return;
}
if (input->indexes[SHADER_MAX_INDEXES-1] != 0) {
ri.Error (ERR_DROP, "RB_EndSurface() - SHADER_MAX_INDEXES hit");
}
if (input->xyz[SHADER_MAX_VERTEXES-1][0] != 0) {
ri.Error (ERR_DROP, "RB_EndSurface() - SHADER_MAX_VERTEXES hit");
}
if ( tess.shader == tr.shadowShader ) {
RB_ShadowTessEnd();
return;
}
if ( tess.shader == tr.maskShader ) {
RB_MaskTessEnd();
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;
if(forceDepth) {
//Force depth testing if we are rendering via draw.Start3D -Hxrmn
size = sizeof(tess.xstages) / sizeof(tess.xstages[0]);
for(i=0; i<size; i++) {
if(tess.xstages[i] != NULL) {
if(tess.xstages[i]->stateBits & GLS_DEPTHTEST_DISABLE) {
tess.xstages[i]->stateBits &= ~GLS_DEPTHTEST_DISABLE;
}
}
}
}
//
// call off to shader specific tess end function
//
if(tess.shader->GLSL) {
prog = getShaderProgram(tess.shader->GLSLName);
if(prog != -1) {
qglUseProgramObjectARB(prog);
if(qglUniform1fARB) {
loc = qglGetUniformLocationARB(prog, "cgtime");
qglUniform1fARB(loc, backEnd.refdef.floatTime);
}
if(qglUniform3fvARB) {
loc = qglGetUniformLocationARB(prog, "viewPos");
qglUniform3fARB(loc,
backEnd.refdef.vieworg[0],
backEnd.refdef.vieworg[1],
backEnd.refdef.vieworg[2]);
}
if(qglUniform3fvARB) {
loc = qglGetUniformLocationARB(prog, "viewNormal");
qglUniform3fARB(loc,
backEnd.refdef.viewaxis[0][0],
backEnd.refdef.viewaxis[0][1],
backEnd.refdef.viewaxis[0][2]);
}
if(qglUniform2fARB) {
loc = qglGetUniformLocationARB(prog, "fov");
qglUniform2fARB(loc,
backEnd.refdef.fov_x,
backEnd.refdef.fov_y);
//.........这里部分代码省略.........
开发者ID:redrumrobot,项目名称:quakeconstruct,代码行数:101,代码来源:tr_shade.c
示例5: RB_EndSurface
/*
** RB_EndSurface
*/
void RB_EndSurface( void ) {
shaderCommands_t *input;
input = &tess;
if (input->numIndexes == 0) {
return;
}
if (input->indexes[SHADER_MAX_INDEXES-1] != 0) {
Com_Error (ERR_DROP, "RB_EndSurface() - SHADER_MAX_INDEXES hit");
}
if (input->xyz[SHADER_MAX_VERTEXES-1][0] != 0) {
Com_Error (ERR_DROP, "RB_EndSurface() - SHADER_MAX_VERTEXES hit");
}
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;
}
if ( skyboxportal )
{
// world
if(!(backEnd.refdef.rdflags & RDF_SKYBOXPORTAL))
{
if(tess.currentStageIteratorFunc == RB_StageIteratorSky)
{ // don't process these tris at all
return;
}
}
// portal sky
else
{
if(!drawskyboxportal)
{
if( !(tess.currentStageIteratorFunc == RB_StageIteratorSky))
{ // /only/ process sky tris
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;
if (tess.fogNum && tess.shader->fogPass && r_drawfog->value == 1)
{
backEnd.pc.c_totalIndexes += tess.numIndexes;
}
//
// 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:AlexXT,项目名称:OpenJK,代码行数:83,代码来源:tr_shade.cpp
注:本文中的shaderCommands_t类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论