Table of Contents

Wiki > TV3D65 Index > Class > Method

EXAMPLE

Loads a texture from disk into the TVTextureFactory.

Needed resources to download for this example to work
The Truevision3D v6.5 SDK

VB6

 
' Force explicit declarations
Option Explicit
 
' We declare the variables.
Public TFactory As TVTextureFactory
 
' Declare new TVTextureFactory Object
Set TFactory = New TVTextureFactory
 
' we load a texture for the teapot. 
Call TFactory.LoadTexture("..\..\Tutorials\Media\texture.bmp", "TeapotTexture", 256, 256, TV_COLORKEY_NO, True)
 
' we assign the texture to the teapot mesh.
Call Teapot.SetTexture(Globals.GetTex("TeapotTexture"))
 

VB.NET

' TV Variables (Objects).
Public TFactory As TVTextureFactory
 
' Create new TVTextureFactory Object
TFactory = New TVTextureFactory
 
' Then, we load the land texture.
TFactory.LoadTexture("..\..\..\..\Media\dirtandgrass.jpg", "LandTexture")
 
' We assign a texture to that land.
Land.SetTexture(Globals.GetTex("LandTexture"))

Delphi

no code available ...

C#

no code available ...

C++

no code available ...
 
tvtexturefactory/loadtexture_1.txt · Last modified: 2013/11/22 13:32