Harton
Member
|
Draw 3D image in Object Mode
Hello!
My level designer asked me to objects in the scene which are represented by a small icon. For example, light is represented by a bulb.
I use class Image and function drawBlend. For example:
Code:
STRUCT(EditObjLightPoint , Edit::ObjClass)
//{
// ...
Image icon;
// ...
UInt drawPrepare();
void drawBlend();
};
UInt EditObjLightPoint::drawPrepare()
{
LightSqr(range, pos, color, volumetric).add(cast_shadows);
return IndexToFlag(RM_BLEND);
}
void EditObjLightPoint::drawBlend()
{
icon.draw3D(WHITE, 1.0f, 0.0f, this->pos);
}
I see icon in World Editor, in bookmark: Heightmap, Waypoint and Water, but I don't see it in bookmark: Object and Path.
What I do wrong?
|
|
06-07-2012 11:25 AM |
|
Esenthel
Administrator
|
RE: Draw 3D image in Object Mode
hello,
please call SetMatrix() before icon.draw3D(..)
(I've added the following comment to that function for next SDK : "this relies on active object matrix which can be set using 'SetMatrix' function")
|
|
06-11-2012 03:24 PM |
|