Raydium 3D Game Engine

Official forum for everything about Raydium, ManiaDrive, MeMak, ...
It is currently Thu Mar 28, 2024 7:53 pm

All times are UTC




Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: Mon Sep 15, 2008 12:50 am 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
I've designed my app to be played into a 640x480 window.
How can I avoid the user be able to change the size of this window?


Top
 Profile  
 
PostPosted: Mon Sep 15, 2008 8:44 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2591
Location: gnniiiii (Scrat)
MyGLUT does not provide this feature. I can have a look at X11 version to add this, but this change must be done in all 3 current targets, so it's not an easy task.

Percentage do the trick most of the time. Can't you get rid of fixed positions/sizes in your game ?


Last edited by Xfennec on Tue Sep 16, 2008 9:30 pm, edited 1 time in total.
last sentence was all wrong. fixed. sorry ! :)


Top
 Profile  
 
PostPosted: Tue Sep 16, 2008 4:16 pm 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
I don't understand the last question.

By other way, ST is agree with the idea:
Quote:
<st> ok
<st> So lets make the Raydium window resizeable! :D
<vicentecarro> yes, i can not access to window, just the content of the window.... I go to paste a capture, so, it's easy to see what I have got
<st> I'll wait with the mac changes until one platform is finished, so I can see the way that I have to do. ;)
(from the chat)


Top
 Profile  
 
PostPosted: Tue Sep 16, 2008 9:21 pm 
Offline

Joined: Tue Jul 08, 2008 2:37 am
Posts: 181
vicente wrote:
I don't understand the last question.

Probably you're using fixed constant values for elements on the screen. When you resize the window, the context of the drawable area is also changing and perhaps the aspect ration will be not the same as before. You can calculate the distance to the context border to render the elements on the same positions for example.
Is this the right issue I'm talking about? I'll give an example:

1. Open up your 640x480 window. This is 4:3 with fixed dimensions. The elements have fixed positions.

Screen 4:3 static:
Image


2. Resize the window from 640x480 to 1440x900. This is 16:10. You have modified the aspect radio. The elements have fixed positions, so the context and also the elements were stretched up and look ugly.

Screen 16:10 static:
Image


3. Resize the window from 640x480 to 1440x900. This is 16:10. You have modified the aspect radio. The context size is now aligned to the window resolution and the elements have dynamic positions, which we are calculating on each frame when the window/context size has been changed.

Screen 16:10 dynamic:
Image


Top
 Profile  
 
PostPosted: Tue Sep 16, 2008 9:27 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2591
Location: gnniiiii (Scrat)
So, two things :

1) About my confuse sentence: Most of the time, you can easily build an application that does not care about the real screen size. OSD functions, for instance, use percentage of the screen for positions and sizes. Same for GUI, ...
Then it's not a trouble to allow the user to resize the window.
My question was: what makes your application "unresizable", and can you fix this ?

2) My turn to not understand :) Do you mean that st is OK to apply the change for unresizable windows ? (your IRC log seems to show that st talks about resizable windows, that's why I'm confused). By the way, I had a quick look about this feature yesterday, and I can easily add this for Linux, and probably win32 (still have to check AdjustWindowRect() styles for this one), so if st is OK, we can do this quiet quickly.

warning edit: all this was wrote before st's post :) Aspect ratio is another point (that Raydium can't deal with, actually)


Top
 Profile  
 
PostPosted: Tue Sep 16, 2008 9:51 pm 
Offline

Joined: Tue Jul 08, 2008 2:37 am
Posts: 181
Xfennec wrote:
2) Do you mean that st is OK to apply the change for unresizable windows ? (your IRC log seems to show that st talks about resizable windows, that's why I'm confused).

I've to throw light on the resizable stuff here. :lol:

Currently it is not possible to resize a window under Mac OS X, so it is unresizable every time for now. You have to restart the application to change the resolution, the zoom specific window option is disabled.

As written on IRC, we could make the window resizable. I'll wait until one platform is finished.
Should it be an option for the user? What is the default? Resizable or unresizable?


Top
 Profile  
 
PostPosted: Tue Sep 16, 2008 11:19 pm 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
The default in linux is resizable


Top
 Profile  
 
PostPosted: Wed Sep 17, 2008 9:07 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2591
Location: gnniiiii (Scrat)
and win32 too, just to make things clear ;)

st, let's do this: I'll update Linux and win32 ports to add another window creation mode : RAYDIUM_RENDERING_WINDOW_FIXED. Then you will be able to update your port so it use this new style for the current code, and create a new "path" for the regular RAYDIUM_RENDERING_WINDOW mode.

And we may update the doc, because it's now quiet clear that it's not obvious that RAYDIUM_RENDERING_WINDOW also means "resizable" :)


Top
 Profile  
 
PostPosted: Fri Sep 19, 2008 3:39 pm 
Offline

Joined: Tue Jul 08, 2008 2:37 am
Posts: 181
I was to impatient, so the Mac part should be prepared for the new RAYDIUM_RENDERING_WINDOW_FIXED mode (see Subversion revision 760). :roll:

This new option should also be available with the command line interface of Raydium. My suggestion: "--window-fixed".


Top
 Profile  
 
PostPosted: Fri Sep 19, 2008 8:43 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2591
Location: gnniiiii (Scrat)
Raydium, MyGLUT core, and MyGLUT X11 updated for our new RAYDIUM_RENDERING_WINDOW_FIXED mode. See rev 761. MyGLUT win32 update to come tonight.

I just saw your CLI option suggestion. I do it right now.


Top
 Profile  
 
PostPosted: Fri Sep 19, 2008 10:33 pm 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
Thanks you two :D


Top
 Profile  
 
PostPosted: Fri Sep 19, 2008 11:11 pm 
Offline

Joined: Tue Jul 08, 2008 2:37 am
Posts: 181
You're welcome! :D


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 33 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group