[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] Context lost and freeing resources



On 14 July 2012 23:20, Benoit Jacob <bjacob@mozilla.com> wrote:
> ----- Original Message -----
>> This is a really stupid question, but I can't find the answer in the
>> wiki [1] or elsewhere.
>>
>> When a WebGL context is lost, should I bother freeing the resources
>> that I've allocated? I strongly suspect that the answer is no, but I
>> just want to check.
>
> No, you don't need to free anything on a lost context. If fact, you can't.
>
>>
>> As I see it, there are three possible answers:
>> 1. Don't do it, calling gl.delete{Texture|Program|...} with a lost
>> context is bad.
>> 2. There's no need to do it, calling gl.delete{Texture|Program|...}
>> with a lost context has no negative effect other than wasting time.
>> 3. You should still free your resources.
>>
>> I expect the answer is #2, but please confirm.
>
> Yes, 2. is correct.

Many thanks Benoit.

Regards,
Tom

-- 
Camptocamp SA
Tom PAYNE
PSE A
CH-1015 Lausanne

+41 21 619 10 13 (direct)
+41 21 619 10 10 (centrale)
+41 21 619 10 00 (fax)

-----------------------------------------------------------
You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email:
unsubscribe public_webgl
-----------------------------------------------------------