<commit_before>//
//  globe.cpp
//  GlobeVisualization
//
//  Created by <NAME> on 03/06/15.
//
//

#include "globe.h"

globe::globe() {
    sphere.setRadius(100);
}

void globe::update() {
    
}

void globe::draw() {
    
    
    ofPushMatrix();
    
    ofSetColor(255);
    
    sphere.enableNormals();
    sphere.enableTextures();
    
    ofTexture tex = textureImage.getTextureReference();
    
    //tex.bind();
    sphere.mapTexCoordsFromTexture(tex);
    //tex.draw(0, 0);
    tex.bind();
    
    ofRotateX(180);
    
    sphere.draw();
    textureImage.unbind();
    
    
    ofSetColor(150, 255, 100);
    sphere.drawNormals(5);
    sphere.drawAxes(150);
    
    ofSetLineWidth(0.5);
    ofSetColor(0, 50, 75, 50);
    sphere.drawWireframe();

    
    ofPopMatrix();
    
}

void globe::setTexture(string path) {
    textureImage.loadImage(path);
    textureImage.mirror(false, true); // vertical, horizontal
}<commit_msg>finally figured out a fix to the transparency rendering issue... open gl backface culling to the rescue<commit_after>//
//  globe.cpp
//  GlobeVisualization
//
//  Created by <NAME> on 03/06/15.
//
//

#include "globe.h"

globe::globe() {
    sphere.setRadius(100);
}

void globe::update() {
    
}

void globe::draw() {
    
    
    ofPushMatrix();
    
    ofSetColor(255);
    
    //sphere.enableNormals();
    sphere.enableTextures();
    
    textureImage.getTextureReference().bind();
    
    ofRotateX(180);
    
    // enable solid surface and backface culling in Open GL
    glEnable(GL_CULL_FACE); // Cull back facing polygons
    glCullFace(GL_FRONT);
    
    sphere.draw();
    textureImage.unbind();
    
    
    ofSetColor(150, 255, 100);
    //sphere.drawNormals(5);
    sphere.drawAxes(150);
    
    ofSetLineWidth(0.5);
    ofSetColor(0, 50, 75, 50);
    sphere.drawWireframe();

    
    ofPopMatrix();
    
}

void globe::setTexture(string path) {
    textureImage.loadImage(path);
    textureImage.mirror(false, true); // vertical, horizontal
}
{'fraction_non_alphanumeric': 0.14634146341463414, 'fraction_numerical': 0.037829766052762566, 'mean_word_length': 2.5017421602787455, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6291689', 'n_tokens_mistral': 764, 'n_tokens_neox': 701, 'n_words': 126}