Hi,
I’m trying to build an app which redraw manually while keeping a 1:1 mapping between pixels and points coordinates.
My code looks like this :
class MyApp : public ci::App {
MyApp(){
setFrameRate(0);
}
void mouseDown(MouseEvent e) override {
do_paint();
}
void resize() override {
// never called
getRenderer()->defaultResize();
}
void do_paint(){
// this is just here for testing, without this line the subsequent drawing are distorted
getRenderer()->defaultResize();
getRenderer()->startDraw();
// doesn't draw at the center of the screen after a window resize
gl::drawString("Test", getWindowSize() / 2);
getRenderer()->finishDraw();
}
};
I’m receiving the MouseEvent, however the resize() override is not being called. Furthermore, getWindowSize() do not return the current size anymore, but the size of the window at launch.
Is this a bug?
Thanks,
-JB