Using ControlP5 and MRI3DS, controls hidden behind scene
in
Contributed Library Questions
•
2 years ago
I'm loading a 3ds object using MRI3DS and am trying to load controls to rotate the object and scale it using controlP5 but for some reason all of my controls are hidden behind the MRI3DS scene. I've tried to load the controls using ControlP5displayOnTop3D example and can bring them to the front and show up but they are blurry and i cannot interact with them.
here is how i setup my MRI3DS viewport
- vgl.begin();
- vgl.setVSync(true);
- vgl.background(0);
- gl = ((PGraphicsOpenGL)g).beginGL();
- gl.glViewport ((width/2)-150, height-250, 300, 300);
- vgl.perspective( 45, 1, 1, 1000 );
- vgl.camera( 0, 90, 500, 0, 0, 0, 0, +1, 0 );
- gR.renderGeometry(rotX, rotY, rotZ, mScale);
- gl.glFlush();
- ((PGraphicsOpenGL)g).endGL();
- vgl.end();
1