On Mon, Aug 03, 2009 at 12:08:25PM -0600, Brian Paul wrote:
> >void
> >_mesa_notifyBindTexImage(GLcontext *ctx, struct gl_texture_object *texObj);
> I think a better name would be _mesa_dirty_texobj() or similar, plus
> update the comment to make it more generic. Basically, name the
> function and document it according to what it does, not what it
> might be used for.
I intended to make the function non-generic. It is at the same level as
_mesa_notifySwapBuffers. But it does no harm to be generic. What do
you think about
/**
* Mark a texture object dirty. It forces the object to be tested for
* completeness and optionally forces the context to re-validate its
* state.
*/
void
_mesa_dirty_texobj(GLcontext *ctx, struct gl_texture_object *texObj,
GLboolean invalidate_state);
_NEW_TEXTURE is set only when invalidate_state is true. This is to
avoid looping over all texture units and targets to decide if the texObj
is bound and _NEW_TEXTURE should be set.
> >For these issues, I want to add _mesa_clear_texture_image and
> >_mesa_clear_texture_object. The former "clears" a texture image by
> >freeing the texel buffer and reinitializes the texture image. The
> >latter is called to "clear" every image of a texture object.
> >With these functions, state tracker can clear the texture object before
> >binding a pipe surface to it. And it can notify mesa about the change.
> I think this looks OK. Just a few more thoughts about naming:
> Rename st_set_teximage() -> st_bind_texture_surface(), plus add a
> more descriptive comment for the function (the current texture
> object's images are replaced, etc.
> st_unset_teximage() -> st_unbind_texture_surface(), plus the comment.
> Finally, add a comment on the GLboolean surface_based; field to
> explain what it means.
Will do it.
I will update them, and put them together in a patch series to implement
eglBindTexImage.
--
Regards,
olv
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev