void ofxGuiGroup::render(){ border.draw(); headerBg.draw(); ofBlendMode blendMode = ofGetStyle().blendingMode; if(blendMode!=OF_BLENDMODE_ALPHA){ ofEnableAlphaBlending(); } ofColor c = ofGetStyle().color; ofSetColor(thisTextColor); bindFontTexture(); textMesh.draw(); unbindFontTexture(); if(!minimized){ for(int i = 0; i < (int)collection.size(); i++){ collection[i]->draw(); } } ofSetColor(c); if(blendMode!=OF_BLENDMODE_ALPHA){ ofEnableBlendMode(blendMode); } }
void TextureText::begin() { glPushAttrib(GL_ALL_ATTRIB_BITS); int viewportParams[4]; glGetIntegerv(GL_VIEWPORT, viewportParams); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(viewportParams[0], viewportParams[2], viewportParams[1], viewportParams[3], 0.1, 10.0); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); gluLookAt(0.0, 0.0, 5.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0); glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glDisable(GL_COLOR_MATERIAL); glDisable(GL_DEPTH_TEST); glDisable(GL_LIGHTING); // color glColor4f(1.0, 1.0, 1.0, _charAlpha); // find the font texture bindFontTexture(); glPushMatrix(); }
void ofxPanel::render(){ border.draw(); headerBg.draw(); ofBlendMode blendMode = ofGetStyle().blendingMode; if(blendMode!=OF_BLENDMODE_ALPHA){ ofEnableAlphaBlending(); } ofColor c = ofGetStyle().color; ofSetColor(thisTextColor); bindFontTexture(); textMesh.draw(); unbindFontTexture(); bool texHackEnabled = ofIsTextureEdgeHackEnabled(); ofDisableTextureEdgeHack(); loadIcon.draw(loadBox); saveIcon.draw(saveBox); if(texHackEnabled){ ofEnableTextureEdgeHack(); } for(int i = 0; i < (int)collection.size(); i++){ collection[i]->draw(); } ofSetColor(c); if(blendMode!=OF_BLENDMODE_ALPHA){ ofEnableBlendMode(blendMode); } }
void ofxPanel::render(){ border.draw(); headerBg.draw(); ofBlendMode blendMode = ofGetStyle().blendingMode; if(blendMode!=OF_BLENDMODE_ALPHA){ ofEnableAlphaBlending(); } ofColor c = ofGetStyle().color; ofSetColor(thisTextColor); bindFontTexture(); textMesh.draw(); unbindFontTexture(); bool texHackEnabled = ofIsTextureEdgeHackEnabled(); ofDisableTextureEdgeHack(); // loadIcon.draw(loadBox); // saveIcon.draw(saveBox); if(isDynamic){ ofSetColor(255,0,0); if(*isActive){ ofFill(); } else ofNoFill(); ofRect(activeBox); ofSetColor(0,255,0); if(*isPiping){ ofFill(); } else ofNoFill(); ofRect(pipeBox); } if(texHackEnabled){ ofEnableTextureEdgeHack(); } for(int i = 0; i < (int)collection.size(); i++){ collection[i]->draw(); } ofSetColor(c); if(blendMode!=OF_BLENDMODE_ALPHA){ ofEnableBlendMode(blendMode); } }
void ofxPanel::render(){ this->prerender(); ofColor c; ofBlendMode blendMode; bool performDraw = !useFbo || requiresRerender; if( performDraw ){ border.draw(); headerBg.draw(); blendMode = ofGetStyle().blendingMode; if(blendMode!=OF_BLENDMODE_ALPHA){ ofEnableAlphaBlending(); } c = ofGetStyle().color; ofSetColor(thisTextColor); bindFontTexture(); textMesh.draw(); unbindFontTexture(); bool texHackEnabled = ofIsTextureEdgeHackEnabled(); ofDisableTextureEdgeHack(); loadIcon.draw(loadBox); saveIcon.draw(saveBox); if(texHackEnabled){ ofEnableTextureEdgeHack(); } } int len = (int)collection.size(); for(int i = 0; i < len; i++){ collection[i]->draw(useFbo); } if( performDraw ){ ofSetColor(c); if(blendMode!=OF_BLENDMODE_ALPHA){ ofEnableBlendMode(blendMode); } requiresRerender = false; } this->postrender(); }
void ofxGuiInputField<Type>::drawMesh(){ ofBlendMode blendMode = ofGetStyle().blendingMode; if(blendMode!=OF_BLENDMODE_ALPHA){ ofEnableAlphaBlending(); } ofSetColor(textColor); bindFontTexture(); textMesh.draw(); unbindFontTexture(); ofColor c = ofGetStyle().color; ofSetColor(c); if(blendMode!=OF_BLENDMODE_ALPHA){ ofEnableBlendMode(blendMode); } }
void ofxSlider<Type>::render(){ ofColor c = ofGetStyle().color; bg.draw(); bar.draw(); ofBlendMode blendMode = ofGetStyle().blendingMode; if(blendMode!=OF_BLENDMODE_ALPHA){ ofEnableAlphaBlending(); } ofSetColor(thisTextColor); bindFontTexture(); textMesh.draw(); unbindFontTexture(); ofSetColor(c); if(blendMode!=OF_BLENDMODE_ALPHA){ ofEnableBlendMode(blendMode); } }