usata-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Usata-commits] Changes to usata2/src/objects/test_object.cpp


From: David Lau
Subject: [Usata-commits] Changes to usata2/src/objects/test_object.cpp
Date: Sun, 09 Jan 2005 04:53:09 -0500

Index: usata2/src/objects/test_object.cpp
diff -u usata2/src/objects/test_object.cpp:1.6 
usata2/src/objects/test_object.cpp:1.7
--- usata2/src/objects/test_object.cpp:1.6      Mon Jan  3 07:43:50 2005
+++ usata2/src/objects/test_object.cpp  Sun Jan  9 08:57:22 2005
@@ -10,11 +10,14 @@
 // included in the software distribution, or visit
 // http://www.fsf.org/licenses/gpl.html.
 //
-// $Id: test_object.cpp,v 1.6 2005/01/03 07:43:50 skunix Exp $
+// $Id: test_object.cpp,v 1.7 2005/01/09 08:57:22 skunix Exp $
 
 #include "../object.hpp"
 #include "../object-registry.hpp"
+#include "../scene-manager.hpp"
 #include <boost/format.hpp>
+#include <GL/glew.h>
+#include <iostream>
 namespace
 {
        using namespace usata;
@@ -23,12 +26,12 @@
        {
                public:
                
-                       virtual void    realize(Usata&, const Object_sp& ){};
+                       virtual void    realize(Usata&, const Object_sp& );
                        Something();
                        virtual ResourceList 
                                                        construct(const 
ObjectProperties&){return ResourceList();}
                        virtual void    update(void){};
-                       virtual void    draw (void){};
+                       virtual void    draw (void);
                        virtual                 ~Something(){};
        };
 
@@ -38,6 +41,23 @@
 
        }
 
+       
+       void
+       Something::draw()
+       {
+               glBegin(GL_TRIANGLES);
+               glVertex3f(1.0, 0.0, -1.0);
+               glVertex3f(1.0, -0.5, -1.0);
+               glVertex3f(0, -0.5 ,-1.0);
+               glEnd();
+       }
+       void
+       Something::realize(Usata& game, const Object_sp& self)
+       {
+               std::string p("gui");
+               game.scene().add_child(self, p);
+               std::cout << "Here goes!" << std::endl;
+       }
 
        USATA_OBJECT_REGISTER(Something)
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]