Skip to content
Snippets Groups Projects
Commit 78ddf0de authored by aboensch's avatar aboensch
Browse files

Merge branch 'master' into feature/#486_Add_gcc_7_to_CI_pipeline

# Conflicts:
#	conanfile.py
parents 49f4e5e8 a205059d
No related branches found
No related tags found
1 merge request!152Feature/#486 add gcc 7 to ci pipeline
......@@ -36,7 +36,7 @@ class ProjectPhoenix(ConanFile):
("cppcheck/1.84@RWTH-VR/thirdparty"),
("cpplint/e8ffd7c@RWTH-VR/thirdparty"),
("freeimage/3.17.0_2@RWTH-VR/thirdparty"),
("gl/1.1.1@RWTH-VR/thirdparty"),
("gl/1.1.6@RWTH-VR/thirdparty"),
("glm/0.9.9.0@g-truc/stable"),
("jsonformoderncpp/3.0.1@vthiery/stable"),
("openvr/1.0.12@RWTH-VR/thirdparty"),
......
......@@ -86,7 +86,7 @@ int main(int, char**) {
rendering_system, splash, input_system,
openvr_system]() {
auto model_surface_entity = phx::SceneLoader::InsertModelIntoScene(
"models/combustion/mixture_surface_0.2_lower.stl", scene.get());
"models/combustion/combustion_opt.stl", scene.get());
auto surface_transform =
model_surface_entity->GetFirstComponent<phx::Transform>();
auto surface_material_handle =
......
......@@ -26,9 +26,9 @@
#include <memory>
#include <string>
#include "phx/resources/types/image.hpp"
#include "phx/resources/resource_manager.hpp"
#include "phx/resources/resource_utils.hpp"
#include "phx/resources/types/image.hpp"
#include "phx/resources_path.hpp"
namespace phx {
......@@ -63,7 +63,6 @@ void SplashScreen::Draw() {
splash_tex.set_sub_image(0, 0, 0, static_cast<GLsizei>(splash_dimensions[0]),
static_cast<GLsizei>(splash_dimensions[1]), GL_RGBA,
GL_UNSIGNED_BYTE, splash_image_->GetPixels().first);
gl::print_error("OpenGl Error creating Splash Screen texture: ");
splash_buff.unbind();
splash_tex.unbind();
......@@ -80,7 +79,6 @@ void SplashScreen::Draw() {
0, 0, 0, static_cast<GLsizei>(progress_dimensions[0]),
static_cast<GLsizei>(progress_dimensions[1]), GL_RGBA, GL_UNSIGNED_BYTE,
progressbar_image_->GetPixels().first);
gl::print_error("OpenGl Error creating Progress Bar texture: ");
progress_buff.unbind();
progress_tex.unbind();
......@@ -97,8 +95,6 @@ void SplashScreen::Draw() {
static_cast<GLsizei>(splash_dimensions[1] + y_offset),
GL_COLOR_BUFFER_BIT, GL_LINEAR);
gl::print_error("OpenGl Error blitting Splash Screen: ");
constexpr float progressbar_max_pixel_width = 198.f;
unsigned int progressbar_current_pixel_width;
{
......
......@@ -42,7 +42,6 @@ phx::RenderTarget::RenderTarget(const glm::uvec2 dimensions)
const GLint width = static_cast<GLint>(dimensions.x);
const GLint height = static_cast<GLint>(dimensions.y);
color_texture_->set_storage(1, GL_RGB8, width, height);
gl::print_error("OpenGl Error creating Render Target Color Texture: ");
attach_texture<GL_TEXTURE_2D>(GL_COLOR_ATTACHMENT0, *color_texture_, 0);
color_texture_->unbind();
......@@ -50,13 +49,11 @@ phx::RenderTarget::RenderTarget(const glm::uvec2 dimensions)
depth_texture_ = std::make_unique<gl::texture_2d>();
depth_texture_->bind();
depth_texture_->set_storage(1, GL_DEPTH_COMPONENT24, width, height);
gl::print_error("OpenGl Error creating Render Target Depth Texture: ");
attach_texture<GL_TEXTURE_2D>(GL_DEPTH_ATTACHMENT, *depth_texture_, 0);
depth_texture_->unbind();
if (!is_valid() || !is_complete()) {
gl::print_error("OpenGl Error creating Render Target: ");
error(
"[RenderTarget] Unable to create render target, status: {}, valid: {}",
status(), is_valid());
......
......@@ -39,6 +39,7 @@
#include "phx/rendering/components/transform.hpp"
#include "phx/rendering/render_passes/skybox_pass.hpp"
#include "gl/debug.hpp"
#include "gl/opengl.hpp"
namespace phx {
......@@ -54,8 +55,11 @@ void RenderingSystem::InitializeOpenGL() {
if (!gl::initialize()) {
error("Initializing gl failed");
}
std::string prefix = "[RenderingSystem] OpenGl Error: ";
gl::print_error(prefix.c_str());
gl::set_debug_output_enabled(true);
gl::set_debug_log_callback([&](gl::debug_log log) {
warn("[gl::error] with message {}", log.message);
});
}
void RenderingSystem::SetupFramegraph() {
......
......@@ -131,7 +131,6 @@ void Material::SetTexture(ResourcePointer<Image> image,
(*texture)->generate_mipmap();
gl::texture_handle handle(*texture->get());
handle.set_resident(true);
gl::print_error("[Material::SetTexture] OpenGl Error code");
}
void Material::ResetTexture(std::shared_ptr<gl::texture_2d>* texture) {
......
File added
......@@ -22,11 +22,11 @@
import sys, getopt
#functions you want to mock should be put in this list
functions_to_mock =['glClear', 'glEnable', 'glClearColor', 'glCreateProgram', 'glCreateShader', 'glNamedBufferData', 'glShaderSource',
functions_to_mock =['glClear', 'glEnable', 'glIsEnabled', 'glDisable', 'glClearColor', 'glCreateProgram', 'glCreateShader', 'glNamedBufferData', 'glShaderSource',
'glCompileShader', 'glAttachShader', 'glBindVertexArray', 'glCreateBuffers', 'glCreateVertexArrays', 'glEnableVertexArrayAttrib',
'glGetUniformLocation', 'glIsBuffer', 'glIsProgram', 'glIsVertexArray', 'glLinkProgram', 'glUniformMatrix4fv', 'glUniform3fv',
'glUniform1f', 'glUseProgram', 'glVertexArrayElementBuffer', 'glVertexArrayVertexBuffer', 'glDrawElements', 'glVertexArrayAttribFormat',
'glGetProgramiv', 'glGetProgramInfoLog', 'glProgramUniform3fv', 'glProgramUniformMatrix4fv', 'glClearColor',
'glGetProgramiv', 'glGetProgramInfoLog', 'glProgramUniform3fv', 'glProgramUniformMatrix4fv', 'glGetPointerv',
'glClearDepth', 'glClearStencil', 'glColorMask', 'glDepthMask', 'glReadPixels', '__glewStencilMaskSeparate', '__glewClampColor',
'__glewColorMaski', '__glewClearDepthf', '__glewBlitNamedFramebuffer', '__glewCheckNamedFramebufferStatus', '__glewClearNamedFramebufferfi',
'__glewClearNamedFramebufferfv', '__glewClearNamedFramebufferiv', '__glewClearNamedFramebufferuiv', '__glewCreateFramebuffers',
......@@ -62,8 +62,9 @@ functions_to_mock =['glClear', 'glEnable', 'glClearColor', 'glCreateProgram', 'g
'__glewGetVertexArrayIndexediv', '__glewGetVertexArrayiv', '__glewVertexArrayAttribBinding', '__glewVertexArrayAttribIFormat', '__glewVertexArrayAttribLFormat',
'__glewVertexArrayBindingDivisor', '__glewDeleteVertexArrays', 'glBindTexture', 'glDeleteTextures', '__glewCreateTextures', '__glewNamedFramebufferTexture',
'__glewTextureStorage2D', '__glewBindFramebuffer', 'glIsTexture', '__glewGetTextureHandleARB', '__glewGenerateTextureMipmap', '__glewTextureParameteri', '__glewTextureSubImage2D',
'__glewBindBufferBase', '__glewBindBuffer', '__glewBindBufferRange', '__glewCreateShaderProgramv', 'glDepthRange', '__glewDepthRangef', '__glewDepthRangeIndexed', '__glewViewportIndexedf',
'glPolygonMode', 'glDrawArrays', '__glewTextureStorage3D', '__glewTextureSubImage3D']
'__glewBindBufferBase', '__glewBindBuffer', '__glewBindBufferRange', '__glewCreateShaderProgramv', 'glDepthRange', '__glewDepthRangef', '__glewDepthRangeIndexed', '__glewViewportIndexedf', 'glPolygonMode', 'glDebugMessageCallback',
'__glewDebugMessageControl', '__glewDebugMessageInsert', '__glewGetDebugMessageLog', '__glewGetObjectPtrLabel', '__glewPopDebugGroup', '__glewPushDebugGroup', '__glewClientWaitSync',
'__glewDeleteSync', '__glewFenceSync', '__glewGetSynciv', '__glewIsSync', '__glewWaitSync', '__glewObjectPtrLabel', '__glewTextureStorage3D', '__glewTextureSubImage3D', 'glDrawArrays']
#allow calls you want to provide and not be auto generated
allow_calls_provided = ['ALLOW_CALL(open_gl_mock, glewInit()).RETURN(GLEW_OK);',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment