Login  Register

Re: JOGL2...need some advice

Posted by DerTheri_ on Jan 05, 2011; 8:24am
URL: https://forum.jogamp.org/JOGL2-need-some-advice-tp2181185p2197193.html

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 :)