Search found 9 matches
- Thu Oct 25, 2007 12:08 pm
- Forum: Beginners Help
- Topic: How to use Switch from within a loop?
- Replies: 16
- Views: 945
Re: How to use Switch from within a loop?
I uploaded an avatar to prevent further confusion. This will work fine, and is perfectly okay, despite what some very uptight people may tell you. Imo there are two reasons why one should not use goto: 1) It is generally not regarded as a good way to program. 2) The code will not be easy to read if ...
- Mon Oct 22, 2007 8:56 pm
- Forum: Beginners Help
- Topic: How to use Switch from within a loop?
- Replies: 16
- Views: 945
Re: How to use Switch from within a loop?
I'm pretty sure the break statement only exits out of its enclosing for/while/do loop or switch statement. You must have something else going on for the loop to be ending prematurely. I think so too. This proves it. #include <iostream> using namespace::std; int main() { int a=0; for (0;a<10;a++) { ...
- Mon Oct 22, 2007 3:08 pm
- Forum: Beginners Help
- Topic: A problem with controls
- Replies: 8
- Views: 506
- Sun Oct 21, 2007 8:46 pm
- Forum: Beginners Help
- Topic: A problem with controls
- Replies: 8
- Views: 506
Show us your event receiver and main loop, please... ;) Here is the whole code. The comments were in Finnish so I removed most of them. #include<irrlicht.h> using namespace irr; using namespace core; using namespace scene; using namespace video; using namespace io; using namespace gui; #ifdef _IRR_...
- Sun Oct 21, 2007 6:02 pm
- Forum: Beginners Help
- Topic: A problem with controls
- Replies: 8
- Views: 506
The code is actually based on this tutorial... Sorry, no it is not. Either that or you have a very liiberal definition of 'based on'. The tutorial uses an event receiver to handle events, buy you're trying to handle them in main . If you want to handle events using Irrlicht, you need an event recei...
- Sun Oct 21, 2007 12:51 pm
- Forum: Beginners Help
- Topic: A problem with controls
- Replies: 8
- Views: 506
Take a look at this tutorial http://irrlicht.sourceforge.net/tut004.html , which explains how event receiver work :) The code is actually based on this tutorial... I studied the tutorial again but the controls still don't work with an AnimatedMeshSceneNode. I now tried to make the controls like the...
- Sun Oct 21, 2007 10:06 am
- Forum: Beginners Help
- Topic: A problem with controls
- Replies: 8
- Views: 506
A problem with controls
Why doesn't this work? int a = 0; SEvent event; while (device->run()) { if (event.EventType == EET_KEY_INPUT_EVENT && !event.KeyInput.PressedDown) { if (event.KeyInput.Key == KEY_KEY_W) a += 10; } The compiler doesn't give any error but when I press the w key nothing happens. (the a variable...
- Wed Aug 08, 2007 10:42 am
- Forum: Beginners Help
- Topic: Problems installing Irrlicht (Ubuntu 7.04)
- Replies: 5
- Views: 1331
- Wed Aug 08, 2007 8:41 am
- Forum: Beginners Help
- Topic: Problems installing Irrlicht (Ubuntu 7.04)
- Replies: 5
- Views: 1331
Problems installing Irrlicht (Ubuntu 7.04)
I tried to install Irrlicht... I ran make and this is what happened: (this is not the whole install process... the Terminal did'nt save the whole process) COpenGLDriver.cpp:894: error: ‘GL_QUADS’ was not declared in this scope COpenGLDriver.cpp:894: error: ‘glBegin’ was not declared in this scope CO...