| further reading | more topics » |
| mjbWorld program | 3D theory |
3D physics |
3D maths |
3D programming | technology |
about site |
sitemap A-Z |
| index | language | dev tools | games | structure | platforms | OOAD | information |
| index | setup | 2d | 3d |
| index | dx9vb | dx9C# | OpenGL C++ |
| index | introduction | first | shapes | 3D | rotation | textures | camera |
| keyboard | moving |
|
This toturial was written for me by Imran Khan (imranahmedkhan82@hotmail.com,
iak1982@yahoo.com). |
||
|
Entering the World of 3D: In this Tutorial we will made 3D objects rather then 2D. This tutorial is in continuation with the previous one. In this section we will change the same method ' DrawGLScene ' to draw 3D objects. We will create cube by adding left, right, back, top and bottom to the squar and make pyramid by adding left, back, and right side to the triangle.Here is the code for pyramid.
First 6 lines are same.We have already draw the front side of the triangle in our previous tutorial. As u can see in the remaining part of the code we did nothing , just made 3 more sides(right, back , left ) with different colors. You can also use shades of different colors as we defined in our previous tutorial. Here is the code for Cube.
Same as previous we made other more 5 sides(back,botton,top,left,right) to draw a Cube. Your output will be like .
|
|
metadata block
|
|
| see also: | |
| Correspondence about this page | |
|
Book Shop - Further reading. Where I can, I have put links to Amazon for books that are relevant to the subject, click on the appropriate country flag to get more details of the book or to buy it from them. |
|
|
Commercial Software Shop Where I can, I have put links to Amazon for commercial software, not directly related to this site, but related to the subject being discussed, click on the appropriate country flag to get more details of the software or to buy it from them. |
|
|
Can this page be improved? Please send me any improvements to here. I would appreciate ideas to make the pages more useful including error correction, ideas for new pages, improvements to wording. It helps if you quote the full URL of the page. |
|
|
progam I am working on a project which uses these principles, if you would like to help me with this you are welcome to join in, here: |
for kdgame programming: http://sourceforge.net/projects/kdgame/ |
This site may have errors. Don't use for critical systems.
Copyright (c) 1998-2008 Martin John Baker - All rights reserved.