Engine Limitations?

Started by bgilb, January 17, 2005, 09:35:54 PM

Previous topic - Next topic

bgilb

quick question .. how do i enable Opengl properly? It seems the way im doing it isnt working because i dont get any fps gain at all, heres what i call:


buffer.enableRenderer(IRenderer.RENDERER_SOFTWARE, IRenderer.MODE_OPENGL);
buffer.usesRenderer(IRenderer.RENDERER_OPENGL);

EgonOlsen

Try:
 
buffer.enableRenderer(IRenderer.RENDERER_OPENGL);
buffer.disableRenderer(IRenderer.RENDERER_SOFTWARE);


But be sure that your current FrameBuffer size is supported by your hardware. That not  important in software, but it is in OpenGL.

Anonymous

okay i tried that, it half worked but i get the runtime error "PixelFormat" and then i tried importing the lwjgl library but then it said "Unsatisfied link error"

EgonOlsen

You have to set both, the jar and the dll (assuming that you are using Windows). The dll is set by setting the library.path (similar to the -Xmx stuff before) to the directory where the dll is stored. Have a look at the examples' batchfiles that come with jPCT to see how to set the library.path correctly.

bgilb

it almost works, it just creates 2 windows now ( one thats empty but still has action listiner for mouse ) and then the graphics are in the new window ..

EgonOlsen

jPCT doesn't create a window for you in software mode, but it has to in hardware mode. Simply because the used OpenGL binding can render into its own window only. The second window must be opened by your application. Just don't do that and use the lwjgl window instead. You can't use mouse or keylisteners on this one though. You have to use the means that lwjgl provides for keyboard and mouse or use the KeyMapper from jpct.util.