1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-02 09:03:37 +00:00

Move zLUT initialization to DepthBufferList ctor.

Destruction of zLUT moved to DepthBufferList destructor.
This commit is contained in:
Sergey Lipskiy 2015-03-26 21:24:51 +06:00
parent 90e27ea0d6
commit 3031883409
2 changed files with 14 additions and 5 deletions

View File

@ -204,10 +204,8 @@ void DepthBuffer::bindDepthImageTexture()
#endif
}
void DepthBufferList::init()
DepthBufferList::DepthBufferList() : m_pCurrent(NULL), m_pzLUT(NULL)
{
m_pCurrent = NULL;
m_pzLUT = new u16[0x40000];
for (int i = 0; i<0x40000; i++) {
u32 exponent = 0;
@ -222,10 +220,20 @@ void DepthBufferList::init()
}
}
void DepthBufferList::destroy()
DepthBufferList::~DepthBufferList()
{
delete[] m_pzLUT;
m_pzLUT = NULL;
m_list.clear();
}
void DepthBufferList::init()
{
m_pCurrent = NULL;
}
void DepthBufferList::destroy()
{
m_pCurrent = NULL;
m_list.clear();
}

View File

@ -52,8 +52,9 @@ public:
const u16 * const getZLUT() const {return m_pzLUT;}
private:
DepthBufferList() : m_pCurrent(NULL), m_pzLUT(NULL) {}
DepthBufferList();
DepthBufferList(const FrameBufferList &);
~DepthBufferList();
typedef std::list<DepthBuffer> DepthBuffers;
DepthBuffers m_list;