本文整理汇总了C++中TextureChunkPtr::activate方法的典型用法代码示例。如果您正苦于以下问题:C++ TextureChunkPtr::activate方法的具体用法?C++ TextureChunkPtr::activate怎么用?C++ TextureChunkPtr::activate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TextureChunkPtr
的用法示例。
在下文中一共展示了TextureChunkPtr::activate方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: glutGet
void
display(void)
{
float t = glutGet( GLUT_ELAPSED_TIME );
win->frameInit();
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
Matrix m;
Quaternion q;
q.setValueAsAxisDeg( 0,1,0, -t/20 );
m.setRotate( q );
tchunk1->setMatrix( m );
tchunk1->activate( dact );
mchunk1->activate( dact );
glCallList( dlid );
m.setIdentity();
m.setTranslate( cos(t/1000), 0, sin(t/1000) );
tchunk2->setMatrix( m );
tchunk2->changeFrom( dact, get_pointer(tchunk1));
mchunk2->changeFrom( dact, get_pointer(mchunk1));
blchunk->activate( dact );
blchunk->activate( dact );
cchunk1->activate( dact );
gchunk1->activate( dact );
glCallList( dlid );
tchunk2->deactivate( dact );
mchunk2->deactivate( dact );
blchunk->deactivate( dact );
cchunk1->deactivate( dact );
gchunk1->deactivate( dact );
xchunk1->activate( dact );
txchunk->activate( dact );
glCallList( dlid2 );
xchunk1->deactivate( dact );
txchunk->deactivate( dact );
win->frameExit();
glutSwapBuffers();
}
示例2: glutGet
void
display(void)
{
float t = glutGet( GLUT_ELAPSED_TIME );
win->frameInit();
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
Matrix m;
Quaternion q;
q.setValueAsAxisDeg( 0,1,0, -t/20 );
m.setRotate( q );
tchunk1->setMatrix( m );
tchunk1->activate( dact );
mchunk1->activate( dact );
pchunk1->activate( dact );
lichunk1->activate( dact );
glCallList( dlid );
m.setIdentity();
m.setTranslate( cos(t/1000), 0, sin(t/1000) );
tchunk2->setMatrix( m );
pchunk2->changeFrom( dact, get_pointer(pchunk1) );
tchunk2->changeFrom( dact, get_pointer(tchunk1) );
mchunk2->changeFrom( dact, get_pointer(mchunk1) );
lichunk2->changeFrom( dact, get_pointer(lichunk1) );
blchunk->activate( dact );
glCallList( dlid );
tchunk2->deactivate( dact );
mchunk2->deactivate( dact );
pchunk2->deactivate( dact );
lichunk2->deactivate( dact );
blchunk->deactivate( dact );
xchunk1->activate( dact );
txchunk->activate( dact );
#if 0
glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_PASS_THROUGH_NV);
glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV,34102
);
glTexEnvf(GL_TEXTURE_SHADER_NV, GL_OFFSET_TEXTURE_SCALE_NV, 0.0000 );
glTexEnvf(GL_TEXTURE_SHADER_NV, GL_OFFSET_TEXTURE_BIAS_NV, 0.0000 );
glEnable(GL_TEXTURE_SHADER_NV);
GLint consistent;
glGetTexEnviv(GL_TEXTURE_SHADER_NV, GL_SHADER_CONSISTENT_NV,
&consistent);
if(!consistent)
{
FWARNING(("Texture shaders not consistent!\n"));
}
#endif
glCallList( dlid2 );
// glDisable(GL_TEXTURE_SHADER_NV);
xchunk1->deactivate( dact );
txchunk->deactivate( dact );
win->frameExit();
glutSwapBuffers();
}