We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOpenGL and 3D Libraries › opengl new fullscreen window in a browser
Page Index Toggle Pages: 1
opengl new fullscreen window in a browser ? (Read 1071 times)
opengl new fullscreen window in a browser ?
Jun 24th, 2008, 7:58pm
 
Hello :)

I searched everywhere but the more I search and the more I'm confused.

I'd like to make a kind of widget like the youtube player but with processing. When you click on the little youtube player to enlarge it, you have a fullscreen window (not in a new window of the browser but directly launched)

So :
1 / a little applet in the browser (400x320px)
2 / you click
3 / a fullscreen window
4 / you click, or you press the window key
5 / the fullscreen window close.

Anyone has an idea ? Is it possible to make a light applet which works like that ?

Thank you very much ! :)
Re: opengl new fullscreen window in a browser ?
Reply #1 - Jun 25th, 2008, 12:14am
 
I think that to do anything like that you'd have to use the Java Web Start stuff, to get it running as a separate program, and able to do thing like full-screen.

There's no way for an applet to go full screen, outside of the browser window bounds.
Re: opengl new fullscreen window in a browser ?
Reply #2 - Jun 25th, 2008, 1:07am
 
no way ? are you sure ? I'm not ;
with the controlP5 lib I could launch in a browser a new window of the java virtual machine, and with an openGL example I could open a new window in fullscreen, but it doesn't work when I export the applet :/

there they matched to do it :
http://evil.hackademix.net/fullscreen/applet.html
but I don't know how. And I don't know how to hide the bar in the bottom of the screen. May be with a signed jar ?
Re: opengl new fullscreen window in a browser ?
Reply #3 - Jun 25th, 2008, 7:18am
 
The source code is given in the linked page: http://hackademix.net/2007/08/25/dude-wheres-your-code/
They just create a frame and set it to maximum size.
And indeed some Flash windows, showing movies or animations, can be set to real full screen, but perhaps they use some other lower level trick.
Re: opengl new fullscreen window in a browser ?
Reply #4 - Jun 27th, 2008, 1:27pm
 
thanks for the source ! :)
That's exactly what I want. There is a bar in the bottom of the screen, but I think it can be hidden if the applet is signed..
But when I try to compile it with processing it doesn't work :( did you try to do it ?
I know it's pure java, but I don't know how to convert it for processing... :/
Re: opengl new fullscreen window in a browser ?
Reply #5 - Jun 28th, 2008, 11:00am
 
I didn't tried it.
I took only the core of the idea and put it in the setup() routine:
Code:
void setup()
{
Window w = new Window(new Frame());
Label l = new Label("Trying Full Screen");
l.setFont(new Font("Serif", Font.BOLD, 120));
l.setAlignment(Label.CENTER);
l.setForeground(Color.white);

l.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));

w.setBackground(Color.black);
w.setLayout(new BorderLayout());
w.add(l, BorderLayout.CENTER);

Dimension ss = Toolkit.getDefaultToolkit().getScreenSize();
w.setBounds(0, -128, ss.width, ss.height + 256);

w.setVisible(true);
}

Ran from the PDE, it is actually full screen. There is still the Processing window, which is nice at it allows me to close the window... Cheesy Perhaps you should replace the Label by a PGraphics or something: Processing drawing should go in this window.
I hope this starting point will push you on the way.
Page Index Toggle Pages: 1