Yeah i get the error,
Exception in thread “main” java.lang.IllegalStateException: Cannot determine close requested state of uncreated window
at org.lwjgl.opengl.Display.isCloseRequested(Display.java:583)
at jpcttest.JPCTtest.create(JPCTtest.java:23)
at jpcttest.JPCTtest.main(JPCTtest.java:41)
Java Result: 1
obviously im missing something from that tutorial because it does make sense since there is nothing actually making a window, here is my code, do you guys know what im missing?
package jpcttest;
import com.threed.jpct.*;
import java.awt.Color;
import java.util.logging.Level;
public class JPCTtest {
FrameBuffer buffer;
public void create() throws InterruptedException{
World world = new World();
world.setAmbientLight(0, 255, 0);
TextureManager.getInstance().addTexture("steve-stand", new Texture("steve_standing.png"));
Object3D box = Primitives.getBox(13f, 2f);
box.setTexture("steve_stand");
box.setEnvmapped(Object3D.ENVMAP_ENABLED);
box.build();
world.addObject(box);
world.getCamera().setPosition(50, -50, -5);
world.getCamera().lookAt(box.getTransformedCenter());
buffer = new FrameBuffer(800, 600, FrameBuffer.SAMPLINGMODE_NORMAL);
buffer.disableRenderer(IRenderer.RENDERER_SOFTWARE);
buffer.enableRenderer(IRenderer.MODE_OPENGL);
while(!org.lwjgl.opengl.Display.isCloseRequested()){
box.rotateY(.01f);
buffer.clear(Color.BLUE);
world.renderScene(buffer);
world.draw(buffer);
buffer.update();
buffer.displayGLOnly();
Thread.sleep(10);
}
buffer.disableRenderer(IRenderer.RENDERER_OPENGL);
buffer.dispose();
System.exit(0);
}
public static void main(String[] args) {
try {
new JPCTtest().create();
} catch (InterruptedException ex) {
java.util.logging.Logger.getLogger(JPCTtest.class.getName()).log(Level.SEVERE, null, ex);
}
}
}