Compare commits

...

2 Commits

Author SHA1 Message Date
3722e63495 Updated Markdown Documents
- Added new screenshot
- Removed two unnecessary screenshots
- Moved screenshots to a separate showcase markdown file
- Updated the Todo list
- Removed the features markdown file and added it to the README
- Moved development instructions to a separate Development markdown file
2022-12-28 23:49:55 +01:00
3a9c07aff9 Mixing Deferred and Forward rendering
- TODO: fix Skybox affected by lighting pass
2022-12-28 23:17:55 +01:00
11 changed files with 110 additions and 134 deletions

23
DEVELOPMENT.md Normal file
View File

@ -0,0 +1,23 @@
## Requirements
*_NOTE:_ Right now the build proces of some third party libraries have not been converted and may need special tooling*
#### Software
* Premake
* Git
* C++ Compiler
## Windows development workflow
User premake to generate project files for the approperiate build method.
On Windows I assume you'll build with visual studio
```bash
User:~$ premake vs2022
```
## Linux development workflow
Use premake to generate project files for the approperiate build method.
On Linux I assume you'll build with something like make.
```bash
User@Machine:~$ premake gmake2
```

View File

@ -1,26 +0,0 @@
# Yoggie Engine features
## Features
**NOTE** __Not in any particular order__
- Rendering
- OpenGL
- Vulkan
- Logging
- Different for debug and release
- Different per OS
- Physics
- PhysX
- Alternative for non-nvidia stuff?!
- Basic Entity Component system
- Graphical scripting ??
- Scripting support ( idk what language)
- LUA
- Configuration options
- JSON
- LUA
- YAML

View File

