mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-04 10:03:36 +00:00
Move zLUT initialization to DepthBufferList ctor.
Destruction of zLUT moved to DepthBufferList destructor.
This commit is contained in:
parent
90e27ea0d6
commit
3031883409
|
@ -204,10 +204,8 @@ void DepthBuffer::bindDepthImageTexture()
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void DepthBufferList::init()
|
DepthBufferList::DepthBufferList() : m_pCurrent(NULL), m_pzLUT(NULL)
|
||||||
{
|
{
|
||||||
m_pCurrent = NULL;
|
|
||||||
|
|
||||||
m_pzLUT = new u16[0x40000];
|
m_pzLUT = new u16[0x40000];
|
||||||
for (int i = 0; i<0x40000; i++) {
|
for (int i = 0; i<0x40000; i++) {
|
||||||
u32 exponent = 0;
|
u32 exponent = 0;
|
||||||
|
@ -222,10 +220,20 @@ void DepthBufferList::init()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DepthBufferList::destroy()
|
DepthBufferList::~DepthBufferList()
|
||||||
{
|
{
|
||||||
delete[] m_pzLUT;
|
delete[] m_pzLUT;
|
||||||
m_pzLUT = NULL;
|
m_pzLUT = NULL;
|
||||||
|
m_list.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
void DepthBufferList::init()
|
||||||
|
{
|
||||||
|
m_pCurrent = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DepthBufferList::destroy()
|
||||||
|
{
|
||||||
m_pCurrent = NULL;
|
m_pCurrent = NULL;
|
||||||
m_list.clear();
|
m_list.clear();
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,8 +52,9 @@ public:
|
||||||
const u16 * const getZLUT() const {return m_pzLUT;}
|
const u16 * const getZLUT() const {return m_pzLUT;}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DepthBufferList() : m_pCurrent(NULL), m_pzLUT(NULL) {}
|
DepthBufferList();
|
||||||
DepthBufferList(const FrameBufferList &);
|
DepthBufferList(const FrameBufferList &);
|
||||||
|
~DepthBufferList();
|
||||||
|
|
||||||
typedef std::list<DepthBuffer> DepthBuffers;
|
typedef std::list<DepthBuffer> DepthBuffers;
|
||||||
DepthBuffers m_list;
|
DepthBuffers m_list;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user