Fixed mismatched new[]/delete in 3D viewer
This commit is contained in:
parent
cf373e543f
commit
14cbdcec1f
|
@ -83,7 +83,7 @@ C3D_RENDER_RAYTRACING::~C3D_RENDER_RAYTRACING()
|
||||||
delete m_outlineBoard2dObjects;
|
delete m_outlineBoard2dObjects;
|
||||||
m_outlineBoard2dObjects = NULL;
|
m_outlineBoard2dObjects = NULL;
|
||||||
|
|
||||||
delete m_shaderBuffer;
|
delete[] m_shaderBuffer;
|
||||||
m_shaderBuffer = NULL;
|
m_shaderBuffer = NULL;
|
||||||
|
|
||||||
opengl_delete_pbo();
|
opengl_delete_pbo();
|
||||||
|
@ -2132,7 +2132,7 @@ void C3D_RENDER_RAYTRACING::initialize_block_positions()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create m_shader buffer
|
// Create m_shader buffer
|
||||||
delete m_shaderBuffer;
|
delete[] m_shaderBuffer;
|
||||||
m_shaderBuffer = new SFVEC3F[m_realBufferSize.x * m_realBufferSize.y];
|
m_shaderBuffer = new SFVEC3F[m_realBufferSize.x * m_realBufferSize.y];
|
||||||
|
|
||||||
opengl_init_pbo();
|
opengl_init_pbo();
|
||||||
|
|
|
@ -109,11 +109,11 @@ void CPOSTSHADER::SetPixelData( unsigned int x,
|
||||||
|
|
||||||
void CPOSTSHADER::destroy_buffers()
|
void CPOSTSHADER::destroy_buffers()
|
||||||
{
|
{
|
||||||
delete m_normals; m_normals = 0;
|
delete[] m_normals; m_normals = nullptr;
|
||||||
delete m_color; m_color = 0;
|
delete[] m_color; m_color = nullptr;
|
||||||
delete m_depth; m_depth = 0;
|
delete[] m_depth; m_depth = nullptr;
|
||||||
delete m_shadow_att_factor; m_shadow_att_factor = 0;
|
delete[] m_shadow_att_factor; m_shadow_att_factor = nullptr;
|
||||||
delete m_wc_hitposition; m_wc_hitposition = 0;
|
delete[] m_wc_hitposition; m_wc_hitposition = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue