You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ZL_Surface does not seem to free the allocated memory for the texture if it gets reassigned.
I know this is probably a not very common use case, but consider this:
The texture resources for the first two calls are not freed and eat up memory (the pixelsA/B/C buffer remain constant).
Even when doing a default constructor assign inbetween the calls, it doesn't change: srfBuffer = ZL_Surface();
I haven't looked further into this, but as a quick fix, added my own clearing function, although I had to make the imp structures public:
In ZL_Texture_Impl::CreateFromBitmap(), is it necessary to do a memcpy of the whole provided buffer? I know the pixel buffer parameter pixels is const, but the memcpy introduces a bit of overhead.
Is there an easy way to update an existing ZL_Surface (created from a pixel buffer) with a new/modified buffer without re-creating everything? Maybe if dimensions are identical, just calling the glTexImage2D/glTexSubImage2D again.
I guess LoadBitmapIntoTexture() would already do this, but I can't access the implementation easily, right?
The text was updated successfully, but these errors were encountered:
I know this is probably a not very common use case, but consider this:
The texture resources for the first two calls are not freed and eat up memory (the pixelsA/B/C buffer remain constant).
Even when doing a default constructor assign inbetween the calls, it doesn't change:
srfBuffer = ZL_Surface();
I haven't looked further into this, but as a quick fix, added my own clearing function, although I had to make the imp structures public:
In ZL_Texture_Impl::CreateFromBitmap(), is it necessary to do a memcpy of the whole provided buffer? I know the pixel buffer parameter pixels is const, but the memcpy introduces a bit of overhead.
Is there an easy way to update an existing ZL_Surface (created from a pixel buffer) with a new/modified buffer without re-creating everything? Maybe if dimensions are identical, just calling the glTexImage2D/glTexSubImage2D again.
I guess LoadBitmapIntoTexture() would already do this, but I can't access the implementation easily, right?
The text was updated successfully, but these errors were encountered: