mirror of
https://github.com/Linloir/SceneEditor.git
synced 2025-12-16 23:18:12 +08:00
Add extra checks to ebo, vao and vbo
This commit is contained in:
parent
e203ee0ff3
commit
58593822a3
@ -51,5 +51,8 @@ inline void ElementBufferObject::dispose() {
|
||||
inline void ElementBufferObject::ensureInitialized() {
|
||||
if (_id == 0) {
|
||||
OPENGL_EXTRA_FUNCTIONS->glGenBuffers(1, &_id);
|
||||
if (_id == 0) {
|
||||
Logger::error("Failed to create ElementBufferObject");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -60,6 +60,9 @@ inline void VertexArrayObject::dispose() {
|
||||
inline void VertexArrayObject::ensureInitialized() {
|
||||
if (_id == 0) {
|
||||
OPENGL_EXTRA_FUNCTIONS->glGenVertexArrays(1, &_id);
|
||||
if (_id == 0) {
|
||||
Logger::error("Failed to create VertexArrayObject");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -51,5 +51,8 @@ inline void VertexBufferObject::dispose() {
|
||||
inline void VertexBufferObject::ensureInitialized() {
|
||||
if (_id == 0) {
|
||||
OPENGL_EXTRA_FUNCTIONS->glGenBuffers(1, &_id);
|
||||
if (_id == 0) {
|
||||
Logger::error("Failed to create VertexBufferObject");
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user