#71338 - Dark Knight ez - Sat Feb 11, 2006 11:43 pm
Hey everybody.
I've been toying around with the OpenGL tutorials and examples for NDS, and I just can't seem to get it working right, and I don't see what is going wrong.
I'll try to explain what the problem is. The code I currently have is linked to at the bottom of this post (this is safer for all of you than giving an already compiled binary, plus easier to see what's wrong of course ;).
I'm trying to display 3 "tracks"/rectangles (with borders) which move towards the camera. A triangle/vertice is shown above them. This to give the illusion of a ship traveling, when it's actually the ground below it that is moving.
The tracks have a length/depth (z-values) of 100. However, a length of 100 is not displayed on the NDS and (probably) because of that, some weird things take place since I expect a length of 100 and not a length of 4.3 (approximately) *.
Is this because 100 in depth is too big of a value to be handled by the NDS?
It might be a stupid mistake, since this is the first time I'm using OpenGL, and actually trying to create something worthwile on the NDS. Anyway, thanks in advance.
http://www.few.vu.nl/~ssstolk/temp/nds/main.cpp
http://www.few.vu.nl/~ssstolk/temp/nds/main.h
(the contents of main.h are not used at the moment, but the file is included in main.cpp anyway... it is an option to leave out the include-statement in main.cpp, which should not have any effect whatsoever)
greets,
Dark Knight ez
edit:
*) calculated by the distance the 'ship has traveled'. using the UP key, the ship travels (the track beneath it moves).
I've been toying around with the OpenGL tutorials and examples for NDS, and I just can't seem to get it working right, and I don't see what is going wrong.
I'll try to explain what the problem is. The code I currently have is linked to at the bottom of this post (this is safer for all of you than giving an already compiled binary, plus easier to see what's wrong of course ;).
I'm trying to display 3 "tracks"/rectangles (with borders) which move towards the camera. A triangle/vertice is shown above them. This to give the illusion of a ship traveling, when it's actually the ground below it that is moving.
The tracks have a length/depth (z-values) of 100. However, a length of 100 is not displayed on the NDS and (probably) because of that, some weird things take place since I expect a length of 100 and not a length of 4.3 (approximately) *.
Is this because 100 in depth is too big of a value to be handled by the NDS?
It might be a stupid mistake, since this is the first time I'm using OpenGL, and actually trying to create something worthwile on the NDS. Anyway, thanks in advance.
http://www.few.vu.nl/~ssstolk/temp/nds/main.cpp
http://www.few.vu.nl/~ssstolk/temp/nds/main.h
(the contents of main.h are not used at the moment, but the file is included in main.cpp anyway... it is an option to leave out the include-statement in main.cpp, which should not have any effect whatsoever)
greets,
Dark Knight ez
edit:
*) calculated by the distance the 'ship has traveled'. using the UP key, the ship travels (the track beneath it moves).