@ -1,40 +1,34 @@
# Yoggie Engine
<img src="Screenshots/Yoggie.webp" width="400" ></img>
<img src="Screenshots/Yoggie.webp" width="160" ></img>
## Goal
Must support building a full game in 48 hours.
The goal is to build a mature enough engine to be capable of using during game jams.
## Screenshots
## Features
*_NOTE:_ Just because it is listed as a feature here does not imply it has been nor guarantees it ever will be implemented*
- Rendering
- OpenGL
- Vulkan
- Metal (Possibly)
- Logging
- Different for debug and release
- Physics
- PhysX
- Jolt Physics
- Entity Component system
- Graphical scripting (Possibly)
- Scripting support
- LUA
- C# (for object orientated approaches to gamedev)
- Configuration options
- JSON
- YAML
- INI
<img src="Screenshots/screen1.png" width="300"></img> \
<img src="Screenshots/screen2.png" width="300"></img> \
<img src="Screenshots/YoggieEditor.png" width="300"></img> \
<img src="Screenshots/YoggieEditor_workingGuizmo.png" width="300"></img> \
<img src="Screenshots/YoggieEditorV0.2.png" width="300"></img>
## Planning
see [TODO](docs/TODO.md) \
see [Features](Features.md)
_NOTE:_
The planning is moving away from markdown in favor
of gitea Projects. New planning will be visible on [this page](https://git.barink.dev/Nigel/MyGameEngine/projects).
## Requirements
#### Software
* Premake
* Git
* C++ Compiler
## Windows development workflow
User premake to generate project files for the approperiate build method.
On Windows I assume you'll build with visual studio
```bash
User:~$ premake vs2022
```
## Linux development workflow
Use premake to generate project files for the approperiate build method.
On Linux I assume you'll build with something like make.
```bash
User@Machine:~$ premake gmake2
```
## More docs
[Todo list](TODO.md) \
[Planning](https://git.barink.dev/Nigel/MyGameEngine/projects)\
[Development](DEVELOPMENT.md)\
[Show case](SHOWCASE.md)

17
SHOWCASE.md Normal file
View File

@ -0,0 +1,17 @@
## The engine development in pictures
__Testing OpenGl with ImGui as a concept__
<img src="Screenshots/OpenGLAndImGuiTest.png" width="300"></img>
__Working on docking with different windows using ImGui__
<img src="Screenshots/YoggieEditor_workingGuizmo.png" width="300"></img>
__A first more complete look of the engine__
<img src="Screenshots/YoggieEditorV0.2.png" width="300"></img>
__Mixing deferred and forward rendering and adding a skybox__
<img src="Screenshots/ImprovedRendering.png" width="300"></img>

BIN
Screenshots/ImprovedRendering.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Screenshots/YoggieEditor.png (Stored with Git LFS)

Binary file not shown.

BIN
Screenshots/screen2.png (Stored with Git LFS)

Binary file not shown.

37
TODO.md
View File

@ -1,24 +1,23 @@
# Project Planning
**NOTE:** __Fairly detailed planning__
<input type="checkbox" checked></input> Setup build system \
<input type="checkbox" checked></input> Link with GLFW \
<input type="checkbox" checked></input> Basic Window \
<input type="checkbox" checked></input> Basic Triangle rendering \
<input type="checkbox" checked></input> Basic IMGui \
<input type="checkbox"></input> Basic Textures \
<input type="checkbox" checked></input> Link GLEW or GLAD \
<input type="checkbox" checked></input> Work on basic logging \
<input type="checkbox" checked></input> Input handling \
<input type="checkbox"></input> More shader work \
<input type="checkbox" checked></input> Load FBX model files \
<input type="checkbox"></input> Basic Physics \
<input type="checkbox" checked> Running LUA \
<input type="checkbox"> Lua Scripting \
<input type="checkbox"></input> To far in the future
<input type="checkbox" checked> Setup build system</input>\
<input type="checkbox" checked>Link with GLFW</input>\
<input type="checkbox" checked>Link GLEW or GLAD</input>\
<input type="checkbox" checked>Basic Window</input>\
<input type="checkbox" checked>Work on basic logging</input>\
<input type="checkbox" checked>Running LUA</input>\
<input type="checkbox" checked>Basic triangle rendering</input>\
<input type="checkbox" checked>Load model files</input>\
<input type="checkbox" checked>Basic ImGui </input>\
<input type="checkbox" checked>Skybox support</input>\
<input type="checkbox">Basic Textures <i>(Soon)</i></input>\
<input type="checkbox">More shader work <i>(Hopefully coming in January)</i></input> \
<input type="checkbox">Input handling <i>(Soon)</i></input>\
<input type="checkbox">Basic Physics <i>(Almost implemented)</i></input>\
<input type="checkbox">Lua Scripting <i>(Soon)</i> </input>\
<input type="checkbox">Basic Sound system</input>
### What's next?
I am not sure what's going to be added next
## Resources
https://renderdoc.org/ \

View File

@ -23,29 +23,12 @@ namespace YoggieEngine {
// Create a depth buffer
glGenTextures(1, &DepthAttachment);
glBindTexture(GL_TEXTURE_2D, DepthAttachment);
glGenRenderbuffers(1, &DepthAttachment);
glBindRenderbuffer(GL_RENDERBUFFER, DepthAttachment);
glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT, width, height);
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, DepthAttachment);
glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH24_STENCIL8, width, height, 0, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, NULL);
glBindTexture(GL_TEXTURE_2D, 0);
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, GL_TEXTURE_2D, DepthAttachment, 0);
/*
* // Render buffer
glGenRenderbuffers(1, &DepthAttachment);
glBindRenderbuffer(GL_RENDERBUFFER, DepthAttachment);
glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8, 800, 600);
glBindRenderbuffer(GL_RENDERBUFFER, 0);
glFramebufferRenderbuffer(GL_RENDERBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, DepthAttachment);
*/
if (!glCheckFramebufferStatus(GL_FRAMEBUFFER) == GL_FRAMEBUFFER_COMPLETE)
{

View File

@ -6,8 +6,6 @@
#include "../Graphics/Memory/VertexArray.h"
#include "../Graphics/Primitives/DrawCommand.h"
#define FORWARD 1
#define DEFERRED 0
extern YoggieEngine::Camera cam;
namespace YoggieEngine {
@ -72,7 +70,6 @@ Renderer::Renderer(RendererConfig& config)
glEnable(GL_DEPTH_TEST);
#if DEFERRED
// Deferred Rendering
glGenFramebuffers(1, &gBuffer);
glBindFramebuffer(GL_FRAMEBUFFER, gBuffer);
@ -117,7 +114,6 @@ Renderer::Renderer(RendererConfig& config)
}
#endif
std::vector<std::string> faces{
"build/Debug/skybox/Open_Water/right.jpg",
@ -196,9 +192,6 @@ void Renderer::Submit( Render3DComponent& renderComponent, TransformComponent& t
void Renderer::GeometryPass() {
// 1.0 Geometry pass
glBindFramebuffer(GL_FRAMEBUFFER, gBuffer);
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
gBufferShader.Use();
for (const DrawCommand& command : commands)
@ -246,8 +239,14 @@ void Renderer::SkyboxPass() {
void Renderer::lightingPass(Scene& scene){
// 2.0 Lighting Pass
// configure shader
glBindFramebuffer(GL_FRAMEBUFFER, m_framebuffer.GetId());
lightingPassShader.Use();
lightingPassShader.setUniformInt("gPosition", 0);
lightingPassShader.setUniformInt("gNormal", 1);
lightingPassShader.setUniformInt("gColorSpec", 2);
// Bind all Gbuffer textures
glActiveTexture(GL_TEXTURE0);
@ -305,34 +304,25 @@ void Renderer::lightingPass(Scene& scene){
void Renderer::Render(Scene& scene)
{
#if DEFERRED
// configure shader
lightingPassShader.Use();
lightingPassShader.setUniformInt("gPosition", 0);
lightingPassShader.setUniformInt("gNormal", 1);
lightingPassShader.setUniformInt("gColorSpec", 2);
glBindFramebuffer(GL_FRAMEBUFFER, gBuffer);
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
SkyboxPass();
GeometryPass();
lightingPass(scene);
glBindFramebuffer(GL_READ_FRAMEBUFFER, gBuffer);
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, m_framebuffer.GetId());
glBlitFramebuffer(0, 0, width, height, 0, 0, width, height, GL_DEPTH_BUFFER_BIT, GL_NEAREST);
#endif
#if FORWARD
// Forward rendering approach
glBindFramebuffer(GL_FRAMEBUFFER, m_framebuffer.GetId());
glClearColor(m_clearColor.r, m_clearColor.g, m_clearColor.b, 1.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
SkyboxPass();
for (const DrawCommand& command : commands)
{
glBindVertexArray(command.VAO_identifier);
@ -372,7 +362,6 @@ void Renderer::Render(Scene& scene)
*/
#endif
commands.clear();
glBindFramebuffer(GL_FRAMEBUFFER, 0);