[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz] Re: gzz/gfx/libcallgl callgl.hxx
From: |
Matti Katila |
Subject: |
[Gzz] Re: gzz/gfx/libcallgl callgl.hxx |
Date: |
Thu, 12 Sep 2002 14:32:40 +0300 (EEST) |
On Thu, 12 Sep 2002, Tuomas Lukka wrote:
> [Uhh, what's 'type'?]
> The ARB_get_proc_address only needs the name.
Give me with iron wire what do you like to do with the returning address.
I though someone might want to use it properly?
Now in callgl.cxx are many ifs almoust the same like:
...glScaled(atof(v[1].c_str()), atof(v[2].c_str()),
atof(v[3].c_str()));
} else if (checkfunc(v, "Translate", 3)) {
glTranslated(atof(v[1].c_str()), atof(v[2].c_str()),
atof(v[3].c_str()));
I think this can be generalized with switch for example:
switch(type) {
case FLOAT3: "proc_address" ( atof(v[1].c_str()),
atof(v[2].c_str()),
etc..
> It would have been nice if you had first discussed the intended
> architecture (new classes etc) on the mailing list...
Ok,
getting address
1. GLX_ARB_get_proc_address is pegged in gallgl
2. Check if pegged procname is listed.
3. ask libos actually to do the job.
using addres
1. callgl gets a peg which is not listed in 'else if' list.
2. check out the list if it's there.
3. send a peg to libos to excecute. Because callgl has a list of extended
calls it also knows what kind of call it is. So for example it knows
how many arguments might be needed or if not needed at all.
-Matti