Compare commits
No commits in common. "3722e63495af6419cd718c53ed348cf9e67c159b" and "2dcc3f180313448ae84ad3f29eca875718aaf9a4" have entirely different histories.
3722e63495
...
2dcc3f1803
@ -1,23 +0,0 @@
|
|||||||
## 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
|
|
||||||
```
|
|
26
Features.md
Normal file
26
Features.md
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
# 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
|
64
README.md
64
README.md
@ -1,34 +1,40 @@
|
|||||||
# Yoggie Engine
|
# Yoggie Engine
|
||||||
|
|
||||||
<img src="Screenshots/Yoggie.webp" width="160" ></img>
|
<img src="Screenshots/Yoggie.webp" width="400" ></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.
|
|
||||||
|
|
||||||
|
|
||||||
## Features
|
## Screenshots
|
||||||
*_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
|
|
||||||
|
|
||||||
## More docs
|
<img src="Screenshots/screen1.png" width="300"></img> \
|
||||||
[Todo list](TODO.md) \
|
<img src="Screenshots/screen2.png" width="300"></img> \
|
||||||
[Planning](https://git.barink.dev/Nigel/MyGameEngine/projects)\
|
<img src="Screenshots/YoggieEditor.png" width="300"></img> \
|
||||||
[Development](DEVELOPMENT.md)\
|
<img src="Screenshots/YoggieEditor_workingGuizmo.png" width="300"></img> \
|
||||||
[Show case](SHOWCASE.md)
|
<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
|
||||||
|
```
|
17
SHOWCASE.md
17
SHOWCASE.md
@ -1,17 +0,0 @@
|
|||||||
## 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)
BIN
Screenshots/ImprovedRendering.png
(Stored with Git LFS)
Binary file not shown.
BIN
Screenshots/YoggieEditor.png
(Stored with Git LFS)
Normal file
BIN
Screenshots/YoggieEditor.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Screenshots/screen2.png
(Stored with Git LFS)
Normal file
BIN
Screenshots/screen2.png
(Stored with Git LFS)
Normal file
Binary file not shown.
37
TODO.md
37
TODO.md
@ -1,23 +1,24 @@
|
|||||||
# Project Planning
|
# Project Planning
|
||||||
|
|
||||||
<input type="checkbox" checked> Setup build system</input>\
|
**NOTE:** __Fairly detailed planning__
|
||||||
<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></input> Setup build system \
|
||||||
<input type="checkbox" checked>Work on basic logging</input>\
|
<input type="checkbox" checked></input> Link with GLFW \
|
||||||
<input type="checkbox" checked>Running LUA</input>\
|
<input type="checkbox" checked></input> Basic Window \
|
||||||
<input type="checkbox" checked>Basic triangle rendering</input>\
|
<input type="checkbox" checked></input> Basic Triangle rendering \
|
||||||
<input type="checkbox" checked>Load model files</input>\
|
<input type="checkbox" checked></input> Basic IMGui \
|
||||||
<input type="checkbox" checked>Basic ImGui </input>\
|
<input type="checkbox"></input> Basic Textures \
|
||||||
<input type="checkbox" checked>Skybox support</input>\
|
<input type="checkbox" checked></input> Link GLEW or GLAD \
|
||||||
<input type="checkbox">Basic Textures <i>(Soon)</i></input>\
|
<input type="checkbox" checked></input> Work on basic logging \
|
||||||
<input type="checkbox">More shader work <i>(Hopefully coming in January)</i></input> \
|
<input type="checkbox" checked></input> Input handling \
|
||||||
<input type="checkbox">Input handling <i>(Soon)</i></input>\
|
<input type="checkbox"></input> More shader work \
|
||||||
<input type="checkbox">Basic Physics <i>(Almost implemented)</i></input>\
|
<input type="checkbox" checked></input> Load FBX model files \
|
||||||
<input type="checkbox">Lua Scripting <i>(Soon)</i> </input>\
|
<input type="checkbox"></input> Basic Physics \
|
||||||
<input type="checkbox">Basic Sound system</input>
|
<input type="checkbox" checked> Running LUA \
|
||||||
### What's next?
|
<input type="checkbox"> Lua Scripting \
|
||||||
I am not sure what's going to be added next
|
<input type="checkbox"></input> To far in the future
|
||||||
|
|
||||||
|
|
||||||
## Resources
|
## Resources
|
||||||
https://renderdoc.org/ \
|
https://renderdoc.org/ \
|
||||||
|
@ -23,12 +23,29 @@ namespace YoggieEngine {
|
|||||||
|
|
||||||
|
|
||||||
// Create a depth buffer
|
// Create a depth buffer
|
||||||
|
glGenTextures(1, &DepthAttachment);
|
||||||
|
glBindTexture(GL_TEXTURE_2D, 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);
|
glGenRenderbuffers(1, &DepthAttachment);
|
||||||
glBindRenderbuffer(GL_RENDERBUFFER, DepthAttachment);
|
glBindRenderbuffer(GL_RENDERBUFFER, DepthAttachment);
|
||||||
glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT, width, height);
|
|
||||||
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, 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)
|
if (!glCheckFramebufferStatus(GL_FRAMEBUFFER) == GL_FRAMEBUFFER_COMPLETE)
|
||||||
{
|
{
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
#include "../Graphics/Memory/VertexArray.h"
|
#include "../Graphics/Memory/VertexArray.h"
|
||||||
#include "../Graphics/Primitives/DrawCommand.h"
|
#include "../Graphics/Primitives/DrawCommand.h"
|
||||||
|
|
||||||
|
#define FORWARD 1
|
||||||
|
#define DEFERRED 0
|
||||||
|
|
||||||
extern YoggieEngine::Camera cam;
|
extern YoggieEngine::Camera cam;
|
||||||
namespace YoggieEngine {
|
namespace YoggieEngine {
|
||||||
@ -70,6 +72,7 @@ Renderer::Renderer(RendererConfig& config)
|
|||||||
|
|
||||||
glEnable(GL_DEPTH_TEST);
|
glEnable(GL_DEPTH_TEST);
|
||||||
|
|
||||||
|
#if DEFERRED
|
||||||
// Deferred Rendering
|
// Deferred Rendering
|
||||||
glGenFramebuffers(1, &gBuffer);
|
glGenFramebuffers(1, &gBuffer);
|
||||||
glBindFramebuffer(GL_FRAMEBUFFER, gBuffer);
|
glBindFramebuffer(GL_FRAMEBUFFER, gBuffer);
|
||||||
@ -114,6 +117,7 @@ Renderer::Renderer(RendererConfig& config)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
std::vector<std::string> faces{
|
std::vector<std::string> faces{
|
||||||
"build/Debug/skybox/Open_Water/right.jpg",
|
"build/Debug/skybox/Open_Water/right.jpg",
|
||||||
@ -192,6 +196,9 @@ void Renderer::Submit( Render3DComponent& renderComponent, TransformComponent& t
|
|||||||
|
|
||||||
void Renderer::GeometryPass() {
|
void Renderer::GeometryPass() {
|
||||||
// 1.0 Geometry pass
|
// 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();
|
gBufferShader.Use();
|
||||||
|
|
||||||
for (const DrawCommand& command : commands)
|
for (const DrawCommand& command : commands)
|
||||||
@ -239,14 +246,8 @@ void Renderer::SkyboxPass() {
|
|||||||
void Renderer::lightingPass(Scene& scene){
|
void Renderer::lightingPass(Scene& scene){
|
||||||
|
|
||||||
// 2.0 Lighting Pass
|
// 2.0 Lighting Pass
|
||||||
|
|
||||||
// configure shader
|
|
||||||
glBindFramebuffer(GL_FRAMEBUFFER, m_framebuffer.GetId());
|
glBindFramebuffer(GL_FRAMEBUFFER, m_framebuffer.GetId());
|
||||||
|
|
||||||
lightingPassShader.Use();
|
lightingPassShader.Use();
|
||||||
lightingPassShader.setUniformInt("gPosition", 0);
|
|
||||||
lightingPassShader.setUniformInt("gNormal", 1);
|
|
||||||
lightingPassShader.setUniformInt("gColorSpec", 2);
|
|
||||||
|
|
||||||
// Bind all Gbuffer textures
|
// Bind all Gbuffer textures
|
||||||
glActiveTexture(GL_TEXTURE0);
|
glActiveTexture(GL_TEXTURE0);
|
||||||
@ -304,25 +305,34 @@ void Renderer::lightingPass(Scene& scene){
|
|||||||
|
|
||||||
void Renderer::Render(Scene& scene)
|
void Renderer::Render(Scene& scene)
|
||||||
{
|
{
|
||||||
|
#if DEFERRED
|
||||||
glBindFramebuffer(GL_FRAMEBUFFER, gBuffer);
|
// configure shader
|
||||||
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
|
lightingPassShader.Use();
|
||||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
lightingPassShader.setUniformInt("gPosition", 0);
|
||||||
|
lightingPassShader.setUniformInt("gNormal", 1);
|
||||||
SkyboxPass();
|
lightingPassShader.setUniformInt("gColorSpec", 2);
|
||||||
|
|
||||||
GeometryPass();
|
GeometryPass();
|
||||||
|
|
||||||
lightingPass(scene);
|
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
|
// Forward rendering approach
|
||||||
glBindFramebuffer(GL_FRAMEBUFFER, m_framebuffer.GetId());
|
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)
|
for (const DrawCommand& command : commands)
|
||||||
{
|
{
|
||||||
glBindVertexArray(command.VAO_identifier);
|
glBindVertexArray(command.VAO_identifier);
|
||||||
@ -362,6 +372,7 @@ void Renderer::Render(Scene& scene)
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
commands.clear();
|
commands.clear();
|
||||||
glBindFramebuffer(GL_FRAMEBUFFER, 0);
|
glBindFramebuffer(GL_FRAMEBUFFER, 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user