AssimpModelLoader and shaders


#1

I am loading a mesh (STL files) with ofxAssimpModelLoader, and trying to display it with a shader, but it’s not working as intended. All I see is white mesh.
the relevant lines:

void ofApp::setup(){

    shader.load("gooch2.vert", "gooch2.frag");
    shader.bindDefaults();

}

void ofApp::draw(){

  shader.begin();
			
  //we want to pass in some values to animate our type / color 
  shader.setUniform3f("lightPos", 10.0, 10.0, 0.0 );
  shader.setUniform3f("Kd", .1, .2, .3);

  model.drawWireframe();

  shader.end();

}

model is ofxAssimpModelLoader instance and holds the mesh.

Any ideas how to proceed?


#2

Found the solution here.
Since I am using programmable shaders, I needed to let the opengl window use the right version of opengl.