@@ -13,6 +13,7 @@ public:
|
||||
virtual ~Instance(void);
|
||||
std::string name;
|
||||
virtual void render(RenderDevice*);
|
||||
virtual void renderName(RenderDevice*);
|
||||
virtual void update();
|
||||
std::vector<Instance*> children; // All children.
|
||||
std::string getClassName();
|
||||
|
||||
@@ -16,6 +16,7 @@ public:
|
||||
//Rendering
|
||||
virtual void PartInstance::postRender(RenderDevice* rd);
|
||||
virtual void render(RenderDevice*);
|
||||
virtual void renderName(RenderDevice*);
|
||||
|
||||
//Surfaces
|
||||
Enum::SurfaceType::Value top;
|
||||
@@ -76,4 +77,4 @@ private:
|
||||
bool dragging;
|
||||
Box itemBox;
|
||||
GLuint glList;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -548,6 +548,7 @@ void Application::onGraphics(RenderDevice* rd) {
|
||||
glEnableClientState(GL_COLOR_ARRAY);
|
||||
glEnableClientState(GL_NORMAL_ARRAY);
|
||||
_dataModel->getWorkspace()->render(rd);
|
||||
_dataModel->getWorkspace()->renderName(rd);
|
||||
glDisableClientState(GL_VERTEX_ARRAY);
|
||||
glDisableClientState(GL_COLOR_ARRAY);
|
||||
glDisableClientState(GL_NORMAL_ARRAY);
|
||||
@@ -757,4 +758,4 @@ void Application::QuitApp()
|
||||
|
||||
void Application::onCreate(HWND parentWindow)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,6 +33,14 @@ void Instance::render(RenderDevice* rd)
|
||||
}
|
||||
}
|
||||
|
||||
void Instance::renderName(RenderDevice* rd)
|
||||
{
|
||||
for(size_t i = 0; i < children.size(); i++)
|
||||
{
|
||||
children[i]->renderName(rd);
|
||||
}
|
||||
}
|
||||
|
||||
void Instance::update()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -70,6 +70,11 @@ void PartInstance::setRotVelocity(Vector3 v)
|
||||
}
|
||||
|
||||
void PartInstance::postRender(RenderDevice *rd)
|
||||
{
|
||||
// possibly descard this function...
|
||||
}
|
||||
|
||||
void PartInstance::renderName(RenderDevice *rd)
|
||||
{
|
||||
if(!nameShown)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user