[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz] Re: gzz/gfx/libcallgl callgl.hxx
From: |
Tuomas Lukka |
Subject: |
[Gzz] Re: gzz/gfx/libcallgl callgl.hxx |
Date: |
Thu, 12 Sep 2002 14:55:49 +0300 |
User-agent: |
Mutt/1.4i |
On Thu, Sep 12, 2002 at 02:32:40PM +0300, Matti Katila wrote:
> 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..
Ah, you want to generalize it that way? Ok, why didn't you say so? ;)
What the comment was saying was that libos needed it, not that
it was needed here.
> > 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
"pegged"? What's a peg?
> 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.
Ok, this is where I think it goes wrong. LibOs should not *execute*
anything. LibOs should just return the address of the procedure,
which would then be called from libcallgl.
Tuomas