Commit graph

22 commits

Author SHA1 Message Date
Light
271f3b2075 Framebuffer
- Added 'Framebuffer'
- Added an optional 'FrameBuffer' parameter to'Renderer::BeginScene'
- Added 'RenderCommand::DefaultTargetFramebuffer()'
- Added static 'GraphicsContext::GetSharedContext()'

- Fixed 'dxBlender' by changing 'DestBlendAlpha' from D3D11_BLEND_ZERO
       to D3D11_BLEND_ONE
- Fixed 'glRenderCommand::ClearBackBuffer()' by calling glClear before
      glClearColor

- 'Application::GameLoop' now updates the ui ._.
2021-07-15 15:46:28 +04:30
Light3039
d2bd0881d1 Linux fix
- Fixed 'Instrumentor' by including 'ostream' & 'fstream'
- Fixed 'Application' by including 'Instrumentor'
- Fixed both 'RendererProgram''s 'Advance()', should have returned true
2021-07-14 02:19:52 +04:30
Light
57616d755c WindowResizeEvent | FlushScene
- 'Renderer' now receives 'WindowResizedEvent' and handle the
      'Framebuffer' and viewport stuff
- Added 'Renderer' now uses the new 'FlushScene' function to flush when
      the mapped vertex buffer is filled
- The viewport is now set by 'RenderCommand' via the 'Renderer' rather
      than the 'GraphicsConntext'

- 'Window' no longer sends 'WindowResizedEvent' to 'GraphicsContext'
- 'GraphicsContext' no longer receives 'OnWindowResize' events

- Note: Sending events should be done by the 'Application'
2021-07-14 00:17:30 +04:30
Light
a3f0693655 Blender
- Added 'Blender' (gl, dx)
2021-07-09 11:56:31 +04:30
Light
91a0c92fe7 - ConstantBuffers
- Added ConstantBuffers
- Updated GLAD to have GL_ARB_shading_language_420pack extensions
2021-07-05 14:36:36 +04:30
Light
b8ca0099cb Camera
- Added 'Camera'
- Added 'SetuniformMat4' to the 'Shader' , this is a temporary solution
- Added u_ViewProjection to glsl shaders

- Fixed 'Application's' placeholder delta time
- Fixed glfwKeyEvent returning KeyReleasedEvent on GLFW_REPEAT

- Note: Camera is not supported for DirectX for the time being due to hlsl not
       supporting uniforms like glsl
2021-07-05 01:59:18 +04:30
Light
2ab97d3863 Major Maintenance
- Major tidying
- Moved 'RendererProgram' classes out of the 'Renderer' class
- Moved 'RenderCommand' member variable out of 'GraphicsContext' and into
       the 'Renderer' class as a unique_ptr. results in 'Renderer' taking a
       windowHandle for construction
- Defined new macros for max quads in 'Renderer.h'
- Added the 'Stringifier' to 'Base.h'
- Added the 'ResourceManager' to the 'LightEngine.h'
- Application now logs the current file directory
- Fixed the forward declaration in GraphicsContext
- Fixed the debug break in Base.h
- Fixed 'dxShader' not logging compile errors
- 'glVertexLayout' now takes in a shared_ptr for 'VertexBuffer'
- 'glShader' now logs the shader compilation errors properly
- 'dxVertexLayout' now takes in a shared_ptr for 'Shader"
- Modified 'dxSharedContext' members to be private and made getters for them
- 'dxRenderCommand::SwapBuffers' now throws dxException for
       DXGI_ERROR_DEVICE_REMOD error
2021-07-01 19:25:46 +04:30
Light
7872e42c76 dxTexture
- Added dxTexture
- Added hlsl to TextureShader.h
2021-06-29 14:21:05 +04:30
Light
c9352407e1 Textures
- Added Texture and glTexture class ( no dx implementation yet )
- Added TextureRendererProgram to Renderer
- Added LoadTexture to ResourceManager
- Added TextureShader
- Added awesomeface.png
- Removed unused shader files from Sandbox/res
- Fixed gladLoadGLLoader call in glGraphicsContext
- Enabled alpha blending in glGraphicsContext
- Added stb_image library
2021-06-29 11:01:11 +04:30
Light
6149c0da70 ResourceManager
- Added ResourceManager
- Removed FileManager
- Shader's constructor now takes the shader source specific to the current GraphicsAPI
2021-06-28 14:37:48 +04:30
Light
3c2e7d6bb1 Minor fixes
- removed the test '#error' in 'Base.h'
- changed from random color per vertex to input 'tint' from argument in 'DrawQuad'
- reverted back some window creation stuff
2021-06-26 15:59:26 +04:30
Light3039
a682523076 Initial Linux Support 2021-06-26 13:09:11 +04:30
Light
6ded78531f DrawQuad tint
- Renderer::DrawQuad now uses the parameter's value rather than the hardcoded ones.
2021-06-21 18:39:19 +04:30
Light
fcfe73923d Major changes
- Major tidying
- Some fixes
-
2021-06-19 15:12:42 +04:30
Light
21e4432c60 Maintenance
- Some tidying
- Minor fixes
2021-06-15 22:17:28 +04:30
Light
bb604e9540 Major changes 2021-06-15 09:39:11 +04:30
Light
0510712d6e IndexBuffer
- IndexBuffer now creates it's own
      indices if non is provided
2021-06-14 17:02:56 +04:30
Light
a3092c476c Batch Rendering & IndexBuffers & RendererProgram 2021-06-13 19:35:48 +04:30
Light3039
2f560239cb DirectX 2021-06-02 17:20:15 +04:30
Light3039
4678a7dbf6 Stringifier + glDebugCallback 2021-05-31 23:28:29 +04:30
Light3039
752258366d FileManager 2021-05-31 19:09:27 +04:30
Light3039
f511f6d771 First Triangle! 2021-05-30 16:45:54 +04:30