More Progress

This commit is contained in:
2022-10-18 15:23:50 -07:00
parent 0ec2809d88
commit 6f10535962
45 changed files with 7994 additions and 0 deletions

View File

@ -0,0 +1,26 @@
# Copyright (c) 2022 Dominic Masters
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
# Libraries
find_package(OpenGL REQUIRED)
target_include_directories(${DAWN_TARGET_NAME}
PUBLIC
${OPENGL_INCLUDE_DIR}
)
target_link_libraries(${DAWN_TARGET_NAME}
PUBLIC
${OPENGL_LIBRARIES}
)
# Includes
target_include_directories(${DAWN_TARGET_NAME}
PUBLIC
${CMAKE_CURRENT_LIST_DIR}
)
# Subdirs
add_subdirectory(display)

View File

@ -0,0 +1,10 @@
# Copyright (c) 2022 Dominic Masters
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
# Sources
target_sources(${DAWN_TARGET_NAME}
PRIVATE
RenderManager.cpp
)

View File

@ -0,0 +1,34 @@
// Copyright (c) 2022 Dominic Masters
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
#include "dawnopengl.hpp"
#include "game/DawnGame.hpp"
#include "display/RenderManager.hpp"
using namespace Dawn;
RenderManager::RenderManager(std::weak_ptr<DawnGame> game) {
this->game = game;
}
void RenderManager::init() {
glClearColor(
0.39215686274f,
0.58431372549f,
0.9294117647f,
1.0f
);
glViewport(0, 0, 500, 500);
}
void RenderManager::update() {
printf("Rendering\n");
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
}
RenderManager::~RenderManager() {
}