O'Reilly logo

3D Game Programming for Teens, Second Edition by Eric Grebler, Maneesh Sethi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Applying Image Textures

To get a “realistic” look for your objects, the best approach is to wrap an image around your shapes. To do this, you must create a texture and then tell Blitz3D what object you would like to wrap that texture around. In the following example, we will create a sphere and then wrap an image around it.

Note: Texture Location

It is very important to note that the file that contains your texture must be saved in the same location as your program file or you must specify the folder where it is located. After you have entered the following code, save it to a location and then copy the texture file to the same location as the program file.

; demo05-05.bb - Putting a texture on a sphere ; ------------------ Graphics3D 640,480 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required