JOGL2...need some advice

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

JOGL2...need some advice

DerTheri
hello @all,

i got some big big problems,

i use netbeans 6.9 and the Netbeans-Jogl2-Pack...
ist easy to install and easy to use.

my demos using fullscreen mode and flicking like hell when started outside netbeans,
and i absolutly dont know why (vert. sync on/sync of).

i was thinking that i need a newer version/build of jogl2..
i found some libarys here and loaded the latest jogl paket i found
but i am not able to understand how to bring it to work inside netbeans.

(one try was to use the sample jogl2 in netbeans and change the lib: jogl.all.jar,gluegen_rt.all.jar,nativewindow.all.jar and newt.all.jar) it ends up with thousands of errors.

i need something like -this > download this(jogl2 build),extract there,do this,do that,use this code...hello world (perfect)

can anybody pleas help me?

Reply | Threaded
Open this post in threaded view
|

Re: JOGL2...need some advice

Michael Bien
Hello,

you are probably using one of the over two years old test builds of the NB OpenGL pack. The current version of jogl changed a lot and is not backwards compatible. The OpenGL Pack is also no longer maintained from me (sorry to disappoint you here).

but setting up jogl in NB is easy. There are two basic steps which you will have to do in ANY IDE:
1. add the jars to the classpath (project configuration)
2. add the native libs to the library path (run configuration)

for NetBeans (Ant based projects):
to 1. right mouse button on the project -> properties -> Libraries -> Add JAR/Folder -> ....
to 2. (in the same project properties dialog) -> Run -> enter in the "VM Options" text field: -Djava.library.path="path to the native libs"

a few notes to 2:
- relative paths will work
- you see a lot more options in the nbproject/project.properties file if you prefere editing it by hand

hope that helps a bit,
best regards,
michael


On 01/02/2011 08:33 PM, DerTheri [via jogamp] wrote:
hello @all,

i got some big big problems,

i use netbeans 6.9 and the Netbeans-Jogl2-Pack...
ist easy to install and easy to use.

my demos using fullscreen mode and flicking like hell when started outside netbeans,
and i absolutly dont know why (vert. sync on/sync of).

i was thinking that i need a newer version/build of jogl2..
i found some libarys here and loaded the latest jogl paket i found
but i am not able to understand how to bring it to work inside netbeans.

(one try was to use the sample jogl2 in netbeans and change the lib: jogl.all.jar,gluegen_rt.all.jar,nativewindow.all.jar and newt.all.jar) it ends up with thousands of errors.

i need something like -this > download this(jogl2 build),extract there,do this,do that,use this code...hello world (perfect)

can anybody pleas help me?




View message @ http://jogamp.762907.n3.nabble.com/JOGL2-need-some-advice-tp2181185p2181185.html
To start a new topic under jogamp, email [hidden email]
To unsubscribe from jogamp, click here.

-- 
http://michael-bien.com/
Reply | Threaded
Open this post in threaded view
|

Re: JOGL2...need some advice

DerTheri_
thank you so much for this concrete help :)

my projects now run with the actual jogl version :)


its the easyest way to put the /lib(all) and /jar(jogl.all,gluegen_rt,nativewindow.all,newt.all)
from the latest jogl build  together inside
a lib folder in the project folder (like the netbean-opengl-pack was doing)

in the propertys
the lib / compile -> the 4 jar files (/lib/jogl.all.jar...)

and in RUN / VM-OPTIONS:
-Djava.library.path="lib"

i am happy again :)

thanks alot michael  (and sorry for my bad english)


(p.s.: this board blocked me to login again, so i create new account)
Reply | Threaded
Open this post in threaded view
|

Re: JOGL2...need some advice

Michael Bien
On 01/03/2011 09:59 AM, DerTheri_ [via jogamp] wrote:
> thank you so much for this concrete help :)
>
> my projects now run with the actual jogl version :)
no problem + congratulations!


>
>
> its the easyest way to put the /lib(all) and
> /jar(jogl.all,gluegen_rt,nativewindow.all,newt.all)
> from the latest jogl build  together inside
> a lib folder in the project folder (like the netbean-opengl-pack was
> doing)
>
> in the propertys
> the lib / compile -> the 4 jar files (/lib/jogl.all.jar...)
>
> and in RUN / VM-OPTIONS:
> -Djava.library.path="lib"
exactly - thats how i setup the projects too usually.

