Skip to content
Snippets Groups Projects
Commit 030757d0 authored by Marco Biasini's avatar Marco Biasini
Browse files

gcc 4.1 now also compiles gfx and gui

parent fc5dee54
Branches
Tags 1.1.2
No related merge requests found
......@@ -25,7 +25,6 @@ using namespace ost::gfx;
#include "color_by_def.hh"
namespace {
// convenience for python
void set_mat_amb2(GfxObjBase* b, float c) {b->SetMatAmb(Color(c,c,c,1.0));}
void set_mat_diff2(GfxObjBase* b, float c) {b->SetMatDiff(Color(c,c,c,1.0));}
......@@ -58,7 +57,63 @@ namespace {
LOG_INFO("AALines(bool) is deprecated, use SetAALines(bool) instead");
b->SetAALines(f);
}
}
class GfxObjWrap: public GfxObj, public wrapper<GfxObj>
{
public:
GfxObjWrap(const std::string& name):
GfxObj(name)
{}
virtual geom::AlignedCuboid GetBoundingBox() const
{
if(override f = this->get_override("GetBoundingBox")) {
return f();
} else {
return GfxObj::GetBoundingBox();
}
}
geom::AlignedCuboid default_GetBoundingBox() const {
return GfxObj::GetBoundingBox();
}
virtual void CustomRenderGL(RenderPass pass) {
if(override f = this->get_override("_CustomRenderGL")) {
f(pass);
} else {
GfxObj::CustomRenderGL(pass);
}
}
void default_CustomRenderGL(RenderPass pass) {
GfxObj::CustomRenderGL(pass);
}
virtual void CustomPreRenderGL(bool rebuild) {
if(override f = this->get_override("_CustomPreRenderGL")) {
f(rebuild);
} else {
GfxObj::CustomPreRenderGL(rebuild);
}
}
void default_CustomPreRenderGL(bool rebuild) {
GfxObj::CustomPreRenderGL(rebuild);
}
virtual void InitGL() {
if(override f = this->get_override("_InitGL")) {
f();
} else {
GfxObj::InitGL();
}
}
void default_InitGL() {
GfxObj::InitGL();
}
};
void export_GfxObj()
{
......
......@@ -16,7 +16,6 @@
using namespace ost;
using namespace ost::gfx;
namespace {
class SceneObserverProxy: public SceneObserver {
public:
......@@ -75,6 +74,5 @@ private:
PyObject* self;
};
}
#endif
......@@ -32,7 +32,6 @@ using namespace boost::python;
using namespace ost::gui;
using namespace ost;
namespace {
struct WrappedTool : public Tool
{
......@@ -81,7 +80,6 @@ struct WrappedTool : public Tool
};
namespace {
void tm_add_tool(ToolManager& tm, QPtr<WrappedTool> tool)
{
......@@ -127,13 +125,10 @@ object get_delta_wrapper(MouseEvent& me)
return qpoint_to_bp_object(delta);
}
}
ToolOption* (ToolOptions::*get_option_a)(const String&,
const String&) const=&ToolOptions::GetOption;
ToolOption* (ToolOptions::*get_option_b)(const String&) const=&ToolOptions::GetOption;
}
void export_Tool()
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment