Who's Online
12 user(s) are online (
8 user(s) are browsing
Forums )
Members: 2
Guests: 10
davebraco ,
trixie ,
more...
Headlines
libmpg123.lha - development/library/audio
May 19, 2025
libsdl_mixer.lha - development/library/audio
May 19, 2025
arabic_console_devicepro2.lha - driver/input
May 19, 2025
reportplus.lha - utility/misc
May 19, 2025
amiarcadia.lha - emulation/gamesystem
May 18, 2025
libflac.lha - development/library/audio
May 16, 2025
libmikmod.lha - development/library/audio
May 16, 2025
retroarch_cores_installer.lha - emulation/gamesystem
May 16, 2025
libmodplug.lha - development/library/audio
May 13, 2025
libsdl2_mixer.lha - development/library/audio
May 13, 2025
Topic options
View mode
Newest First
MiniGL - Switch mode : fullscreen & windowed
Posted on:
2009/2/21 22:08
#1
Quite a regular
Joined: 2008/11/3 12:06Last Login
: 2023/8/2 21:18
From South France
Group:
Registered Users
Hi,
I'd like to know how we can, as simple as possible switch from these 2 modes at anytime in an OpenGL/MiniGL application ?
Can I do something like this :
/* Sauter en mode plein ?cran */
void SetFullScreenMode (){
if ( FullSCREEN = 0 ){
glutGameModeString ( "640x480:32" );
glutEnterGameMode ();
FullSCREEN == 1 ;
}
}
/* Sauter en mode fen?tr? */
void SetWindowMode (){
If ( FullSCREEN = 1 ){
glutLeaveGameMode () ;
FullSCREEN == 0 ;
}
}
and call SetFullScreenMode to jump in fullscreen mode and SetWindowMode to jump in windowed mode ?
Kindest Regards,
Freddix.
All we have to decide is what to do with the time that is given to us.
Re: MiniGL - Switch mode : fullscreen & windowed
Posted on:
2009/2/21 23:15
#2
Home away from home
Joined: 2007/1/26 21:48Last Login
: 5/14 5:45
From New Zealand
Group:
Registered Users
@freddix
Quote:
freddix wrote: Hi, I'd like to know how we can, as simple as possible switch from these 2 modes at anytime in an OpenGL/MiniGL application ? Can I do something like this :
/* Sauter en mode plein ?cran */
void SetFullScreenMode (){
if ( FullSCREEN = 0 ){
glutGameModeString ( "640x480:32" );
glutEnterGameMode ();
FullSCREEN == 1 ;
}
}
/* Sauter en mode fen?tr? */
void SetWindowMode (){
If ( FullSCREEN = 1 ){
glutLeaveGameMode () ;
FullSCREEN == 0 ;
}
}
and call SetFullScreenMode to jump in fullscreen mode and SetWindowMode to jump in windowed mode ? Kindest Regards, Freddix.That should work. If it doesn't, let me know.
Hans
Re: MiniGL - Switch mode : fullscreen & windowed
Posted on:
2009/2/21 23:29
#3
Quite a regular
Joined: 2008/11/3 12:06Last Login
: 2023/8/2 21:18
From South France
Group:
Registered Users
@Hans
Thank you Hans
If course, FullSCREEN is declared as global :
int FullSCREEN ;
All we have to decide is what to do with the time that is given to us.
Re: MiniGL - Switch mode : fullscreen & windowed
Posted on:
2009/2/21 23:40
#4
Home away from home
Joined: 2007/1/26 21:48Last Login
: 5/14 5:45
From New Zealand
Group:
Registered Users
@freddix
Quote:
freddix wrote: @Hans Thank you Hans If course, FullSCREEN is declared as global :
int FullSCREEN ;
As a general rule, use:
BOOL fullscreen = FALSE;
in C
and:
bool fullscreen = false;
in C++. It's cleaner that way, because it makes it clear that these are boolean variables.
Hans
Re: MiniGL - Switch mode : fullscreen & windowed
Posted on:
2009/2/22 0:29
#5
Quite a regular
Joined: 2008/11/3 12:06Last Login
: 2023/8/2 21:18
From South France
Group:
Registered Users
@Hans ok. Thank you.
All we have to decide is what to do with the time that is given to us.
Re: MiniGL - Switch mode : fullscreen & windowed
Posted on:
2009/2/22 14:10
#6
Quite a regular
Joined: 2006/11/27 14:24Last Login
: Today 9:03
From Scarfskerry
Group:
Registered Users
@freddix As an O/T aside can you or someone else tell me where to get the headers that can be used with the GLUT examples. I tried to compile the basic example but it fails. I did find the minigl 1.5.1 on OS4 Depot which had some headers but these must be too old for even the basic example. Where do you get ones that work ? Using the included makefile I get: GLUT-basic.o: In function `reshape': /SDK/local/newlib/include/mgl/minigl.h:1323: undefined reference to `GLUPerspective' make: *** [GLUT-basic] Error 1 Would it not be a good idea for these examples to either include the required headers or at least tell you where to get them? Bill.
Re: MiniGL - Switch mode : fullscreen & windowed
Posted on:
2009/2/22 17:00
#7
Quite a regular
Joined: 2008/11/3 12:06Last Login
: 2023/8/2 21:18
From South France
Group:
Registered Users
@BillE MiniGL 2.0 should be released when the Hyperion website will be back online. (it's what Hans said on an other post I've made on amigans.net). You should then get these files soonly.
All we have to decide is what to do with the time that is given to us.
Re: MiniGL - Switch mode : fullscreen & windowed
Posted on:
2009/2/22 19:50
#8
Quite a regular
Joined: 2006/11/27 14:24Last Login
: Today 9:03
From Scarfskerry
Group:
Registered Users
@freddix > MiniGL 2.0 should be released when the Hyperion website will be back online. Good news. But what is puzzling me is how anyone can be compiling these examples NOW ?????? What headers are you using ? Bill.
Re: MiniGL - Switch mode : fullscreen & windowed
Posted on:
2009/2/22 21:09
#9
Home away from home
Joined: 2007/1/26 21:48Last Login
: 5/14 5:45
From New Zealand
Group:
Registered Users
@BillE
Quote:
BillE wrote: @freddix > MiniGL 2.0 should be released when the Hyperion website will be back online. Good news. But what is puzzling me is how anyone can be compiling these examples NOW ?????? What headers are you using ? Bill.If you need the headers, I can send them to you. It's not ready for general release yet, but I can provide files for developers that need them. I'm hoping that the Hyperion website (and MiniGL repository) will be back up soon, so that I can do a proper beta release.
Hans
Re: MiniGL - Switch mode : fullscreen & windowed
Posted on:
2009/2/23 10:22
#10
Quite a regular
Joined: 2006/11/27 14:24Last Login
: Today 9:03
From Scarfskerry
Group:
Registered Users
@Hans Cheers. I have PM'd you. Regards, Bill.
Re: MiniGL - Switch mode : fullscreen & windowed
Posted on:
2009/2/23 14:17
#11
Amigans Defender
Joined: 2006/12/2 13:27Last Login
: Today 7:46
From Taranto, Italy
Group:
Staff members Moderators Registered Users
@Hans it is possible to het the handle of the window, or maybe the current screen of the minigl window?
Re: MiniGL - Switch mode : fullscreen & windowed
Posted on:
2009/2/23 21:32
#12
Home away from home
Joined: 2007/1/26 21:48Last Login
: 5/14 5:45
From New Zealand
Group:
Registered Users
@afxgroup
Quote:
afxgroup wrote: @Hans it is possible to het the handle of the window, or maybe the current screen of the minigl window?mglGetWindowHandle()
Re: MiniGL - Switch mode : fullscreen & windowed
Posted on:
2009/2/25 21:51
#13
Amigans Defender
Joined: 2006/12/2 13:27Last Login
: Today 7:46
From Taranto, Italy
Group:
Staff members Moderators Registered Users
@Hans
uhm..
MyWindow = ( struct Window *) mglGetWindowHandle ();
UserPortMsg = MyWindow -> UserPort ;
if ( ( MyScreen = IIntuition -> LockPubScreen ( "Workbench" ) ) )
{
vi = IGadTools -> GetVisualInfoA ( MyScreen , NULL );
if ( vi )
{
menu = IGadTools -> CreateMenusA ( nm , NULL );
if ( menu )
{
if ( IGadTools -> LayoutMenus ( menu , vi , GTMN_NewLookMenus , TRUE , TAG_END )) {
if ( IIntuition -> SetMenuStrip ( MyWindow , menu ))
printf ( "menu attached\n" );
else
printf ( "error attaching menus\n" );
}
}
}
}
if ( MyScreen ) IIntuition -> UnlockPubScreen ( NULL , MyScreen );
seems to work since i get "menu attached" but no menus are displayed on screen.. what's wrong?
Re: MiniGL - Switch mode : fullscreen & windowed
Posted on:
2009/2/25 22:01
#14
Just can't stay away
Joined: 2006/11/30 11:30Last Login
: Yesterday 4:06
From Finland
Group:
Registered Users
@afxgroup Maybe MiniGL uses WA_RMBTrap to trap the right mouse button. If so there would be no menus. You can try setting it to FALSE using IIntuition->SetWindowAttr().
Re: MiniGL - Switch mode : fullscreen & windowed
Posted on:
2009/2/25 22:01
#15
Quite a regular
Joined: 2008/11/3 12:06Last Login
: 2023/8/2 21:18
From South France
Group:
Registered Users
@afxgroup: Why didn't you create directly a new fresh post for your problem ? It may have been more "clear" and you can get better visibility on your question with a dedicaced post. Kindest Regards, Freddix
All we have to decide is what to do with the time that is given to us.
Re: MiniGL - Switch mode : fullscreen & windowed
Posted on:
2009/2/25 22:02
#16
Amigans Defender
Joined: 2006/12/2 13:27Last Login
: Today 7:46
From Taranto, Italy
Group:
Staff members Moderators Registered Users
@freddix because it related to minigl window..
Re: MiniGL - Switch mode : fullscreen & windowed
Posted on:
2009/2/25 22:18
#17
Amigans Defender
Joined: 2006/12/2 13:27Last Login
: Today 7:46
From Taranto, Italy
Group:
Staff members Moderators Registered Users
@salass00 Thanks mate! this is the problem! :) [edit] By the way.. the background is black.. and the foreground too.. :-/
Edited by afxgroup on 2009/2/25 22:36:35
Currently Active Users Viewing This Thread:
1
(
0 members
and 1 Anonymous Users
)