[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz/gfx/libcallgl callgl.hxx
From: |
Matti Katila |
Subject: |
[Gzz-commits] gzz/gfx/libcallgl callgl.hxx |
Date: |
Thu, 12 Sep 2002 01:24:37 -0400 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Matti Katila <address@hidden> 02/09/12 01:24:37
Modified files:
gfx/libcallgl : callgl.hxx
Log message:
Extended GL calls framwork.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libcallgl/callgl.hxx.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
Patches:
Index: gzz/gfx/libcallgl/callgl.hxx
diff -c gzz/gfx/libcallgl/callgl.hxx:1.9 gzz/gfx/libcallgl/callgl.hxx:1.10
*** gzz/gfx/libcallgl/callgl.hxx:1.9 Wed Sep 11 06:41:45 2002
--- gzz/gfx/libcallgl/callgl.hxx Thu Sep 12 01:24:37 2002
***************
*** 3,8 ****
--- 3,11 ----
#include <GL/gl.h>
+ // extended calls
+ #include <libos/Os.hxx>
+
#include <string>
using std::string;
***************
*** 173,178 ****
string source;
shared_ptr<VPid> vpid;
};
}
! #endif
--- 176,243 ----
string source;
shared_ptr<VPid> vpid;
};
+
+
+
+ /* For GLX_ARB_get_proc_address
+ * API to Os-GLX needs proc name, argument count and type.
+ */
+ class ExtCall {
+ private:
+ string name;
+ int arg_count;
+ int type;
+
+ public:
+ ExtCall(string s, int args, int type) {
+ this->name = s;
+ this->arg_count = args;
+ this->type = type;
+ }
+
+ inline string getName(void) const { return name; }
+ inline int getArgCount(void) const { return arg_count; }
+ inline int getType(void) const { return type; }
+ };
+
+
+ /* Just a simple container for ExtCalls
+ * All used extended calls should be listed in constructor.
+ * -BlendColorEXT
+ */
+ class ExtCallsCheckList {
+ private:
+ vector<ExtCall> list;
+
+ private:
+ void add(string s, int args, int i) {
+ list.push_back(ExtCall(s, args, i));
+ }
+
+ public:
+ ExtCallsCheckList() {
+ this->add("null", -1, -1);
+
+ // GL_ARB_imaging
+ this->add("BlendColorEXT", 4, Os::FLOAT4);
+ }
+
+ bool isCallNameFound(string str_find) const {
+ for (unsigned int i=0; i<list.size(); i++) {
+ if (list[i].getName() == str_find) return true;
+ }
+ return false;
+ }
+
+ const ExtCall & getCallObj(string str_find) const {
+ for (unsigned int i=0; i<list.size(); i++) {
+ if( str_find == list[i].getName()) return list[i];
+ }
+ // be sure you added "exception"
+ return list[0];
+ }
+ };
+
}
! #endif // GZZ CALLGL HXX
- [Gzz-commits] gzz/gfx/libcallgl callgl.hxx,
Matti Katila <=