>
> i am happy again :)
>
> thanks alot michael  (and sorry for my bad english)

I am glad that i could help. Your english is ok, just keep asking if you
have further questions.

happy coding,
-michael


--
- - - -
http://michael-bien.com

Reply | Threaded
Open this post in threaded view
|

Re: JOGL2...need some advice

DerTheri_
its only a small thing that i am not sure how it works.

inside the ide(NB) the demos run perfect, outside (as a standalone programm) i didnt bring it to work.

is there anything i need to take a look at?

( at moment i use as test the simple demo ( quad and the triangle in a window) )


greeting theri
Reply | Threaded
Open this post in threaded view
|

Re: JOGL2...need some advice

Michael Bien
as previously mentioned the jvm will need the classpath and the library path. If you specify it both should run.

commandline:
java -cp ../lib/jogl.all.jar:.......:myapp.jar -Djava.library.path="../lib" de.mypackage.MyApp

(on windows you have to use ';' instead of the ':' as path seperator)

If you want to distribute your application you will have to create start scripts or some kind of installer which does that for you (e.g http://izpack.org/).

(... or simply use webstart)

if all what you want is to run your app without starting netbeans cd into the project directory and invoke ant which will compile and run it.

-michael

On 01/03/2011 06:09 PM, DerTheri_ [via jogamp] wrote:
its only a small thing that i am not sure how it works.

inside the ide(NB) the demos run perfect, outside (as a standalone programm) i didnt bring it to work.

is there anything i need to take a look at?

( at moment i use as test the simple demo ( quad and the triangle in a window) )


greeting theri



View message @ http://jogamp.762907.n3.nabble.com/JOGL2-need-some-advice-tp2181185p2186142.html
To start a new topic under jogamp, email [hidden email]
To unsubscribe from jogamp, click here.

-- 
http://michael-bien.com/
Reply | Threaded
Open this post in threaded view
|

Re: JOGL2...need some advice

DerTheri_
omg...

my mistake was the same like in the ide...missing the path to the libs
(i am sorry, i need to use my brain first)

i start my demos now via shortcut symbol "javaw -jar ... " its all perfect!


did you get me an hint how to load an float32 texture...
i need an compactible float32 texture (google search tell me that i need float32_ati)
to access in the vertex shader. (i need it for an landscape renderer)
can i do this with the
texture = TextureIO.newTexture(new File("gfx/landscape.png"), true); ?


another thing:
i found some very funny things in jogl2...and it also runs on 2 other (different) machines the same way:
its about the fullscreen...i got fullscreen...in a strange way

without the first line of my init code (see below)  (i call it the crazy magic line) jogl starts
and i see the taskbar of windows7/vista(normal thing)
 ..but with this line enabled  i get a fullscreen mode without taskbar (without calling a switch to fullscreen)..
...when turning sync of, i get a speed of about 500fps!!!)..so its perfect!

(tested on notebook win7/geforce win7/ati and vista/geforce without the "white/black screen effect,or any flicking)

...

 frame.setSize(screen_x,screen_y-40);   //<- the crazy magic line  (without this..taskbar visible, with this..fullscreen)

        frame.setLocationRelativeTo(null);
        frame.setVisible(true);

        DisplayMode mode;
        GraphicsDevice gDev = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
       
        if (gDev.isFullScreenSupported())
        {  
        frame.setSize(screen_x,screen_y); // <- and again the setSize call
        }

        animator.start();
        canvas.requestFocusInWindow();

        frame.setState(Frame.NORMAL);
...


thanks for all your help

theri :)
Reply | Threaded
Open this post in threaded view
|

Re: JOGL2...need some advice

gouessej
Administrator
It is not magic, it is better to set the size of the frame before using the fullscreen exclusive mode and actually, this mode does not give any real performance boost compared to simulated fullscreen mode used properly whatever the version of JOGL you use.
Julien Gouesse | Personal blog | Website