Hello to all,
I have been working on a small render engine to learn opengl and improve my C++ skill.
I have lots of difficulties but I managed to sort them out and learn a lot from them :rolleyes: . However I have few problems that at least for now I can not see a solution and I have some issues with the way I have implemented some things (bad design decision since it is my first render engine).
I will try to make this thread a short as possible and list my errors that I have (note i have implemented a simple include for shaders so that I will reuse something and make shaders look more elegant) :
[ol]
[li]In the camera class I have some weird behavior when I rotate it. https://github.com/lumx/GameEngine/blob/master/GameEngine/src/Core/Render/Camera.cpp
[/li][li]Shadow map are really wired for now. ( look at the picture below) https://github.com/lumx/GameEngine/blob/master/GameEngine/src/Core/Render/Renderer.cpp, vertex shader https://github.com/lumx/GameEngine/blob/master/GameEngine/Assets/Shaders/Shadow_vs.glsl fragment shader https://github.com/lumx/GameEngine/blob/master/GameEngine/Assets/Shaders/Shadow_fs.glsl
[/li][li]I have specular color at the dark side of objects. ( look at the picture below) vertex shader https://github.com/lumx/GameEngine/blob/master/GameEngine/Assets/Shaders/DirectionalLight_vs.glsl ,fragment shader https://github.com/lumx/GameEngine/blob/master/GameEngine/Assets/Shaders/DirectionalLight_fs.glsl, global light include file https://github.com/lumx/GameEngine/blob/master/GameEngine/Assets/Shaders/GlobalLight.inc
[/li][li]I have the OSD class but if I un-comment the error checking I get an INVALID_OPERATION in textures when drawing them. The result is correct but it brothers me why I have that error and why I don’t understand and fix it.
[/li][li]There is another issue with SDL where the mouse event just floods everything. I can not use the keyboard until all mouse motion events are processed and sometimes I can’t even close the window until they are finished. If you have any idea for this non opengl issue please let me know. It will help me a lot
[/li][/ol]
As for the engine I would like to have few opinions if possible on how can I improve it especially how to handle shaders (attributes and uniforms better) and how to improve my texture class and use it as render target for FBO and RBO.
The code is on github https://github.com/lumx/GameEngine and the project is on this dropbox https://www.dropbox.com/s/hdxf0fefftgd6nz/GameEngine%204-April-15.7z?dl=0 link just in case you need a library or something else.
These are images of the shadow map and the depth-buffer
[ATTACH=CONFIG]975[/ATTACH]
[ATTACH=CONFIG]974[/ATTACH]