clean some comments

This commit is contained in:
jrkb 2023-09-06 18:20:58 +02:00
parent 20ad951c46
commit d97ed744d9

View file

@ -446,8 +446,6 @@ void GPUFontAtlasLayerCombo::draw(int width,
int currentProgram;
glGetIntegerv(GL_CURRENT_PROGRAM, &currentProgram);
//antiAliasingWindowSize = ofMap(ofGetMouseX(), 0, ofGetWidth(), 1, 3);
//enableSuperSamplingAntiAliasing = ofGetMouseY() > ofGetHeight() / 2;
if(font){
OFX_PROFILER_SCOPE("draw font");
bool resized = width != previousWidth || height != previousHeight;
@ -456,11 +454,9 @@ void GPUFontAtlasLayerCombo::draw(int width,
glm::vec2 mouse = glm::vec2(ofGetMouseX(), ofGetMouseY());
//glm::mat4 projection = transform.getProjectionMatrix((float)width / height);
glm::mat4 projection = transform.getOrthoProjectionMatrix(width,
height,
Transform::TOP_LEFT);
//Transform::CENTERED);
glm::mat4 view = transform.getViewMatrix();
glm::mat4 model = glm::mat4(1.0f);
fontShaderProgram = fontShader->program;
@ -477,9 +473,6 @@ void GPUFontAtlasLayerCombo::draw(int width,
location = glGetUniformLocation(fontShaderProgram, "model");
glUniformMatrix4fv(location, 1, false, glm::value_ptr(model));
}
//float z = 0;
//location = glGetUniformLocation(fontShaderProgram, "z");
//glUniform1f(location, z);
if(firstRun){
GLuint location;
location = glGetUniformLocation(fontShaderProgram, "antiAliasingWindowSize");
@ -500,7 +493,6 @@ void GPUFontAtlasLayerCombo::draw(int width,
std::vector <ofVboMesh> outerBoundingBoxes;
ofRectangle r;
//for(const auto & layer : layers)
{
OFX_PROFILER_SCOPE("draw layer");
float ascender = font->getAscender(layer->getProps().fontSize_px);
@ -520,8 +512,7 @@ void GPUFontAtlasLayerCombo::draw(int width,
layer->getProps().width,
lineHeight,
layer->getProps().textAlignment);
//if(layer->getProps().width > 0){
{
{ // TODO: this could be a result of collecting/wrapping bounding boxes
float min_x = FLT_MAX;
float min_y = FLT_MAX;
float max_x = -FLT_MAX;
@ -554,7 +545,6 @@ void GPUFontAtlasLayerCombo::draw(int width,
bb_mirror_none.multiply(layer->getInnerNode().getGlobalTransformMatrix());
mirror_bbs.push_back(std::move(bb_mirror_none));
//layer->setBoundingBox(bb);
ofVboMesh mesh;
mesh.addVertices({bb_mirror_none.p0,
bb_mirror_none.p1,
@ -692,25 +682,6 @@ void GPUFontAtlasLayerCombo::draw(int width,
}
glUseProgram(currentProgram);
//ofPushStyle();
//ofSetColor(ofColor::green);
//ofNoFill();
//ofDrawRectangle(r);
//ofPopStyle();
//ofPushStyle();
//ofSetColor(ofColor::white);
//for(const auto & b : outerBoundingBoxes){
//int i = 0;
//for(const auto & v : b.getVertices()){
//ofSetColor(b.getColors()[i]);
//ofDrawCircle(v, 2);
//ofDrawBitmapString(ofToString(i), 0, 0);
//i++;
//}
//b.drawVertices();
//}
//ofFill();
//ofPopStyle();
}
glDisable(GL_BLEND);