Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
167 user(s) are online (150 user(s) are browsing Forums)

Members: 1
Guests: 166

billyfish, more...

Support us!

Headlines

 
  Register To Post  

MiniGL - Switch mode : fullscreen & windowed
Quite a regular
Quite a regular


See User information
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 ){
    
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.
Go to top
Re: MiniGL - Switch mode : fullscreen & windowed
Home away from home
Home away from home


See User information
@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 ){
    
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

Join Kea Campus' Amiga Corner and support Amiga content creation
https://keasigmadelta.com/ - see more of my work
Go to top
Re: MiniGL - Switch mode : fullscreen & windowed
Quite a regular
Quite a regular


See User information
@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.
Go to top
Re: MiniGL - Switch mode : fullscreen & windowed
Home away from home
Home away from home


See User information
@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

Join Kea Campus' Amiga Corner and support Amiga content creation
https://keasigmadelta.com/ - see more of my work
Go to top
Re: MiniGL - Switch mode : fullscreen & windowed
Quite a regular
Quite a regular


See User information
@Hans
ok.
Thank you.

All we have to decide is what to do with the time that is given to us.
Go to top
Re: MiniGL - Switch mode : fullscreen & windowed
Quite a regular
Quite a regular


See User information
@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.

Go to top
Re: MiniGL - Switch mode : fullscreen & windowed
Quite a regular
Quite a regular


See User information
@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.
Go to top
Re: MiniGL - Switch mode : fullscreen & windowed
Quite a regular
Quite a regular


See User information
@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.

Go to top
Re: MiniGL - Switch mode : fullscreen & windowed
Home away from home
Home away from home


See User information
@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

Join Kea Campus' Amiga Corner and support Amiga content creation
https://keasigmadelta.com/ - see more of my work
Go to top
Re: MiniGL - Switch mode : fullscreen & windowed
Quite a regular
Quite a regular


See User information
@Hans

Cheers. I have PM'd you.


Regards,

Bill.

Go to top
Re: MiniGL - Switch mode : fullscreen & windowed
Amigans Defender
Amigans Defender


See User information
@Hans

it is possible to het the handle of the window, or maybe the current screen of the minigl window?

Go to top
Re: MiniGL - Switch mode : fullscreen & windowed
Home away from home
Home away from home


See User information
@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()

Join Kea Campus' Amiga Corner and support Amiga content creation
https://keasigmadelta.com/ - see more of my work
Go to top
Re: MiniGL - Switch mode : fullscreen & windowed
Amigans Defender
Amigans Defender


See User information
@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 (
MyScreenIIntuition->UnlockPubScreen(NULLMyScreen);


seems to work since i get "menu attached" but no menus are displayed on screen.. what's wrong?

Go to top
Re: MiniGL - Switch mode : fullscreen & windowed
Just can't stay away
Just can't stay away


See User information
@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().

Go to top
Re: MiniGL - Switch mode : fullscreen & windowed
Quite a regular
Quite a regular


See User information
@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.
Go to top
Re: MiniGL - Switch mode : fullscreen & windowed
Amigans Defender
Amigans Defender


See User information
@freddix

because it related to minigl window..

Go to top
Re: MiniGL - Switch mode : fullscreen & windowed
Amigans Defender
Amigans Defender


See User information
@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
Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project