All pastes #440265 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-04-14 22:25 UTC
rendered paste body
vector3df Position(3,4,5);
vector3df Rotation(180,0,0);

// Position and translation
matrix4 MyObjectMatrix;
MyObjectMatrix.setTranslation(Position);
MyObjectMatrix.setRotationDegrees(Rotation);
Driver->setTransformation(ETS_WORLD, MyObjectMatrix);

//Dont delete the memory area when we drop the file
bool NoDontDelete=false;
IReadFile* FakeFile=Device->getFileSystem()->createMemoryReadFile(MemoryPointer, LengthOfMemoryAreaInBytes, "NameOfFakeFile", NoDontDelete);

//The material holds the rest of your material settings too.
Material.Textures[0]=Driver->getTexture(FakeFile);

// Drop fake file
FakeFile->drop();

Driver->setMaterial(Material);
Driver->draw3DTriangle(Triangle);