Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

Workaround for ofLight crash in ofBook

$
0
0

@mikechambers wrote:

I am working through the graphics section of ofBook in order to get a basic understanding of how to use 3D.

http://openframeworks.cc/ofBook/chapters/openGL.html

I am creating the app in the A Basic 3D Scene section, and when I try to compile, ofLight is causing a crash. I can remove the calls to ofLight, but then my objects are just black.

Here is the relevant code

// Add this in the App.h
ofLight light;
ofEasyCam cam;

// add these lines to the setup and to the draw method in the App.cpp
void ofApp::setup(){
    light.setup();
    light.setPosition(-100, 200,0);
    ofEnableDepthTest();
}

void ofApp::draw(){
    cam.begin();
    // here you will draw your object
    cam.end();
}

I have logged an issue with ofBook for the example:

But wanted to check and see if anyone knew of any work arounds so I could keep working through the chapter.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4929

Trending Articles