hello i just started to try jpct the desktop version. so far i created a non fullscreen window with non standard size , but can't get OPENGL hardward renderer.
another problem is, if i set the window size to a standard size, the OPENGL renderer opens another window that i don't want.
how to setup the window correctly?
my current code is like this:
GraphicsEnvironment e=GraphicsEnvironment.getLocalGraphicsEnvironment();
gDevice=e.getDefaultScreenDevice(); GraphicsConfiguration gc=gDevice.getDefaultConfiguration();
gwin=new Frame(gc); gwin.setUndecorated(true); gwin.setIgnoreRepaint(true); gwin.setResizable(false);
gwin.pack(); Dimension d=new Dimension(1280,766); gwin.setSize(d);
gwin.setVisible(true); gfx=gwin.getGraphics();
gbuf=new FrameBuffer(1280,766,FrameBuffer.SAMPLINGMODE_NORMAL);
gbuf.enableRenderer(IRenderer.RENDERER_OPENGL); gbuf.optimizeBufferAccess();
and in the mainloop:
gbuf.clear(); gbuf.update(); gbuf.display(gfx);
note that i want the window to have no border/title, and sized 1280x766 (766=800-34, the height of taskbar)
in my experience at other 3D engine, non standard window size is achievable.
i am new to java and jpct, so can't find out what's wrong in my code. could someone help me? thanks.