Markus Wick <[email protected]> writes:

> Am 2014-03-21 00:43, schrieb Keith Packard:
>>> more important to only get one mipmap level: max_level = 0
>> I copied this code from elsewhere; do you have a substitute suggestion?
>
> glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0);
> The other parameters are sampler parameters, max_level is a texture 
> parameter and affects allocation.

Do we need the other parameters then?

> So what will happen if a program only alloc and delete a font? As 
> font_get wasn't called, we delete a not initialized font.

Oh, good point, we'd end up deleting texture 0, which is either harmless
and unnecessary or a plain bad idea. I've added this to the code:

    if (!glamor_font->realized)
        return TRUE;

    /* Unrealize the font, freeing the allocated texture */
    glamor_font->realized = FALSE;

-- 
[email protected]

Attachment: pgplJwhstwLJl.pgp
Description: PGP signature

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to