More Progress
This commit is contained in:
26
src/dawnopengl/CMakeLists.txt
Normal file
26
src/dawnopengl/CMakeLists.txt
Normal 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)
|
10
src/dawnopengl/display/CMakeLists.txt
Normal file
10
src/dawnopengl/display/CMakeLists.txt
Normal 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
|
||||
)
|
34
src/dawnopengl/display/RenderManager.cpp
Normal file
34
src/dawnopengl/display/RenderManager.cpp
Normal 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() {
|
||||
|
||||
}
|
Reference in New Issue
Block a user