Fresco/Berlin/modules/Drawing/openGL DrawingKit.cc,1.103,1.104 DrawingKit.hh,1.62,1.63
Stefan Seefeld <[email protected]>
| Newsgroups | gmane.comp.video.fresco.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvs/fresco/Fresco/Berlin/modules/Drawing/openGL
In directory purcel:/tmp/cvs-serv31700/Berlin/modules/Drawing/openGL
Modified Files:
DrawingKit.cc DrawingKit.hh
Log Message:
a somewhat lengthy fix for http://issues.fresco.org/bug92
Index: DrawingKit.cc
===================================================================
RCS file: /cvs/fresco/Fresco/Berlin/modules/Drawing/openGL/DrawingKit.cc,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -d -r1.103 -r1.104
--- DrawingKit.cc 12 Jan 2003 04:11:41 -0000 1.103
+++ DrawingKit.cc 18 Feb 2003 07:26:29 -0000 1.104
@@ -36,11 +36,13 @@
using namespace Fresco;
using namespace Berlin::DrawingKit;
-class openGL::DrawingKit::Light::Init : public virtual GLContext::Callback {
+class openGL::DrawingKit::Light::Init : public virtual GLContext::Callback
+{
public:
Init::Init(int *max)
: my_max(max) {}
- void operator()() {
+ void operator()()
+ {
glGetIntegerv(GL_MAX_LIGHTS, my_max);
delete this;
}
@@ -73,8 +75,10 @@
--_number;
}
-openGL::DrawingKit::DrawingKit(const std::string &id, const Fresco::Kit::PropertySeq &p)
- : KitImpl(id, p),
+openGL::DrawingKit::DrawingKit(const std::string &id,
+ const Fresco::Kit::PropertySeq &p,
+ ServerContextImpl *c)
+ : KitImpl(id, p, c),
_drawable(0),
_tx(0),
_font(0),
@@ -84,9 +88,10 @@
{
}
-KitImpl *openGL::DrawingKit::clone(const Fresco::Kit::PropertySeq &p)
+KitImpl *openGL::DrawingKit::clone(const Fresco::Kit::PropertySeq &p,
+ ServerContextImpl *c)
{
- openGL::DrawingKit *kit = new openGL::DrawingKit(repo_id(), p);
+ openGL::DrawingKit *kit = new openGL::DrawingKit(repo_id(), p, c);
kit->init();
return kit;
}
@@ -707,6 +712,6 @@
extern "C" KitImpl *load()
{
static std::string properties[] = {"implementation", "GLDrawingKit"};
- return create_kit<openGL::DrawingKit> ("IDL:fresco.org/Fresco/DrawingKit3D:1.0", properties, 2);
+ return create_prototype<openGL::DrawingKit> ("IDL:fresco.org/Fresco/DrawingKit3D:1.0", properties, 2);
}
Index: DrawingKit.hh
===================================================================
RCS file: /cvs/fresco/Fresco/Berlin/modules/Drawing/openGL/DrawingKit.hh,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -d -r1.62 -r1.63
--- DrawingKit.hh 12 Jan 2003 04:11:41 -0000 1.62
+++ DrawingKit.hh 18 Feb 2003 07:26:29 -0000 1.63
@@ -41,9 +41,12 @@
#include <GL/glu.h>
-namespace Berlin {
-namespace DrawingKit {
-namespace openGL {
+namespace Berlin
+{
+namespace DrawingKit
+{
+namespace openGL
+{
class DrawingKit : public virtual POA_Fresco::DrawingKit3D,
public DrawingKitBase, public KitImpl
@@ -74,9 +77,11 @@
size_t lights;
};
public:
- DrawingKit(const std::string &, const Fresco::Kit::PropertySeq &);
+ DrawingKit(const std::string &,
+ const Fresco::Kit::PropertySeq &,
+ ServerContextImpl *);
virtual ~DrawingKit();
- virtual KitImpl *clone(const Fresco::Kit::PropertySeq &);
+ virtual KitImpl *clone(const Fresco::Kit::PropertySeq &, ServerContextImpl *);
virtual void save();
virtual void restore();