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.

Dark GDK / DarkGDK with 2d drawing

Author
Message
Molex
16
Years of Service
User Offline
Joined: 11th Mar 2008
Location:
Posted: 15th Mar 2008 19:29
Hi,
With DarkGDK do I need to turn something on in code to use the 2d drawing functions? I tried converting the starfeild tutorial to c++ and darkgdk but nothing is drawn.
nodapro
16
Years of Service
User Offline
Joined: 14th Mar 2008
Location:
Posted: 15th Mar 2008 23:01
Maybe you should take dbCLS(0) out of the while loop.
You are clearing the screen too fast.
Another way is to put a dbSleep after the dbSyn ().
You need dbSyn a couple of times to show stuff on screen.
Try the following if you want to keep dbCLS(0) in the loop:

while ( LoopGDK ( ) )
{
dbCLS(0);
......
// update the screen
dbSync ( );
dbSync ( );
dbSync ( );
dbSleep ( 5000 );
}
Molex
16
Years of Service
User Offline
Joined: 11th Mar 2008
Location:
Posted: 16th Mar 2008 00:21
Thanks for the ideas...I had tried without dbcls myself to see if even drawn but they just don't seem to be getting there. The extra dbsync's and the dbsleep didn't help either. The array is full cause when I stop it with a break point I can see the data in the stars array. I got vista with updates, the directx 9 aug 2007, updated video drivers.
I thought of doing a test with other 2d primitives, and just the dbline worked for me so far.
Just can't think of any thing else...
Orac
18
Years of Service
User Offline
Joined: 16th May 2006
Location: Billingham
Posted: 16th Mar 2008 17:39
Hi Molex,

Are you getting any warnings or build errors? I copied and pasted your example code into a new project and it compiled and ran perfectly. Stars scrolling from left to right. I guess the major difference here is that I'm using VS2008 Pro with Windows XP, but I haven't come across any major differences yet (I use VC++ Express at home and it works fine)
Molex
16
Years of Service
User Offline
Joined: 11th Mar 2008
Location:
Posted: 16th Mar 2008 20:02
Thanks for giving it a try. No I'm not getting any build errors or warnings. oh hum...
Orac
18
Years of Service
User Offline
Joined: 16th May 2006
Location: Billingham
Posted: 16th Mar 2008 21:33
This may sound a bit daft but ...

I used to have a twin monitor system where one of the monitors was an LCD and the other was a CRT. I was trying to display a starry background in a window and I thought it wasn't working because I couldn't see anything. When I dragged the window from the LCD across to the CRT .. voila! I messed about with the gamma settings on my LCD and then I could see the image OK. Might be worth a shot?
Molex
16
Years of Service
User Offline
Joined: 11th Mar 2008
Location:
Posted: 17th Mar 2008 05:30
Didn't sound daft to me so I gave it a try. But unfortunately it didn't help. I adjusted both the video card settings and monitor settings. Unfortunatly (haha, sick of thoses crts ;/ ) I got an lcd and not a crt. Don't have an crt to try it on. Sigh still confused but guess I'll move on from this example. Want to get so I understand this engine somewhat for ester holiday so I have something to do.

Login to post a reply

Server time is: 2024-11-20 05:31:06
Your offset time is: 2024-11-20 05:31:06