We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Porting the MinimalSceneryExample to java creates a window that is non-responding.
package org.livingtech.scbridge; import graphics.scenery.*; import graphics.scenery.backends.Renderer; import org.joml.Vector3f; public class CreateSceneryWindow { public static void main(String[] args){ SceneryBase base = new SceneryBase("Scenery Window"){ @Override public void init(){ Hub hub = getHub(); Scene scene = getScene(); hub.add( SceneryElement.Renderer, Renderer.createRenderer( hub, getApplicationName(), getScene(), 512, 512 ) ); Box box = new Box(new Vector3f(1.0f, 1.0f, 1.0f)); box.material().setDiffuse(new Vector3f(1.0f) ); scene.addChild(box); PointLight light = new PointLight( 15.0f ); light.spatial().setPosition(new Vector3f(0.0f, 0.0f, 2.0f)); light.setIntensity(5.0f); light.setEmissionColor(new Vector3f(1.0f, 1.0f, 1.0f) ); scene.addChild(light); DetachedHeadCamera cam = new DetachedHeadCamera(); cam.spatial().setPosition(new Vector3f(0.0f, 0.0f, 5.0f) ); cam.perspectiveCamera(50.0f, 512, 512, 0f, 10f); scene.addChild(cam); } }; new Thread(base::main).start(); } }
Expected behavior
The window should show with a rendered cube?
Desktop (please complete the following information):
Additional context
This isn't too important. If I create a sciview context I can get a scenery rendering window. I was curious if this would work/ should work.
The text was updated successfully, but these errors were encountered:
I found a fix for this, I had to set the renderer in the SceneryBase not just add the renderer to the hub.
Renderer renderer = Renderer.createRenderer( hub, getApplicationName(), scene, 512, 512 ); setRenderer(renderer); hub.add( SceneryElement.Renderer, renderer );
Sorry, something went wrong.
No branches or pull requests
Porting the MinimalSceneryExample to java creates a window that is non-responding.
Expected behavior
The window should show with a rendered cube?
Desktop (please complete the following information):
Additional context
This isn't too important. If I create a sciview context I can get a scenery rendering window. I was curious if this would work/ should work.
The text was updated successfully, but these errors were encountered: