[Mesa-dev] [PATCH 2/6] main: Added entry point for glTransformFeedbackBufferBase

Laura Ekstrand laura at jlekstrand.net
Mon Feb 2 13:42:21 PST 2015


Oops, what I meant to say was "Make the bufferobj lookup function static."
The lookup transform feedback function doesn't have to be static.

On Mon, Feb 2, 2015 at 6:09 AM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:

> On Mon, Feb 2, 2015 at 6:00 AM, Martin Peres
> <martin.peres at linux.intel.com> wrote:
> > +static struct gl_transform_feedback_object *
> > +_mesa_lookup_transform_feedback_object_err(struct gl_context *ctx,
> > +                                           GLuint xfb, const char* func)
> > +{
> > +   struct gl_transform_feedback_object *obj;
> > +
> > +   obj = _mesa_lookup_transform_feedback_object(ctx, xfb);
> > +   if (!obj) {
> > +      _mesa_error(ctx, GL_INVALID_OPERATION,
> > +                  "%s(xfb=%u: non-generated object name)", func, xfb);
> > +   }
> > +
> > +   return obj;
> > +}
> > +
> > +/**
> > + * Wrapper around _mesa_lookup_bufferobj that throws GL_INVALID_VALUE
> if id
> > + * is not in the hash table. Specialised version for the
> > + * transform-feedback-related functions. After calling _mesa_error, it
> > + * returns NULL.
> > + */
> > +static struct gl_buffer_object *
> > +_mesa_lookup_transform_feedback_bufferobj_err(struct gl_context *ctx,
> > +                                              GLuint buffer, const
> char* func)
>
> The general convention in mesa is that "public" functions are called
> _mesa_foo, while "private" (i.e. static) functions are just called
> foo. In this case, lookup_transform_feedback_bufferobj_err.
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150202/02560d72/attachment.html>


More information about the mesa-dev mailing list