Why doesnt this work in full screen mode

Blitz3D Forums/Blitz3D Programming/Why doesnt this work in full screen mode

RifRaf(Posted 2011) [#1]
In windowed mode, this works fine.. in full screen it gives odd results. I'm not doubting this is expected by those who know the workings of the internal buffers.. but can you fill me in?

Does the front buffer have different offsets in full screen mode or something ? the values im using below do not exceed the chosen screen resolution.

CopyRect 0,  0,gw,steph+4, 0,iif+if2, FrontBuffer(),BackBuffer()


Last edited 2011


Ross C(Posted 2011) [#2]
Could this be a problem with copying from the front buffer to the backbuffer. Won't this cause problems when flipping? I know windowed mode seems to be more robust when testing, whereas full screen doesn't let you away with alot...


Yasha(Posted 2011) [#3]
What are you expecting to be on the front buffer? Have you drawn to it or do you just want the results of a Flip back again?

I've found I can't rely on anything in particular to be on the front buffer at any given time. Certainly using Flip a second time to move the front to the back buffer isn't guaranteed to work or even be especially consistent in what it does.

Depending on what you're doing, it may be sensible to introduce a third drawing buffer instead and use that.


big10p(Posted 2011) [#4]
Haven't used B3D in ages but I think the default drawing buffer is the front buffer in windowed mode, and the back buffer in full screen mode.


Ross C(Posted 2011) [#5]
That's right actually!


RifRaf(Posted 2011) [#6]
thanks


RifRaf(Posted 2011) [#7]
Thanks again for the simple, but effective information. I was able to get the watter ripple working the way I wanted.

http://www.empowergames.com/ttwater2.wmv

heres the code, for this effect you can get away with copying from the backbuffer, to the backbuffer.. I was really trying to avoid an extra copyrect using another image buffer..

Global WobbleCounter
Function WobbleView()
 wobblecounter=(wobblecounter+2)
 gw#=GraphicsWidth()
 gh#=GraphicsHeight()
 steph#=gh/12 
 mu8#=gh/155 
 If wobblecounter>359 Then wobblecounter=0
  For iif#=0 To gh-4  Step 2
   wsin#=(Sin((wobblecounter+iif) )*mu8#)
   CopyRect 0,  iif,gw,steph+4, 0,iif+wsin#, BackBuffer(),BackBuffer()
   iif=iif+steph
  Next
End Function



Last edited 2011


Kryzon(Posted 2011) [#8]
Very cool. You plan on using muffed sounds for when underwater?


RifRaf(Posted 2011) [#9]
hm.. not sure I can. I just use B3D sounds.. loadsound load3dsound ect.. I think the best I could do is alter the pitch and volume of the sounds when underwater, and im not sure that would be close enough to the effect youre talking about


Kryzon(Posted 2011) [#10]
Yeah, either do it real-time with a library with real-time equalization\DSP (more difficult to find and implement), or have a "muffed" version of every sound-effect and music track (bigger memory cost).

Then play the muffed sound-effects when underwater, and for the music, play both at the start of the level but keep the muffed channel with zero volume - when you get underwater, make the normal-version channel with zero volume and the muffed one with 1.0, so you get the transition to muffed and the music keeps playing synchronously.