Cls does not work in fullscreen
Archives Forums/Blitz3D Bug Reports/Cls does not work in fullscreen
| ||
Whenever I do anything in 2D that moves (moving images, moving text, etc.), it looks as though the backbuffer is not being cleared. Interestingly, it's only in fullscreen mode in Blitz3D. BlitzPlus does not have this problem at all. Thanks for any help! My system specs are: Dell Precision 390 Intel Core 2 Quad QX6600 @ 2.39 GHz nVidia 8800 GTX video card, BIOS v. 60.80.0B.00.04 4 GB 667MHz Ram Sound Blaster X-Fi XtremeGamer sound card Blitz3D v. 1.98 ; This will be fine in windowed, ; and look as if I forgot CLS in full screen mode. ; It's a simple program: it bounces a ball around the ; screen. Hopefully demonstrative: run it first in ; with debug on (windowed), then with debug off ; (fullscreen). ;initialize graphics as usual Graphics 800,600 SetBuffer BackBuffer() SeedRnd MilliSecs() x=400 ;actual x pos of ball y=300 ;actual y pos of ball MaxXSpeed=3 ;maximum X velocity of ball MaxYSpeed=3 ;maximum Y velocity of ball nx=Rand(-MaxXSpeed,MaxYSpeed) ;next X pos of ball, added to x every tick ny=Rand(-MaxXSpeed,MaxYSpeed) ;ditto for Y Time=MilliSecs();time delay for changing directions Repeat ;displays some text Color(255,255,255) Text 0,0,"Screen flicker demo" Text 0,12,"Esc to exit" ;draws the 'ball' Color(0,255,0) Oval x,y,10,10,1 ;add NextX and NextY values to CurrentX and CurrentY x=x+nx y=y+ny ;changes direction every so often If MilliSecs()>time+Rand(1500,2500) Time=MilliSecs() nx=Rand(-MaxXSpeed,MaxYSpeed) ny=Rand(-MaxXSpeed,MaxYSpeed) EndIf ;bounces ball off edges of screen If x>800 Then x=800 : nx=-1 If x<0 Then x=0 : nx=1 If y>600 Then y=600 : ny=-1 If y<0 Then y=y : ny=1 ;This works fine in windowed mode... ;What's wrong with fullscreen mode?!! Flip Cls Until KeyHit(1) End |
| ||
Its 'usual' to put Cls at the start of the loop, rather than at the end. Not that I expect this to help. Just saying. |
| ||
[GfK]: I've already tried that. Thanks anyway. |
| ||
for some reasom this works fine on my computer. I don't know, but if you haven't already done so, then you should copy all the text into a text editor, then copy it again FROM the text editor, then copy it again to a NEW blitz3D flie. My computer is: Intel pentium D 3.00 GHz Nvidia Gforce 7300 GT 2.00 GB of RAM Blitz 3D V1.98 don't know if this will help, hope it does though. |
| ||
Yeah, works a treat here too, both windowed and full-screen, debug or not. |
| ||
[floppyracer]: I tried copying like you said, but it has the same problem. I don't think it's a problem with my code - maybe some conflict with the video drivers? This only happens within Blitz3D, NEVER during a game or anything. Also, after running more tests, it also happens if I set it to a resizeable window (i.e. Graphics 800,600,0,3), and then resize it to be bigger. It's not immediate; only when the window gets bigger than, say, an 800x600 window, does the blurring start. Also, here's a condensed test: ;graphics Graphics 800,600 SetBuffer BackBuffer() ;x pos of text x = 400 ;main loop Repeat ;move text x=x-1 If x<0 Then x=800 ;display text Text x,0,"Blitz3D" ;flip and clear buffers Flip Cls Until KeyHit(1) End Thanks for your help though, both of you! |
| ||
Sorry uber - couldn't get it to break. Full-screen, windowed, resizable (expanded up to 1920x1200 and then back to the minimum), debug or not... I've got almost the same setup as you, too, and especially the same video drivers (if you're using the latest 177.79 ones)... I shrug unhelpfully. |
| ||
[LineOf7s]: Hmm. I can't tell which drivers I'm using - I had gone under the windows video card info dialog, and that's where I found the BIOS.. Where can I find what version I'm using? That could be the whole problem. Thanks for the info! |
| ||
Scratch that - I found the driver version number; I'm using 6.14.10.9794 It sounds like I'm REALLY out of date... Oddly, Blitz3D is the only thing that has this problem - when I port the exact same code to BlitzPlus, it works fine. Of course, as I'm writing a 3D game, using BlitzPlus is not an option. Plus, no 'game' games have this problem (not that I play too many 2D-only games). |
| ||
I'd be updating those drivers and checking the problem before you get too carried away with the "a-HA!" moments. Whilst it's something to rule out, I personally wouldn't expect updating the drivers to fix what you're describing... |
| ||
wait! you said you had Blitz3D V1.98? well I found out that I actually have V1.99 maybe that's the problem! or a problem :D Hope this helped Andrew |
| ||
Change "Graphics" for Graphics3D and it works on 1.99. But seems to be a problem with 1.99, since it also happened here. |
| ||
The plot thickens... From Blitz3D, I went under help->about to find what version I'm using. It says "IDE V1.98, Linker V1.98, Runtime V1.98". Yet, looking through my files, I had actually installed the V1.99 update! I had just installed this a week or two ago, and that's when I noticed the bug. But it gets even stranger. I compiled a game I am writing into an EXE, and ran it from Explorer. The same problem happens. But, when I copied the EXE to a different computer (a laptop), it works fine!! Just to be sure, I then copied Blitz3D onto said laptop, and ran the program from there with no problems! So, it could be that there's a bug in the V1.99 (V1.98??) update that causes a conflict with certain video cards. SLotman, would you please post what hardware you're using? That might help narrow it down. The laptop the program works on has the following: Dell Latitute D600 laptop Windows XP Professional SP2 Pentium M 1.6 GHz 512MB RAM Mobility Radeon 9000 graphics Same version of Blitz I forgot to mention in the original post that I'm running Windows XP Professional SP2, although the laptop has the same and it works there, so I doubt that's an issue. Thanks! |
| ||
Hmm... I guess it is a problem with your graphics cards communicating with b3d |
| ||
Try use — Rect 0, 0, GraphicsWidth(), GraphicsHeight(), true function for "fake Cls". May be this will help... |
| ||
well, just tested it on a winxp machine, and it worked normally on 1.99, no bug. the problem happens for me on a win98 machine, with a geforce 4 mx4000 - every 2d game works (even the ones I wrote on dx7 and VB, and games made in B3D) flawlessly, just this situation that gives this strange bug. But, as I mentioned, if you just change "graphics" for "graphics3D" the problem goes away. |
| ||
In the original game when I noticed the bug, it was already in 3D mode... And I had tried the blank rect thing, but that just made my screen flicker like crazy... If a compiled program has this problem, then that same program running on similar/identical hardware will most likely have that problem too. Again, this only started when I updated to V1.99. I think it's a bug in the update. Any suggestions?? Thanks. |
| ||
Okay - the bug may not be contained to Blitz!!! I have been learning C/C++/DirectX lately, and when I wrote a simple program using C and DirectX9, the SAME THING HAPPENED!!!! This bug could be with the video drivers communicating with DirectX, since Blitz is built on DX also! I'd like to update the drivers, but the computer that this happens on is not connected to the internet. I'm not sure if I can get the drivers onto a flash drive or something, and update that way.. Plus, that'd leave open the possibility for accidentally installing drivers for the wrong card.. And updating the drivers could still mess with other things that are working fine now... This is very, very bad..... :-( |
| ||
its a vista issue i belive or dx 10 issue. try set "clscolor 1,0,0" and cls will clear screen. all old blitz games that does clear with 0,0,0 is total ignored.. |
| ||
Works fine here. Windowed/Full Screen also with Windows Vista Home 32-bit |
| ||
I'm using WinXP Professional and DirectX 9.0c. Changing the ClsColor does nothing! Very very strange. |
| ||
My situation is IDENTICAL. Same Driver version (ATI, yeah?) Same OS (SP 3 Yeah?) Same issue. EXCEPT = cls'ing the FRONT buffer will work, but intermittently. |
| ||
Don't use Cls use Rect Function and it work 100% :) Color 0,0,0 Rect 0,0,GraphicsHeight(),GraphicsWidth(),True |
| ||
I comfirm this bugg in vista work around for me works 100% is to set cls iam on 1 year old laptop from hP. runnin Nvidia gfx card. Try the belove ? Flip ClsColor 1,0,0 Cls |