possible to hide the window text bar in Blitzmax ?

Started by drfloyd, May 05, 2019, 17:40:03

Previous topic - Next topic

drfloyd

Hello

In a BLITZMAX game, Windowed mode (so not full screen), is there a possibility to hide the textbar at the top ? (to simulate a fullscreen mode)

(I ask this question because I have difficulties with FLIP in fullscreen, and no problem in Window mode)

Thank you (and sorry again for my english very poor)

Derron

What problem with flip do you have?

Sdl.mod (and the sdl graphics) should allow a borderless window.


Bye
Ron

drfloyd

I use multi FLIP in a loop and it is a big problem in fullscreen, not in window mode.

What is Sdl.mod please ?

Derron

A default module in BlitzMax NG.


@ multiple flip
This is not a bug in BlitzMax but most probably in your code.
A flip does swap buffers. Should not matter where you call it and how often.

Bye
Ron

markcwm

There's a Blitzmax module tweak that can do this Borderless graphics modes, you'll have to edit the files yourself as this was never included in Blitzmax brl.mod or Maxmods brl.mod (which is Brucey's version).

The alternative as Derron says is to use sdl.mod and it seems wxMax supports this too.

drfloyd

Yes Derron, I know it is not a bug, but my game is finish (1000ko .txt !) in BLITZ3D windowed... I used FLIP as a REFRESH, not as a SWAP.... It don't want to recode ALL in MAX for Fullscreen.... It is for that reason I just want a windowed mode fullscreen

In fact I want to use FLIP as a REFRESH, not as a SWAP.... it is not possible ???

BLITZ NG is now stable and fully fonctional ? (last time I try it, the compilation .EXE was not working)

Steve Elliott

#6
Why do you think we flip screens?  Some languages call it a refresh or sync but it accomplishes the same thing.

It means that we don't get flickering, that is why.  You write to a hidden screen then quickly 'flip' the drawn screen into view.  If you draw to a screen as it's updating you would get flickering.  You should have understood this basic concept before ever writing a large program.  It is your fault, not the language.
Win11 64Gb 12th Gen Intel i9 12900K 3.2Ghz Nvidia RTX 3070Ti 8Gb
Win11 16Gb 12th Gen Intel i5 12450H 2Ghz Nvidia RTX 2050 8Gb
Win11  Pro 8Gb Celeron Intel UHD Graphics 600
Win10/Linux Mint 16Gb 4th Gen Intel i5 4570 3.2GHz, Nvidia GeForce GTX 1050 2Gb
macOS 32Gb Apple M2Max
pi5 8Gb
Spectrum Next 2Mb

drfloyd

#7
No, not really the same thing : in some langage the "FLIP" is a single back buffer, a real redraw... and you can insert several "FLIP" anywhere in a loop, without any flickering.

I used it like this (a mistake for BLITZ i know)... It was working in windowed mode, but when I decided to use fullscreen, of course flickering come to me :)

perhaps I am not clear ! LOL

Steve Elliott

Flipping screens multiple times is asking for trouble.  You should simply draw to a back buffer and then flip that screen once per game loop.
Win11 64Gb 12th Gen Intel i9 12900K 3.2Ghz Nvidia RTX 3070Ti 8Gb
Win11 16Gb 12th Gen Intel i5 12450H 2Ghz Nvidia RTX 2050 8Gb
Win11  Pro 8Gb Celeron Intel UHD Graphics 600
Win10/Linux Mint 16Gb 4th Gen Intel i5 4570 3.2GHz, Nvidia GeForce GTX 1050 2Gb
macOS 32Gb Apple M2Max
pi5 8Gb
Spectrum Next 2Mb

Qube

If I remember correctly in Blitz3D windowed mode the command FLIP didn't didn't work the same as in fullscreen mode. You could draw a few things > flip > draw a little more > flip and it would display fine. Doing that in fullscreen would result in a flickering mess.

In a nutshell drfloyd, you've coded your game to fit with that windowed mode oddity and unfortunately it's not going to be the same in fullscreen mode. In fullscreen mode you are dealing with front and back buffers and there is no magic fix to make it act like windowed mode.
Mac Studio M1 Max ( 10 core CPU - 24 core GPU ), 32GB LPDDR5, 512GB SSD,
Beelink SER7 Mini Gaming PC, Ryzen 7 7840HS 8-Core 16-Thread 5.1GHz Processor, 32G DDR5 RAM 1T PCIe 4.0 SSD
MSI MEG 342C 34" QD-OLED Monitor

Until the next time.

Derron

@ Qube
The intial post says "BlitzMax".


bye
Ron

Qube

Quote from: Derron on May 05, 2019, 21:56:13
@ Qube
The intial post says "BlitzMax".
I know but later on he mentions his flip thing with Blitz3D and wants his flip thing in Blitz3D to do the same in BlitzMAX to which it doesn't as that not how the flip thing works.
Mac Studio M1 Max ( 10 core CPU - 24 core GPU ), 32GB LPDDR5, 512GB SSD,
Beelink SER7 Mini Gaming PC, Ryzen 7 7840HS 8-Core 16-Thread 5.1GHz Processor, 32G DDR5 RAM 1T PCIe 4.0 SSD
MSI MEG 342C 34" QD-OLED Monitor

Until the next time.

drfloyd

Quote from: Qube on May 05, 2019, 20:42:36
If I remember correctly in Blitz3D windowed mode the command FLIP didn't didn't work the same as in fullscreen mode. You could draw a few things > flip > draw a little more > flip and it would display fine. Doing that in fullscreen would result in a flickering mess.

In a nutshell drfloyd, you've coded your game to fit with that windowed mode oddity and unfortunately it's not going to be the same in fullscreen mode. In fullscreen mode you are dealing with front and back buffers and there is no magic fix to make it act like windowed mode.

exactly, BLITZ 3D was working like this in windowed mode, it was not a swap but a refresh

I will stay in BLITZ and windowed for this game so... to many thins to re-code...

Qube

Quote from: drfloyd on May 05, 2019, 22:29:18
exactly, BLITZ 3D was working like this in windowed mode, it was not a swap but a refresh

I will stay in BLITZ and windowed for this game so... to many thins to re-code...
I'd say that the best thing to do. Finish off your game but as a windowed game. In future and even in windowed mode always have your main loop as clear screen > draw > flip. That way it'll work in windowed and full screen :)
Mac Studio M1 Max ( 10 core CPU - 24 core GPU ), 32GB LPDDR5, 512GB SSD,
Beelink SER7 Mini Gaming PC, Ryzen 7 7840HS 8-Core 16-Thread 5.1GHz Processor, 32G DDR5 RAM 1T PCIe 4.0 SSD
MSI MEG 342C 34" QD-OLED Monitor

Until the next time.

drfloyd

#14
Yes, I will finish in BLITZ 3D & Windowed mode.

Even if a have perhaps find a solution with BLITZ3D (I remember what i want to do : freeze the main graphic screen, and open a little animation in a window)

setbuffer backbuffer()

do
  clear screen
  draw
  FLIP
  gosub addanim
loop

.addanim
  setbuffer frontbuffer()
  draw
  setbuffer backbuffer()
return

It seems to work but this is shit LOL