On Mon, Mar 10, 2003 at 11:50:23PM +0000, Keith Whitwell wrote:
> There's a slight misconception happening here -- the 'ctx' argument doesn't
> exist. The function should read something like:
>
> void swv3f( GLfloat x, GLfloat y, GLfloat z )
> {
> GET_CONTEXT_FROM_THREAD_LOCAL_STORE( ctx )
> // get tnl somehow
>
> tnl->v3f( x, y, z )
> }
>
> But why bother? tnl->v3f isn't virtual, so what's the point of having the
> implementation somewhere else? Why not just do it here?
That's right. But you can make it a static method though:
static void RadeonTNL::v3f( GLfloat x, GLfloat y, GLfloat z )
{
GET_CONTEXT_FROM_THREAD_LOCAL_STORE( ctx )
// get tnl somehow
// do your thing here...
}
If the "*this" pointer isn't passed by any of the arguments, then using
a static method is mostly for convenience and aesthetics. This you can
inherit an unmodified version from a parent class, access the tnl
private data, and the collections of callbacks can be managed as a
whole by the TNL classes or its children.
Jos� Fonseca
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel