Minor changes
- Minor fixes - Minor maintenance
This commit is contained in:
		
							parent
							
								
									c34f5e03f0
								
							
						
					
					
						commit
						40355ebfc2
					
				
					 9 changed files with 12 additions and 8 deletions
				
			
		| 
						 | 
					@ -17,7 +17,7 @@ namespace Light {
 | 
				
			||||||
	template<typename T>
 | 
						template<typename T>
 | 
				
			||||||
	constexpr Ref<T> MakeRef(T* rawPointer)
 | 
						constexpr Ref<T> MakeRef(T* rawPointer)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		return std::shared_ptr<T>(T);
 | 
							return std::shared_ptr<T>(rawPointer);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Scope (std::unique_ptr)
 | 
						// Scope (std::unique_ptr)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -39,7 +39,7 @@ namespace Light {
 | 
				
			||||||
	void Application::GameLoop()
 | 
						void Application::GameLoop()
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		// check
 | 
							// check
 | 
				
			||||||
		// LT_ENGINE_ASSERT(!m_LayerStack.IsEmpty(), "Application::GameLoop(pre): LayerStack is empty");
 | 
							LT_ENGINE_ASSERT(!m_LayerStack->IsEmpty(), "Application::GameLoop(pre): LayerStack is empty");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		// log debug data
 | 
							// log debug data
 | 
				
			||||||
		LogDebugData();
 | 
							LogDebugData();
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -20,7 +20,7 @@ namespace Light {
 | 
				
			||||||
		m_VertexBuffer = Ref<VertexBuffer>(VertexBuffer::Create(nullptr, sizeof(QuadVertexData), maxVertices, sharedContext));
 | 
							m_VertexBuffer = Ref<VertexBuffer>(VertexBuffer::Create(nullptr, sizeof(QuadVertexData), maxVertices, sharedContext));
 | 
				
			||||||
		m_IndexBuffer = Ref<IndexBuffer>(IndexBuffer::Create(nullptr, (maxVertices / 4) * 6, sharedContext));
 | 
							m_IndexBuffer = Ref<IndexBuffer>(IndexBuffer::Create(nullptr, (maxVertices / 4) * 6, sharedContext));
 | 
				
			||||||
		m_VertexLayout = Ref<VertexLayout>(VertexLayout::Create(m_VertexBuffer, m_Shader, { { "POSITION", VertexElementType::Float3 },
 | 
							m_VertexLayout = Ref<VertexLayout>(VertexLayout::Create(m_VertexBuffer, m_Shader, { { "POSITION", VertexElementType::Float3 },
 | 
				
			||||||
		                                                                                                { "COLOR"   , VertexElementType::Float4 }}, sharedContext));
 | 
							                                                                                    { "COLOR"   , VertexElementType::Float4 }}, sharedContext));
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	bool QuadRendererProgram::Advance()
 | 
						bool QuadRendererProgram::Advance()
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -20,7 +20,7 @@ namespace Light {
 | 
				
			||||||
		m_VertexBuffer = Ref<VertexBuffer>(VertexBuffer::Create(nullptr, sizeof(TextureVertexData), maxVertices, sharedContext));
 | 
							m_VertexBuffer = Ref<VertexBuffer>(VertexBuffer::Create(nullptr, sizeof(TextureVertexData), maxVertices, sharedContext));
 | 
				
			||||||
		m_IndexBuffer = Ref<IndexBuffer>(IndexBuffer::Create(nullptr, (maxVertices / 4) * 6, sharedContext));
 | 
							m_IndexBuffer = Ref<IndexBuffer>(IndexBuffer::Create(nullptr, (maxVertices / 4) * 6, sharedContext));
 | 
				
			||||||
		m_VertexLayout = Ref<VertexLayout>(VertexLayout::Create(m_VertexBuffer, m_Shader, { { "POSITION", VertexElementType::Float3 },
 | 
							m_VertexLayout = Ref<VertexLayout>(VertexLayout::Create(m_VertexBuffer, m_Shader, { { "POSITION", VertexElementType::Float3 },
 | 
				
			||||||
		                                                                                                { "TEXCOORD", VertexElementType::Float2 }}, sharedContext));
 | 
							                                                                                    { "TEXCOORD", VertexElementType::Float2 }}, sharedContext));
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	bool TextureRendererProgram::Advance()
 | 
						bool TextureRendererProgram::Advance()
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,7 @@
 | 
				
			||||||
#pragma once
 | 
					#pragma once
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "ltpch.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <stdint.h>
 | 
					#include <stdint.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace Light {
 | 
					namespace Light {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,7 @@
 | 
				
			||||||
#pragma once
 | 
					#pragma once
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "ltpch.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <stdint.h>
 | 
					#include <stdint.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace Light {
 | 
					namespace Light {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -24,7 +24,7 @@ namespace Light {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		// #todo: should we keep this?
 | 
							// #todo: should we keep this?
 | 
				
			||||||
		template<typename T, typename... Args>
 | 
							template<typename T, typename... Args>
 | 
				
			||||||
		static inline void AttachLayer(Args&&... args) { s_Context->AttachLayerImpl(new T((args)...)); }
 | 
							static inline void EmplaceLayer(Args&&... args) { s_Context->AttachLayerImpl(new T((args)...)); }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		static inline void AttachLayer(Layer* layer) { s_Context->AttachLayerImpl(layer); }
 | 
							static inline void AttachLayer(Layer* layer) { s_Context->AttachLayerImpl(layer); }
 | 
				
			||||||
		static inline void DetachLayer(Layer* layer) { s_Context->DetachLayerImpl(layer); }
 | 
							static inline void DetachLayer(Layer* layer) { s_Context->DetachLayerImpl(layer); }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,12 +2,12 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "Base.h"
 | 
					#include "Base.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "Scene.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <entt.hpp>
 | 
					#include <entt.hpp>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace Light {
 | 
					namespace Light {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	class Scene;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	class Entity
 | 
						class Entity
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
	private:
 | 
						private:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -22,7 +22,7 @@ namespace Light {
 | 
				
			||||||
			m_Window->SetProperties(properties);
 | 
								m_Window->SetProperties(properties);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			// Attach the sandbox layer
 | 
								// Attach the sandbox layer
 | 
				
			||||||
			LayerStack::AttachLayer<MirrorLayer>(("MirrorLayer"));
 | 
								LayerStack::EmplaceLayer<MirrorLayer>(("MirrorLayer"));
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		~Mirror()
 | 
							~Mirror()
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue