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
This commit is contained in:
parent
a682523076
commit
3c2e7d6bb1
5 changed files with 9 additions and 13 deletions
2
Dependencies/GLFW
vendored
2
Dependencies/GLFW
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 59a32baf70eadf12bfc22234c3bb1c5c28931a2c
|
||||
Subproject commit 23f99263cdb8db054db5202f605e5730aec4e3c3
|
2
Dependencies/imgui
vendored
2
Dependencies/imgui
vendored
|
@ -1 +1 @@
|
|||
Subproject commit b238424f840544f64b0597f86c59b8810ca2b933
|
||||
Subproject commit e401b8f2c0e89ddd783245a88549f5c5e23a2c21
|
|
@ -13,7 +13,6 @@
|
|||
#define LT_MAC(x) // Mac
|
||||
|
||||
#if defined(LIGHT_PLATFORM_WINDOWS)
|
||||
#error "test"
|
||||
#define LT_BUILD_PLATFORM "Windows"
|
||||
#define LT_WIN(x) x
|
||||
#elif defined(LIGHT_PLATFORM_LINUX)
|
||||
|
|
|
@ -51,27 +51,25 @@ namespace Light {
|
|||
|
||||
// TOP_LEFT
|
||||
m_QuadRenderer.mapCurrent[0].position = { xMin, yMin, position.z };
|
||||
m_QuadRenderer.mapCurrent[0].tint = glm::vec4((float)(rand() % 100) / 100.0f, (float)(rand() % 100) / 100.0f, (float)(rand() % 100) / 100.0f, 1.0f);
|
||||
|
||||
m_QuadRenderer.mapCurrent[0].tint = tint;
|
||||
|
||||
// TOP_RIGHT
|
||||
m_QuadRenderer.mapCurrent[1].position = { xMax, yMin, position.z };
|
||||
m_QuadRenderer.mapCurrent[1].tint = glm::vec4((float)(rand() % 100) / 100.0f, (float)(rand() % 100) / 100.0f, (float)(rand() % 100) / 100.0f, 1.0f);
|
||||
m_QuadRenderer.mapCurrent[1].tint = tint;
|
||||
|
||||
// BOTTOM_RIGHT
|
||||
m_QuadRenderer.mapCurrent[2].position = { xMax, yMax, position.z };
|
||||
m_QuadRenderer.mapCurrent[2].tint = glm::vec4((float)(rand() % 100) / 100.0f, (float)(rand() % 100) / 100.0f, (float)(rand() % 100) / 100.0f, 1.0f);
|
||||
m_QuadRenderer.mapCurrent[2].tint = tint;
|
||||
|
||||
// BOTTOM_LEFT
|
||||
m_QuadRenderer.mapCurrent[3].position = { xMin, yMax, position.z };
|
||||
m_QuadRenderer.mapCurrent[3].tint = glm::vec4((float)(rand() % 100) / 100.0f, (float)(rand() % 100) / 100.0f, (float)(rand() % 100) / 100.0f, 1.0f);
|
||||
m_QuadRenderer.mapCurrent[3].tint = tint;
|
||||
|
||||
// advance
|
||||
m_QuadRenderer.mapCurrent += 4;
|
||||
m_QuadRenderer.quadCount++;
|
||||
}
|
||||
|
||||
|
||||
void Renderer::BeginScene()
|
||||
{
|
||||
m_QuadRenderer.Map();
|
||||
|
|
|
@ -24,13 +24,12 @@ namespace Light {
|
|||
LT_ENGINE_ASSERT(glfwInit(), "wWindow::wWindow: failed to initialize glfw");
|
||||
|
||||
// create window
|
||||
|
||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
|
||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 5);
|
||||
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
|
||||
glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE);
|
||||
|
||||
m_Handle = glfwCreateWindow(800u, 600u, "", nullptr, nullptr);
|
||||
|
||||
m_Handle = glfwCreateWindow(1u, 1u, "", nullptr, nullptr);
|
||||
LT_ENGINE_ASSERT(m_Handle, "wWindow::wWindow: glfwCreateWindow: failed to create glfw window");
|
||||
|
||||
// manage events
|
||||
|
@ -38,7 +37,7 @@ namespace Light {
|
|||
BindGlfwEvents();
|
||||
|
||||
// create graphics context
|
||||
m_GraphicsContext = std::unique_ptr<GraphicsContext>(GraphicsContext::Create(GraphicsAPI::OpenGL, m_Handle));
|
||||
m_GraphicsContext = std::unique_ptr<GraphicsContext>(GraphicsContext::Create(GraphicsAPI::DirectX, m_Handle));
|
||||
LT_ENGINE_ASSERT(m_GraphicsContext, "wWindow::wWindow: failed to create graphics context");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue