16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-17 23:39:18 +02:00

vehicle engine voltage calculation tweak, minor gfx renderer logging enhancements

This commit is contained in:
tmj-fstate
2019-11-12 14:08:32 +01:00
parent dcf504ae05
commit 33140dd6a9
10 changed files with 127 additions and 120 deletions

View File

@@ -1,6 +1,9 @@
#include "stdafx.h"
#include "framebuffer.h"
#include "Logs.h"
#include "utilities.h"
gl::framebuffer::framebuffer()
{
glGenFramebuffers(1, *this);
@@ -43,8 +46,14 @@ void gl::framebuffer::detach(GLenum location)
bool gl::framebuffer::is_complete()
{
bind();
GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
return status == GL_FRAMEBUFFER_COMPLETE;
GLenum const status { glCheckFramebufferStatus( GL_FRAMEBUFFER ) };
auto const iscomplete { status == GL_FRAMEBUFFER_COMPLETE };
if( false == iscomplete ) {
ErrorLog( "framebuffer status error: " + to_hex_str( status ) );
}
return iscomplete;
}
void gl::framebuffer::clear(GLbitfield mask)