Login  Register

Re: Developing a game, need help

Posted by Sven Gothel on Feb 13, 2011; 5:05pm
URL: https://forum.jogamp.org/Developing-a-game-need-help-tp2486309p2486600.html

On Sunday, February 13, 2011 17:05:15 Wibowit [via jogamp] wrote:

>
> Hi,
>
> I don't know how to name this thread, but I'll here post questions and bugs.
>
> I'm primarily developing on Ubuntu 10.10 64-bit, Radeon HD 5770 and Catalyst
> 10.12 (I think).
>
> I've downloaded master builds from 12th February and there are some bugs.
>
> 1. Newest JOGL builds doesn't fire windowDestroyNotify when closing window.
> Latest release build works fine.

yup, I have to fix this one :)

>
> 2. setNumSamples doesn't work in both branches.
?

AA unit tests work fine, they use setNumSamples,
have a look at the unit test source code:

http://jogamp.org/git/?p=jogl.git;a=blob;f=src/test/com/jogamp/opengl/test/junit/jogl/caps/TestMultisampleNEWT.java;h=8285a669914787edcf930c671f779af6fa84679d;hb=HEAD#l77

As you see, you have to set the caps _before_ realizing the window/drawable!
But to allow AA to work, you also need to set alpha: 'caps.setAlphaBits(1);'

>
> 3. How to query the available pixel formats? Ie. color precision, depth
> precision, availability of AA and AF etc?

Usually you don't have to do a thing, but to set your minimum required features
like the above, ie alpha to 1.
Then the native selection (or custome GLCapabilitiesChoser) will choose the best available.

However, you now can have a list of all available caps:

http://jogamp.org/git/?p=jogl.git;a=blob;f=src/newt/classes/jogamp/newt/awt/opengl/VersionApplet.java;h=7f234a0f83715416c138093763218fcfa3feb1b5;hb=HEAD#l103

This is already 'online' here:

http://jogamp.org/deployment/webstart-next/applet-version-jnlp.html

Hope this helps (without looking at your code).

Cheers, Sven

>
> Here's the code that launches GLWindow:
> http://code.google.com/p/sokoj/source/browse/src/my/sokoban/configurator/LauncherThread.java?r=4ec420c75daa51dd61ab582eb144aabd8af5bcb2
>
> And here's code that implements GLEventListener:
> http://code.google.com/p/sokoj/source/browse/src/my/sokoban/engine/MainEventListener.java?r=4ec420c75daa51dd61ab582eb144aabd8af5bcb2
>
> _______________________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://forum.jogamp.org/Developing-a-game-need-help-tp2486309p2486309.html
> To start a new topic under jogl, email [hidden email]
> To unsubscribe from jogl, visit