July 18, 2019, 01:30:36 PM

Author Topic: possible to hide the window text bar in Blitzmax ?  (Read 886 times)

Offline drfloyd

  • Jr. Member
  • **
  • Posts: 35
possible to hide the window text bar in Blitzmax ?
« on: May 05, 2019, 05:40:03 PM »
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)

Offline Derron

  • Hero Member
  • *****
  • Posts: 2206
Re: possible to hide the window text bar in Blitzmax ?
« Reply #1 on: May 05, 2019, 06:02:02 PM »
What problem with flip do you have?

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


Bye
Ron

Offline drfloyd

  • Jr. Member
  • **
  • Posts: 35
Re: possible to hide the window text bar in Blitzmax ?
« Reply #2 on: May 05, 2019, 06:09:39 PM »
I use multi FLIP in a loop and it is a big problem in fullscreen, not in window mode.

What is Sdl.mod please ?

Offline Derron

  • Hero Member
  • *****
  • Posts: 2206
Re: possible to hide the window text bar in Blitzmax ?
« Reply #3 on: May 05, 2019, 06:33:05 PM »
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

Offline markcwm

  • Sr. Member
  • ****
  • Posts: 390
Re: possible to hide the window text bar in Blitzmax ?
« Reply #4 on: May 05, 2019, 06:52:21 PM »
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.

Offline drfloyd

  • Jr. Member
  • **
  • Posts: 35
Re: possible to hide the window text bar in Blitzmax ?
« Reply #5 on: May 05, 2019, 06:53:51 PM »
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)

Online Steve Elliott

  • Hero Member
  • *****
  • Posts: 1838
Re: possible to hide the window text bar in Blitzmax ?
« Reply #6 on: May 05, 2019, 07:01:50 PM »
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.
Windows 10, 64-bit, 16Gb RAM, CPU Intel i5, 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb).
MacOS Mojave, 64-bit, 8Gb RAM, CPU Intel i5, 2.3 Ghz, Intel Iris Plus Graphics 640 1536 MB.
Linux Mint 19.1, 64-bit, 16Gb RAM, CPU Intel i5, 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb).
Raspbian Buster, pi4 4Gb RAM,1.5Ghz

Offline drfloyd

  • Jr. Member
  • **
  • Posts: 35
Re: possible to hide the window text bar in Blitzmax ?
« Reply #7 on: May 05, 2019, 07:29:17 PM »
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

Online Steve Elliott

  • Hero Member
  • *****
  • Posts: 1838
Re: possible to hide the window text bar in Blitzmax ?
« Reply #8 on: May 05, 2019, 07:56:39 PM »
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.
Windows 10, 64-bit, 16Gb RAM, CPU Intel i5, 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb).
MacOS Mojave, 64-bit, 8Gb RAM, CPU Intel i5, 2.3 Ghz, Intel Iris Plus Graphics 640 1536 MB.
Linux Mint 19.1, 64-bit, 16Gb RAM, CPU Intel i5, 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb).
Raspbian Buster, pi4 4Gb RAM,1.5Ghz

Offline Qube

  • Administrator
  • Hero Member
  • *****
  • Posts: 1960
Re: possible to hide the window text bar in Blitzmax ?
« Reply #9 on: May 05, 2019, 08:42:36 PM »
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.
Until the next time...

Offline Derron

  • Hero Member
  • *****
  • Posts: 2206
Re: possible to hide the window text bar in Blitzmax ?
« Reply #10 on: May 05, 2019, 09:56:13 PM »
@ Qube
The intial post says "BlitzMax".


bye
Ron

Offline Qube

  • Administrator
  • Hero Member
  • *****
  • Posts: 1960
Re: possible to hide the window text bar in Blitzmax ?
« Reply #11 on: May 05, 2019, 10:17:20 PM »
@ 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.
Until the next time...

Offline drfloyd

  • Jr. Member
  • **
  • Posts: 35
Re: possible to hide the window text bar in Blitzmax ?
« Reply #12 on: May 05, 2019, 10:29:18 PM »
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...

Offline Qube

  • Administrator
  • Hero Member
  • *****
  • Posts: 1960
Re: possible to hide the window text bar in Blitzmax ?
« Reply #13 on: May 05, 2019, 11:15:07 PM »
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 :)
Until the next time...

Offline drfloyd

  • Jr. Member
  • **
  • Posts: 35
Re: possible to hide the window text bar in Blitzmax ?
« Reply #14 on: May 06, 2019, 07:22:07 AM »
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