本文整理汇总了C++中Singleton::drawFBO方法的典型用法代码示例。如果您正苦于以下问题:C++ Singleton::drawFBO方法的具体用法?C++ Singleton::drawFBO怎么用?C++ Singleton::drawFBO使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Singleton
的用法示例。
在下文中一共展示了Singleton::drawFBO方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: renderGUI
void renderGUI(float newZoom, int activeFBO) {
int i;
int j;
int k;
int m;
int n;
int maxLoop = 0;
float shadowOffset = 0.0;
testOver(singleton->guiX,singleton->guiY);
doRefresh();
Singleton::UICont* curCont = NULL;
baseComp->updateSS();
singleton->bindFBO("guiFBO");
singleton->drawFBO("resultFBO", 0, newZoom, activeFBO);
glEnable (GL_BLEND);
singleton->bindShader("GUIShader");
singleton->setShaderTexture(0,singleton->fontWrappers[EFW_TEXT]->fontImage->tid);
singleton->setShaderTexture(1,singleton->fontWrappers[EFW_ICONS]->fontImage->tid);
singleton->sampleFBO("swapFBOBLin0", 2);
for (i = 0; i < 2; i++) {
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
);
}
}
//.........这里部分代码省略.........