Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualVortez

Posted 19 September 2013 - 04:24 AM

Hi, i have this program that i can switch from windowed mode to fullscreen and vice versa, but i don't really like the way it work.

 

For now, the only thing that work is to "shutdown" and reinitialize opengl, then reload textures, which introduce some lag when doing the switch.

Also, if i switch too fast (ie: pressing my switch mode key fast twice in a row), sometime the context failed to create so it's not very good.

 

The thing is, i've seen games like warcraft that can switch pretty fast, especially between fullscreen and a mix of fullscreen and windowed mode (how do you even do this???).

The ps2 emulator does this very nicely too when you double click on the main window.

 

Another thing that bug me is that, since im using delphi for this app, every time i change the window style from normal to a borderless fullscreen window, the window handle change, so i got a completely different window. This is not a serious problem though, since i could just use CreateWindowEx and do it myself if i really wanted to, although i dunno if i would be able to add a TScrollbox window component afterward, which is needed sometime when the image i draw is not stretched but drawn at normal size.

 

What am i doing wrong? I think someone shoud create a tutorial on that because it's a pretty common thing in games and program like mine, but the information on the subject is almost non existant...

 

Also, does DirectX handle this better?


#7Vortez

Posted 19 September 2013 - 04:12 AM

Hi, i have this program that i can switch from windowed mode to fullscreen and vice versa, but i don't really like the way it work.

 

For now, the only thing that work is to "shutdown" and reinitialize opengl, then reload textures, which introduce some lag when doing the switch.

Also, if i switch too fast (ie: pressing my switch mode key fast twice in a row), sometime the context failed to create so it's not very good.

 

The thing is, i've seen games like warcraft that can switch pretty fast, especially between fullscreen and a mix of fullscreen and windowed mode (how do you even do this???).

The ps2 emulator does this very nicely too when you double click on the main window.

 

Another thing that bug me is that, since im using delphi for this app, every time i change the window style from normal to a borderless fullscreen window, the window handle change, so i got a completely different window. This is not a serious problem though, since i could just use CreateWindowEx and do it myself if i really wanted to, although i dunno if i would be able to add a TScrollbox window component afterward, which is needed sometime when the image i draw is not stretched but drawn at normal size.

 

What am i doing wrong? I think someone shoud create a tutorial on that because it's a pretty common thing in games and program like mine, but the information on the subject is almost non existant...

 

Also, does DirectX handle this better?


#6Vortez

Posted 19 September 2013 - 04:11 AM

Hi, i have this program that i can switch from windowed mode to fullscreen and vice versa, but i don't really like the way it work.

 

For now, the only thing that work is to "shutdown" and reinitialize opengl, then reload textures, which introduce some lag when doing the switch.

Also, if i switch too fast (ie: pressing my switch mode key twice in a row), sometime the context failed to create so it's not very good.

 

The thing is, i've seen games like warcraft that can switch pretty fast, especially between fullscreen and a mix of fullscreen and windowed mode (how do you even do this???).

The ps2 emulator does this very nicely too when you double click on the main window.

 

Another thing that bug me is that, since im using delphi for this app, every time i change the window style from normal to a borderless fullscreen window, the window handle change, so i got a completely different window. This is not a serious problem though, since i could just use CreateWindowEx and do it myself if i really wanted to, although i dunno if i would be able to add a TScrollbox window component afterward, which is needed sometime when the image i draw is not stretched but drawn at normal size.

 

What am i doing wrong? I think someone shoud create a tutorial on that because it's a pretty common thing in games and program like mine, but the information on the subject is almost non existant...

 

Also, does DirectX handle this better?


#5Vortez

Posted 19 September 2013 - 04:09 AM

Hi, i have this program that i can switch from windowed mode to fullscreen and vice versa, but i don't really like the way it work.

 

For now, the only thing that work is to "shutdown" and reinitialize opengl, then reload textures, which introduce some lag when doing the switch.

Also, if i switch too fast (ie: pressing my switch mode key twice in a row), sometime the context failed to create so it's not very good.

 

The thing is, i've seen games like warcraft that can switch pretty fast, especially between fullscreen and a mix of fullscreen and windowed mode (how do you even do this???).

The ps2 emulator does this very nicely too when you double click on the main window.

 

Another thing that bug me is that, since im using delphi for this app, every time i change the window style from normal to a borderless fullscreen window, the window handle change, so i got a completely different window. This is not a serious problem though, since i could just use CreateWindowEx and do it myself if i really wanted to, although i dunno if i would be able to add a TScrollbox window component afterward, which is needed sometime when the image i draw is not stretched but drawn at normal size.

 

What am i doing wrong? I think someone shoud create a tutorial on that because it's a pretty common thing in games and program like mine, but the information on the subject is almost non existant...

 

Does DirectX handle this better?


#4Vortez

Posted 19 September 2013 - 04:09 AM

Hi, i have this program that i can switch from windowed mode to fullscreen and vice versa, but i don't really like the way it work.

 

For now, the only thing that work is to "shutdown" and reinitialize opengl, then reload textures, which introduce some lag when doing the switch.

Also, if i switch too fast (ie: pressing my switch mode key twice in a row), sometime the context failed to create so it's not very good.

 

The thing is, i've seen games like warcraft that can switch pretty fast, especially between fullscreen and a mix of fullscreen and windowed mode (how do you even do this???).

The ps2 emulator does this very nicely too when you double click on the main window.

 

Another thing that bug me is that, since im using delphi for this app, every time i change the window style from normal to a borderless fullscreen window, the window handle change, so i got a completely different window. This is not a serious problem though, since i could just use CreateWindowEx and do it myself if i really wanted to, although i dunno if i would be able to add a Scrollbox window component afterward, which is needed sometime when the image i draw is not stretched but drawn at normal size.

 

What am i doing wrong? I think someone shoud create a tutorial on that because it's a pretty common thing in games and program like mine, but the information on the subject is almost non existant...

 

Does DirectX handle this better?


#3Vortez

Posted 19 September 2013 - 04:08 AM

Hi, i have this program that i can switch from windowed mode to fullscreen and vice versa, but i don't really like the way it work.

 

For now, the only thing that work is to "shutdown" and reinitialize opengl, then reload textures, which introduce some lag when doing the switch.

Also, if i switch too fast (ie: pressing my switch mode key twice in a row), sometime the context failed to create so it's not very good.

 

The thing is, i've seen games like warcraft that can switch pretty fast, especially between fullscreen and a mix of fullscreen and windowed mode.

The ps2 emulator does this very nicely too when you double click on the main window.

 

Another thing that bug me is that, since im using delphi for this app, every time i change the window style from normal to a borderless fullscreen window, the window handle change, so i got a completely different window. This is not a serious problem though, since i could just use CreateWindowEx and do it myself if i really wanted to, although i dunno if i would be able to add a Scrollbox window component afterward, which is needed sometime when the image i draw is not stretched but drawn at normal size.

 

What am i doing wrong? I think someone shoud create a tutorial on that because it's a pretty common thing in games and program like mine, but the information on the subject is almost non existant...

 

Does DirectX handle this better?


PARTNERS