Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / [DBP] Cls is not working

Author
Message
Todd Riggins
20
Years of Service
User Offline
Joined: 29th Oct 2004
Location: Texas, USA
Posted: 20th Nov 2009 00:53 Edited at: 20th Nov 2009 01:11
the first post example didn't work for me either.

I just read through the thread.

CLS by itself is different then CLS with a color value

There is a CLS in the Core commands for dealing with the INK in which differs with the Basic2D Commands. Clearing Basic2D drawing commands needs the color value after the CLS. Thus, this example should work with CLS 0 or CLS rgb(0,0,0), but doesn't for me either... I have a NVidia Card running with Vista 64bit.

Just thought I would throw the two different CLS command styles out there.

Even the Clear Camera View didn't work for me.

I vote for BUG.

EDIT: @ GG, ran your .exe too and it did not work for me.

Jeff Miller
20
Years of Service
User Offline
Joined: 22nd Mar 2005
Location: New Jersey, USA
Posted: 20th Nov 2009 01:07
GG's exe failed on mine (trail of squares). I am running Windows 7 home premium 32 bit, video card is NVidia 8500 GT.
Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 20th Nov 2009 01:12
Quote: "I vote for BUG."


So do I - but where's the bug? Is it in DBPro or nVidia? I'd bet on the former but not a lot. In a related thread (can't recall which now ) we noticed differences between ATI and nVidia cards in some situations. I know there are differences in how the two cards initialise certain data in shaders (and that has nothing to do with DBPro) but have no idea whether that's the problem here. The present problem does have an "initialisation" feel to it though - it's as if something is assumed to be initialised each sync when in fact it might not be. But I'm guessing, which is as much as I can safely do at this hour.
Todd Riggins
20
Years of Service
User Offline
Joined: 29th Oct 2004
Location: Texas, USA
Posted: 20th Nov 2009 01:20 Edited at: 20th Nov 2009 01:31
Actaully, Riidii says your example works on his NVidia machine. So that's just confusing. It could come down to being Nvidia Drivers, but to me... working with DirectX directly in the past, I know something like(NOTE: AS FOR EXAMPLE):
g_pd3dDevice->Clear( 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0,0,255), 1.0f, 0L );

should be clearing anything DirectX related on the screen...

But, Lee probably is using the GDI to draw the 2D stuff over the DirectX screen, so mabie there's something in that... that is messed up.

I think this one comes down to Lee looking at his own code to figure out as it looked like you guys tried various work-arounds to try to get it to work in above posts. If he needs Nvidia/Ati users to help him test beta code for that specific problem, then we can help test his 'fix attempts'

But that's just what I thinks...

Edit: if it helps any... I'm still using dbpro version 7.4... 7.5 looks to scarey to try right now...

cjb2006
19
Years of Service
User Offline
Joined: 20th May 2006
Location:
Posted: 20th Nov 2009 14:02
I'll just add my observations, haven't figured out what they mean. ATI Radeon 1950X, Win7 x64 and GG's shows the initial box. The original code works unless I start in a window that doesn't match the "set display mode" command, then I also see the initial box.
Battoad
AGK Developer
18
Years of Service
User Offline
Joined: 12th Feb 2007
Location: A Dark Place
Posted: 20th Nov 2009 14:28
Failed on mine as well, as I expected.
Running W7 32bit, GTX260.

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 21st Nov 2009 15:05
I've attached a small plug-in purely for testing purposes that patches the CLS command in the Basic2D plug-in - the one that requires a colour value.

It has two commands in:
PATCH CLS <version> - where version is either 0 or 1
UNPATCH CLS

Pop the file into the plugins-user folder and try the patch with a value of 0 first to see if that fixes anything. If not, try it with a version of 2 instead. Calling the unpatch command before exiting will give you the best chance of your process shutting down correctly 0 you may need to kill it with task manager (I'm not going to spend any time fixing this bug because this isn't a fix-patch).

Anyway, if someone could try it out and report if it works or not, and if it reports any errors that would be great.

Oh, delete it from your plugins-user folder when you're done with it.

Battoad
AGK Developer
18
Years of Service
User Offline
Joined: 12th Feb 2007
Location: A Dark Place
Posted: 21st Nov 2009 16:16
Tried your Patch IanM, but regret no change. Didn't notice any variation between the versions either. I tried versions 0, 1 and 2. The screen still does not clear. No errors reported either.

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 21st Nov 2009 21:29
Here's another version of the patch - it works in exactly the same way.

Here's the original posted code with a few changes to make the testing easier:


If this doesn't show anything then I'm all out of ideas.

Battoad
AGK Developer
18
Years of Service
User Offline
Joined: 12th Feb 2007
Location: A Dark Place
Posted: 22nd Nov 2009 11:03
Hi IanM. Just tested the latest patch version but regret to say that there was no difference, it still doesn't clear screen. I'm sure everyone appreciates the amount of effort you have put in but it must be virtually imposible for you to sort the problem if you can't actually see it. Have Lee or Rick encountered it?

Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 22nd Nov 2009 13:42 Edited at: 27th Nov 2009 13:20
Ditto here. No change I'm afraid.

It looks like it's something to do with recent nVidia GFX cards and/or Vista/W7 - but the evidence isn't 100% clear. Here's some results using my exe gleaned from previous posts (I'll update this post when I get more results):

Fail:

nVidia GeForce GTX 285/Vista Home Premium 64 bit (GG)
nVidia GeForce GTX 260/W7 (Juney)
nVidia GeForce 8500 GT/Windows 7 home premium 32 bit (Jeff Miller)
Nvidia 9800 GX2/Vista 64 bit (Todd Riggins)
Geforce 9500GT/Vista basic (French Gui)
Unknown GFX card/Vista 32 bit (rolo99)
nVidia GeForce 8600 GTS/Windows 7 Professional x64 (Jeff032)
nVidia GeForce 8600 GTS/Windows Vista Home 32 bit (Jeff032)
Geforce 9500 GT/XP (Grog Grueslayer - first, and so far only, failure on XP)

