API: CapabilitiesChooser API change

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

API: CapabilitiesChooser API change

Sven Gothel
Administrator
To implement proper caps fetching to generate a list and to ease the caps chosing implementation
I had to change the API / semantics a little bit.

+++

javax / media / nativewindow / CapabilitiesChooser.java

http://jogamp.org/git/?p=jogl.git;a=commit;h=8adc04788a6d9dd44de5a4636b46d14dbb70b799

   public int chooseCapabilities(CapabilitiesImmutable desired,

-                                CapabilitiesImmutable[] available,

+                                List /*<CapabilitiesImmutable>*/ available,

                                 int windowSystemRecommendedChoice);


http://jogamp.org/git/?p=jogl.git;a=blobdiff;f=src/nativewindow/classes/javax/media/nativewindow/CapabilitiesChooser.java;h=a306363dc3c3370bfa240ac4f6596a2f67395597;hp=94b0f68af0631adccf950e3e2aa47bc0347f7289;hb=8adc04788a6d9dd44de5a4636b46d14dbb70b799;hpb=02d5240ccac8875144e5f37c2a4d09375338adc2

+++

If you have any concerns about this, pls reply.

~Sven
Reply | Threaded
Open this post in threaded view
|

Re: API: CapabilitiesChooser API change

Michael Bien
  i like that.

Lists are trendy :)

i hope everyone has @Override above that method otherwise it will
silently use the default implementation without notice...

-michael

On 02/01/2011 05:55 PM, Sven Gothel [via jogamp] wrote:

>
> To implement proper caps fetching to generate a list and to ease the caps chosing implementation
> I had to change the API / semantics a little bit.
>
> +++
>
> javax / media / nativewindow / CapabilitiesChooser.java
>
> http://jogamp.org/git/?p=jogl.git;a=commit;h=8adc04788a6d9dd44de5a4636b46d14dbb70b799
>
>     public int chooseCapabilities(CapabilitiesImmutable desired,
>
> -                                CapabilitiesImmutable[] available,
>
> +                                List /*<CapabilitiesImmutable>*/ available,
>
>                                   int windowSystemRecommendedChoice);
>
>
> http://jogamp.org/git/?p=jogl.git;a=blobdiff;f=src/nativewindow/classes/javax/media/nativewindow/CapabilitiesChooser.java;h=a306363dc3c3370bfa240ac4f6596a2f67395597;hp=94b0f68af0631adccf950e3e2aa47bc0347f7289;hb=8adc04788a6d9dd44de5a4636b46d14dbb70b799;hpb=02d5240ccac8875144e5f37c2a4d09375338adc2
>
> +++
>
> If you have any concerns about this, pls reply.
>
> ~Sven
>
>
> _______________________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://jogamp.762907.n3.nabble.com/API-CapabilitiesChooser-API-change-tp2398628p2398628.html
> To start a new topic under jogamp, email [hidden email]
> To unsubscribe from jogamp, visit
http://michael-bien.com/

Reply | Threaded
Open this post in threaded view
|

Re: API: CapabilitiesChooser API change

gouessej
Administrator
In reply to this post by Sven Gothel
I hope the list cannot be modified.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: API: CapabilitiesChooser API change

Sven Gothel
Administrator
On Tuesday, February 01, 2011 22:40:37 gouessej [via jogamp] wrote:
>
> I hope the list cannot be modified.

a) it's generated only at request and not used internally

b) by design we say 'GLCapabilitiesImmutable' - sure, this won't
   hinder a person to cast it to a writable type :)

for new drawables etc .. we don't use a static list
but query it 'live', since it is also a diff choosing strategy
where we try the native one ARB/GLX/GDI 1st.

~Sven