本文整理汇总了C++中std::list::getY方法的典型用法代码示例。如果您正苦于以下问题:C++ list::getY方法的具体用法?C++ list::getY怎么用?C++ list::getY使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类std::list
的用法示例。
在下文中一共展示了list::getY方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: render
/**
* main render function
*/
void render() {
counter++;
if(counter >= 36000){
counter = 0;
}
//Typical render pass
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
// update dimensions
enable_2d();
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glPushMatrix();
// if in portrait mode
if (oriention_side_up > 0)
{
glVertexPointer(2, GL_FLOAT, 0, verticesH);
glTexCoordPointer(2, GL_FLOAT, 0, tex_coordH);
}
// if in landscape mode
else
{
glVertexPointer(2, GL_FLOAT, 0, vertices);
glTexCoordPointer(2, GL_FLOAT, 0, tex_coord);
}
//portrait or landscape?
glBindTexture(GL_TEXTURE_2D, oriention_side_up>0?backgroundH:background);
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
glPopMatrix();
pp = points.begin();
while (pp != points.end()) {
if (pp->visible) {
// draw touchpoint
glPushMatrix();
glTranslatef(pp->getX(), (oriention_side_up>0?1024:600) - pp->getY(), 0);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glVertexPointer(2, GL_FLOAT, 0, verticesTouchpoint);
glTexCoordPointer(2, GL_FLOAT, 0, tex_coord_touchpoint);
glBindTexture(GL_TEXTURE_2D, touchpoint);
glPushMatrix();
glRotatef((float) ((float)(pp->startRotation) + (float) counter / 0.25f), 0, 0, 1);
glPushMatrix();
glTranslatef(-60, -60, 0);
glColor4f(pp->r,pp->g,pp->b,1);
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
glPopMatrix();
glPopMatrix();
glPopMatrix();
// draw touchpoint number
glPushMatrix();
glColor4f(0.3f,0.3f,0.3f,1.0f);
char buffer [33];
itoa (pp->id+1,buffer,10);
glTranslatef(pp->getX()+50,(oriention_side_up>0?1024:600)-pp->getY()+50,0);
glPushMatrix();
bbutil_render_text(font,buffer,0,0);
glPopMatrix();
glPopMatrix();
}
pp++;
}
glColor4f(1.0f,1.0f,1.0f,1.0f);
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
glDisableClientState(GL_VERTEX_ARRAY);
//Use utility code to update the screen
bbutil_swap();
}