本文整理汇总了C++中Singleton::unbindFBO方法的典型用法代码示例。如果您正苦于以下问题:C++ Singleton::unbindFBO方法的具体用法?C++ Singleton::unbindFBO怎么用?C++ Singleton::unbindFBO使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Singleton
的用法示例。
在下文中一共展示了Singleton::unbindFBO方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: clearSet
void clearSet() { //bool forceClear
int i;
//bool doClear = forceClear;
if (usingPoolId == -1) {
if (isEntity) {
usingPoolId = singleton->entityPool->requestPoolId(blockId,holderId);
gpuRes = singleton->entityPool->holderPoolItems[usingPoolId];
}
else {
usingPoolId = singleton->gpuPool->requestPoolId(blockId,holderId);
gpuRes = singleton->gpuPool->holderPoolItems[usingPoolId];
}
readyForClear = true;
}
if (readyForClear) {
readyForClear = false;
for (i = 0; i < MAX_LAYERS; i++) {
// clear fbo by binding it with auto flag
singleton->bindFBODirect(gpuRes->getFBOS(i));
singleton->unbindFBO();
}
}
}
示例2: renderGUI
//.........这里部分代码省略.........
if (i == 0) {
maxLoop = 1;
}
else {
maxLoop = 2;
}
singleton->setShaderFloat("passNum", i);
singleton->setShaderFloat("zoom", singleton->cameraZoom);
singleton->setShaderVec2("resolution", singleton->currentFBOResolutionX, singleton->currentFBOResolutionY);
glBegin (GL_QUADS);
//baseComp->renderAll(i == 0);
for (j = 0; j < MAX_UI_LAYERS; j++) {
for (k = 0; k < singleton->guiLayers[j].size(); k++) {
curCont = (singleton->guiLayers[j][k]);
if (curCont->uiComp->visible) {
for (m = 0; m < maxLoop; m++) {
shadowOffset = ((1-m)*i)*4.0f;
// only shadow text
if (shadowOffset == 0.0f) {
if (curCont->bg.fontId > -1) {
renderQuad(
curCont->uiComp,
curCont->bg.hitBounds,
shadowOffset
);
}
}
if (i == 0) {
// don't render text in first pass
}
else {
if (false) { //curCont->locked) {
// busy updating characters
}
else {
for (n = 0; n < curCont->charVec.size(); n++) {
renderCharAt(
curCont->uiComp,
curCont->charVec[n].cs,
singleton->fontWrappers[curCont->charVec[n].fontId],
curCont->charVec[n].hitBounds.xMin,
curCont->charVec[n].hitBounds.yMin,
shadowOffset
);
}
}
}
}
}
}
}
glEnd ();
}
singleton->unsampleFBO("swapFBOBLin0", 2);
singleton->setShaderTexture(1,0);
singleton->setShaderTexture(0,0);
singleton->unbindShader();
singleton->unbindFBO();
glDisable(GL_BLEND);
singleton->drawFBO("guiFBO", 0, 1.0f);
}