fixed many memory leaks
added working shadows, using basic shadow mapping
This commit is contained in:
@@ -789,6 +789,8 @@ void sth_delete(struct sth_stash* stash)
|
||||
tex = stash->textures;
|
||||
while(tex != NULL) {
|
||||
curtex = tex;
|
||||
delete tex->m_texels;
|
||||
tex->m_texels=0;
|
||||
tex = tex->next;
|
||||
stash->m_renderCallbacks->updateTexture(curtex,0,0,0);
|
||||
free(curtex);
|
||||
|
||||
@@ -180,6 +180,7 @@ void InternalOpenGL2RenderCallbacks::updateTexture(sth_texture* texture, sth_gly
|
||||
|
||||
glDeleteTextures(1, id);
|
||||
//delete id;
|
||||
delete texture->m_userData;
|
||||
texture->m_userData = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ class GLPrimitiveRenderer;
|
||||
|
||||
struct InternalOpenGL2RenderCallbacks : public RenderCallbacks
|
||||
{
|
||||
|
||||
virtual PrimInternalData* getData()=0;
|
||||
|
||||
virtual ~InternalOpenGL2RenderCallbacks();
|
||||
|
||||
Reference in New Issue
Block a user