mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-03-02 19:16:56 +00:00
Don't try to register/unregister too early.
This commit is contained in:
parent
dcc9785357
commit
c60bda83b6
@ -22,10 +22,8 @@ DrawBuffer::DrawBuffer() : count_(0), atlas(0) {
|
||||
fontscalex = 1.0f;
|
||||
fontscaley = 1.0f;
|
||||
inited_ = false;
|
||||
register_gl_resource_holder(this);
|
||||
}
|
||||
DrawBuffer::~DrawBuffer() {
|
||||
unregister_gl_resource_holder(this);
|
||||
delete [] verts_;
|
||||
}
|
||||
|
||||
@ -34,12 +32,14 @@ void DrawBuffer::Init() {
|
||||
return;
|
||||
inited_ = true;
|
||||
glGenBuffers(1, (GLuint *)&vbo_);
|
||||
register_gl_resource_holder(this);
|
||||
}
|
||||
|
||||
void DrawBuffer::Shutdown() {
|
||||
glDeleteBuffers(1, (GLuint *)&vbo_);
|
||||
vbo_ = 0;
|
||||
inited_ = false;
|
||||
unregister_gl_resource_holder(this);
|
||||
}
|
||||
|
||||
void DrawBuffer::GLLost() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user