|  | 
 For this article I'm just going to jump straight to the case, laeving out any preparations at the top. Okay, first things first: We'll have to define our graphics mode and initialize the backbuffer. So here we go: Then we'll have to create a light: The light that we ceated here is just a standard white light. The CreateLight function also takes an (optional) parameter to specify the color of the light you're creating, but I will not cover that here. So now, over to the camera: Here we set the viewport of our camera to cover the entire screen. Now we need to create the cube and position it: Now we have created a cube and positioned it. Before we go on to the next part, make sure you have a texture available that you have placed inside the same folder as your project file. For this example, just name it texture1. Here's how to load it and apply it to the cube we created earlier: Simple, huh? :) All we do is giving the Cube as a parameter to the EntityTexture function. After that, we give our texture as a parameter as well. From now on, all the action in the program happens as long as the user doesn't press escape (1). All we do here is to turn the cube, update world and render everything in it (so far, all we have inside the world is 1 cube:P) Wend = We use this to end our While loop. End ends our program. If you copy all of this, making sure the texture is placed in the same folder as your project file, you should see a spinning, textured cube on your screen:D Also, please try to forgive me if my English is a bit lousy at some places. I'm not too good in grammatics:( For a printable copy of this article, please click HERE. 
 This site is Copyright© 2000-2004, BlitzCoder. All rights reserved.   |