Works:

ATI HD 3600/W7 64 bit (Adrian)
ATI Radeon 1950X/W7 64 bit (I think cjb2006 meant it works )
NVidia GeForce 8500 GT/Vista 64 bit (RiiDii)
ATI Radeon HD 3450/Vista Home Premium 32 bit (Globbits)
Mobile Intel(R) 4 Series Express Chipset/Vista 32 bit : Works (Mobiius)
nVidia GeForce G100/Vista 64 bit : Works (Grog Grueslayer)
Nvidia GeForce 7150M/nForce 630M/Laptop, Vista Home Premium edition 32 bit (Digger412)
Intel 82865G Graphics Controller/Desktop, XP Home edition (Digger412)
ATI Mobility Radeon Xpress 200/XP Home Edition (GG)
nVidia GeForce 6150 LE/Windows XP Media Center 32 bit (Jeff032)
Intel(R) 82845G/GL/GE/PE/GV Graphics Controller/Windows XP Home 32 bit (Jeff032)
NVidia GeForce 6200/XP 32 bit (Globbits)

No failures have been reported using XP or ATI cards (we now have a failure on XP reported using related code). Can anyone add more results to this? (And could those who posted incomplete specs give us more details, please?)

So far it seems RiiDii's machine is special. [Edit: Not any more. ]

Edit2: We now have a failure reported on an XP machine - but using a recent nVidia card again and somewhat different code (see below). Still no failures using ATI cards.

Grog Grueslayer has posted the following very simple code which works on some machines but not others:

Jeff032
17
Years of Service
User Offline
Joined: 13th Aug 2007
Location:
Posted: 22nd Nov 2009 16:33
It fails for me on a nVidia GeForce 8600 GTS / Windows 7 Professional x64. In several hours I'll have access to 3 more machines I could (hopefully) test it on, two are running XP and one is running Vista, as far as I know.

Digger412
18
Years of Service
User Offline
Joined: 12th Jun 2007
Location:
Posted: 22nd Nov 2009 17:13 Edited at: 22nd Nov 2009 18:32
@GG - It works on my machine (temp2.exe). Comp specs:
Laptop, Vista Home Premium edition 32 bit
AMD Athlon 64 X2 Dual Core processor TK-55
Nvidia GeForce 7150M/nForce 630M (stock...*sniff*)

I'll try it on my old Gateway XP desktop and edit the results in soon.

EDIT: It works on my desktop too:
Desktop, XP Home edition
Intel Pentium 4 processor
Intel 82865G Graphics Controller (stock too...*sniff*..I know what I want for Christmas now =P)
Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 22nd Nov 2009 20:34
Thanks. I've updated my post with your results.
Jeff032
17
Years of Service
User Offline
Joined: 13th Aug 2007
Location:
Posted: 23rd Nov 2009 02:37
some more tests:

failed:
Windows Vista Home 32 bit, nVidia GeForce 8600 GTS

succeeded:
Windows XP Media Center 32 bit, nVidia GeForce 6150 LE
Windows XP Home 32 bit, Intel(R) 82845G/GL/GE/PE/GV Graphics Controller

Grog Grueslayer
Valued Member
20
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 23rd Nov 2009 07:59
The video card on the computer I used is a nVidia GeForce G100.

Here's a link to the computer:

http://www.newegg.com/Product/Product.aspx?Item=N82E16883103222

Todd Riggins
20
Years of Service
User Offline
Joined: 29th Oct 2004
Location: Texas, USA
Posted: 23rd Nov 2009 11:58
GG, I gots a Nvidia 9800 GX2... in sig

Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 23rd Nov 2009 12:16
Thanks. Seems I'm having eyesight problems again.

Updated results in earlier post. Still seems to be much the same story:

No problems with XP or non-nVidia cards.
Problems with some newer nVidia cards and W7/Vista.

I wish I could see what the common factor is. This sort of problem is often dismissed as a driver issue - but how that helps us I don't know. I updated mine soon after getting the machine in May. Perhaps I should check for a more recent update?
Globbits
16
Years of Service
User Offline
Joined: 30th Jan 2009
Location: Cambridge
Posted: 24th Nov 2009 11:28
GG,

My GPU for the Vista PC is ATI Radeon HD 3450

Have also tried it on XP 32 bit, NVidia GeForce 6200. Works fine on that too.
Grog Grueslayer
Valued Member
20
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 26th Nov 2009 18:43
I just got CLS to not work on my computer at home that's an XP with a Geforce 9500 GT. Using CLS by itself doesn't work but with 0 it does work.

Here's the simple code (attached screenshot):


Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 26th Nov 2009 19:00
Thanks for that very simple example.

I think I'll send that to Lee to see what he thinks. It should be simple enough for him to see where things might be going wrong on some systems, even if he can't reproduce it himself.

For the record, your snippet works on my XP/non-nVidia laptop but fails on my Vista/nVidia PC.

I'll update the earlier post with the latest info shortly.
Mobiius
Valued Member
22
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 27th Nov 2009 13:14
Heres my gfx card info: Mobile Intel(R) 4 Series Express Chipset

Your signature has been erased by a mod because we are sadistic losers with nothing better to do. (mwahahaha!)
Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 27th Nov 2009 13:21
Noted. Thanks.

Login to post a reply

Server time is: 2025-08-08 16:33:35
Your offset time is: 2025-08-08 16:33:35