<div dir="ltr">Oops, what I meant to say was "Make the bufferobj lookup function static."  The lookup transform feedback function doesn't have to be static.<br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 2, 2015 at 6:09 AM, Ilia Mirkin <span dir="ltr"><<a href="mailto:imirkin@alum.mit.edu" target="_blank">imirkin@alum.mit.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Mon, Feb 2, 2015 at 6:00 AM, Martin Peres<br>
<<a href="mailto:martin.peres@linux.intel.com">martin.peres@linux.intel.com</a>> wrote:<br>
> +static struct gl_transform_feedback_object *<br>
> +_mesa_lookup_transform_feedback_object_err(struct gl_context *ctx,<br>
> +                                           GLuint xfb, const char* func)<br>
> +{<br>
> +   struct gl_transform_feedback_object *obj;<br>
> +<br>
> +   obj = _mesa_lookup_transform_feedback_object(ctx, xfb);<br>
> +   if (!obj) {<br>
> +      _mesa_error(ctx, GL_INVALID_OPERATION,<br>
> +                  "%s(xfb=%u: non-generated object name)", func, xfb);<br>
> +   }<br>
> +<br>
> +   return obj;<br>
> +}<br>
> +<br>
> +/**<br>
> + * Wrapper around _mesa_lookup_bufferobj that throws GL_INVALID_VALUE if id<br>
> + * is not in the hash table. Specialised version for the<br>
> + * transform-feedback-related functions. After calling _mesa_error, it<br>
> + * returns NULL.<br>
> + */<br>
> +static struct gl_buffer_object *<br>
> +_mesa_lookup_transform_feedback_bufferobj_err(struct gl_context *ctx,<br>
> +                                              GLuint buffer, const char* func)<br>
<br>
</div></div>The general convention in mesa is that "public" functions are called<br>
_mesa_foo, while "private" (i.e. static) functions are just called<br>
foo. In this case, lookup_transform_feedback_bufferobj_err.<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</div></div></blockquote></div><br></div></div>