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.

Newcomers DBPro Corner / Why doesn't this code work?*

Author
Message
talentless newbie
17
Years of Service
User Offline
Joined: 12th Jun 2007
Location:
Posted: 12th Jun 2007 12:08
As you might guess, I'm _completely_ new to this, coming from C. I thought I'd attempt something more complex and structured than the cube sample in the manual, but this just exits without an error message, and without displaying anything, and I don't get why. I'm hoping someone more knowledgeable can help...



It compiles, but when run, it simply exits. I've verified that the manual's cube example produces a working .exe, and I know for a fact that my video card is capable of the requested mode.

I've also tried replacing "while not (escapekey())" with "while(1)" and that didn't seem to help...

Any ideas?
Xsnip3rX
17
Years of Service
User Offline
Joined: 20th Feb 2007
Location: Washington State
Posted: 14th Jun 2007 04:50
also add wait mouse to the bottom so it exits when you click the mouse.
Kieran
18
Years of Service
User Offline
Joined: 6th Aug 2006
Location: Hamilton, New Zealand
Posted: 14th Jun 2007 08:13
oh lol im too late :p oh well good luck

talentless newbie
17
Years of Service
User Offline
Joined: 12th Jun 2007
Location:
Posted: 14th Jun 2007 10:22
Hi all,

First of all, thanks! Sorry about the duplicate posts; I didn't realize they'd gone into a moderator queue and instead just thought the post mechanism wasn't working.

Okay, so I've gotten it to render the cube by following the above steps. But now, I have another problem that, again, didn't seem to be covered after having R'ed T.F.M.

The first is with this code:

Inside the main loop:


Inside animate():


Why does the if(up_pressed) block never execute? I've checked that the app is able to `see' the up arrow key (see the print statements in the main loop), and if I reverse the parameters when calling animate(), pressing up arrow is able to trigger the left_pressed case.

Any ideas?

Additionally, does anyone know if DB pro passes by value or by reference? And does the user have a way to control that or force the issue?

Login to post a reply

Server time is: 2024-11-25 18:03:06
Your offset time is: 2024-11-25 18:03:06