mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
opengl error fixes
This commit is contained in:
@@ -39,6 +39,8 @@ void gl::buffer::bind_base(targets target, GLuint index)
|
||||
|
||||
void gl::buffer::unbind(targets target)
|
||||
{
|
||||
if( binding_points[ target ] == 0 ) { return; }
|
||||
|
||||
glBindBuffer(glenum_target(target), 0);
|
||||
binding_points[target] = 0;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,8 @@ void gl::query::end()
|
||||
|
||||
std::optional<int64_t> gl::query::result()
|
||||
{
|
||||
GLuint ready;
|
||||
end(); // intercept potential error if the result check is called for still active object
|
||||
GLuint ready;
|
||||
glGetQueryObjectuiv(*this, GL_QUERY_RESULT_AVAILABLE, &ready);
|
||||
int64_t value = 0;
|
||||
if (ready) {
|
||||
|
||||
Reference in New Issue
Block a user