inferno!
This commit is contained in:
@@ -8,6 +8,8 @@ set(CMAKE_BUILD_TYPE Debug)
|
||||
set(executable output)
|
||||
set(SrcDIR ./src)
|
||||
set(TestDIR ./test)
|
||||
set(CurrentTest main.cpp)
|
||||
|
||||
set(IncludeDIR ./include)
|
||||
|
||||
if (UNIX)
|
||||
@@ -54,7 +56,11 @@ include_directories(${executable}
|
||||
|
||||
file(GLOB SourceFiles
|
||||
${SrcDIR}/*
|
||||
${SrcDIR}/util/*
|
||||
${SrcDIR}/core/*
|
||||
${SrcDIR}/display/*
|
||||
${SrcDIR}/primatives/*
|
||||
${SrcDIR}/util/*
|
||||
${TestDIR}/${CurrentTest}
|
||||
)
|
||||
|
||||
add_executable(${executable} ${SourceFiles})
|
||||
|
||||
0
src/display/display.cpp
Normal file
0
src/display/display.cpp
Normal file
0
src/display/display.hpp
Normal file
0
src/display/display.hpp
Normal file
0
src/inferno.cpp
Normal file
0
src/inferno.cpp
Normal file
@@ -1,8 +1,41 @@
|
||||
#ifndef INFERNO_INFERNO_H_
|
||||
#define INFERNO_INFERNO_H_
|
||||
|
||||
class Inferno {
|
||||
|
||||
#include <string>
|
||||
|
||||
class Display;
|
||||
|
||||
enum OperationMode {
|
||||
MODE_PROGRESSIVE_GUI,
|
||||
MODE_PROGRESSIVE_IMG,
|
||||
MODE_SAMPLES_IMG
|
||||
};
|
||||
|
||||
// General idea is that the rendering stays the same (Other than progressive / sampling)
|
||||
// and the renderer passes a full framebuffer (different depending on mode) to either the
|
||||
// display or an image generator, undecided how this will work but it will make for some
|
||||
// interesting features, ImGui can be used for settings inside the progressive mode gui
|
||||
|
||||
class InfernoEngine {
|
||||
public:
|
||||
|
||||
void SetMode(OperationMode mode);
|
||||
|
||||
// Initializes the SDL framebuffer with OpenGL
|
||||
bool InitWindow();
|
||||
|
||||
// Queries the modules, if one of them errored it finds their error string
|
||||
// and returns it to the main execution code
|
||||
std::string LastError();
|
||||
|
||||
private:
|
||||
|
||||
OperationMode m_mode = MODE_PROGRESSIVE_GUI;
|
||||
|
||||
// Gotta be a pointer so that if the display
|
||||
// mode is not selected then it is nothing
|
||||
Display* m_display = nullptr;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
#include <iostream>
|
||||
#include "../src/inferno.hppd"
|
||||
#include "../src/inferno.hpp"
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
InfernoEngine inferno;
|
||||
|
||||
inferno.SetMode(MODE_PROGRESSIVE_GUI);
|
||||
bool status = inferno.InitWindow();
|
||||
if (!status {
|
||||
std::cout << "Error initializing window: " << inferno.LastError() << std::endl;
|
||||
}
|
||||
|
||||
Inferno inferno;
|
||||
|
||||
std::cout << "lol" << std::endl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user