Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (744)
Games in Android Showcase (225)
games submitted by our members
Games in WIP (825)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  FullScreen Woes  (Read 1945 times)
0 Members and 1 Guest are viewing this topic.
Offline ranabp

Senior Newbie




Blit Me :)


« Posted 2003-05-25 09:16:30 »

Hi,
   I have a stupid trouble with FullScreen mode. I am setting the Display Mode to 640x480xdesktopDepth.
Now this just gives me an area of 640x480 while the rest of the area is left off as if i just wanted a 640x480 out of the 1024x768 (my Desk res).
If i change to 800x600 then still it gives me a block of 800x600 from 1024x768 Rather than giving me larger pixel size.

Lemme try making it a visual

1024 ->
xxxxxxxxxxxxxxxBBBBBBBB|
xxxxxxxxxxxxxxxBBBBBBBB|
xxxxxxxxxxxxxxxBBBBBBBB|
xxxxxxxxxxxxxxxBBBBBBBB|
xxxxxxxxxxxxxxxBBBBBBBB|
xxxxxxxxxxxxxxxBBBBBBBB|
BBBBBBBBBBBBBBBBBBBBB|
BBBBBBBBBBBBBBBBBBBBB|
BBBBBBBBBBBBBBBBBBBBB|

x = Area delivered to me
B = Background Color of my Frame

Also when i query the Frame for height, it gives me 768 !!

I am currently using 1.4.2 beta. Any clues ?

Offline kevglass

« JGO Spiffy Duke »


Medals: 319
Projects: 25
Exp: 22 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #1 - Posted 2003-05-25 09:52:41 »

Could you dump in your code for setting full screen mode, it might help ppl find the problem?

I'm currently using full screen mode without any issue for instance,

Kev

Offline Abuse

JGO Ninja


Medals: 60


falling into the abyss of reality


« Reply #2 - Posted 2003-05-25 10:38:48 »

Also, what platform are you running on?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline ranabp

Senior Newbie




Blit Me :)


« Reply #3 - Posted 2003-05-25 15:13:49 »

Here is the Code from the method that sets the Display Mode.

Umm. I also noticed that when i set Resolution higher than 1024 , say 1280 and 1600 ; My Frame Width query returns proper values. So its basically for resolutions below 1024x768 !!

Oh Btw Abuse, i am using Windows XP , 1.4.2 beta.


1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
    public static void main(String [] args)
    {
myFrame = new Game();
myFrame.setIconImage(Toolkit.getDefaultToolkit().getImage("./data/images/emg.gif"));
        myFrame.setUndecorated(true);
        myFrame.setVisible(true);

        //GRAPHICS SETUP
        GraphicsDevice systemGfx = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
        DisplayMode resolution = new DisplayMode(640,480,systemGfx.getDisplayMode().getBitDepth(),60);
        systemGfx.setFullScreenWindow(AlienAttaXFrame);

        try
        {
            systemGfx.setDisplayMode(resolution);
        }
        catch(UnsupportedOperationException ue)
        {
            System.out.println("Fullscreen Mode Failed");
            myFrame.setSize(640,480);
            myFrame.setLocation(350,90);
        }

        myFrame.createBufferStrategy(3);
        bufferedGraphics = myFrame.getBufferStrategy();

        // END

        if(ual != null)
        {
            ual.setPriority(Thread.MAX_PRIORITY);
            ual.start();
        }
     }

Offline dominionspy

Innocent Bystander




All alone in the night


« Reply #4 - Posted 2003-06-05 08:03:06 »

This probably has nothing to do with the solution - but what is the difference between myFrame and AlienAttaXFrame?
You set myFrame to be undecorated but then set AlienAttaXFrame to be full-screen.

Also if you are using FullScreen Exclusive mode it is best to add a .setIgnoreRepaint(true) line for the full-screen frame.
Offline trembovetski

Senior Devvie




If only I knew what I'm talking about!


« Reply #5 - Posted 2003-06-05 14:50:36 »

My suggestion: do not make the setVisible(true) call prior to calling setFullScreenWindow. setFullScreenWindow(winow) will make it for you.
Pages: [1]
  ignore  |  Print  
 
 

 
Ecumene (142 views)
2017-09-30 02:57:34

theagentd (206 views)
2017-09-26 18:23:31

cybrmynd (290 views)
2017-08-02 12:28:51

cybrmynd (281 views)
2017-08-02 12:19:43

cybrmynd (292 views)
2017-08-02 12:18:09

Sralse (282 views)
2017-07-25 17:13:48

Archive (950 views)
2017-04-27 17:45:51

buddyBro (1088 views)
2017-04-05 03:38:00

CopyableCougar4 (1652 views)
2017-03-24 15:39:42

theagentd (1412 views)
2017-03-24 15:32:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!