Browse Source

Anonymized files.

master
PHENOM 10 months ago
parent
commit
8dae60bc16

BombermanGL.sln → OpenGL Engine.sln View File

@@ -5,11 +5,6 @@ VisualStudioVersion = 15.0.28010.2003
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Engine", "src\engine\engine.vcxproj", "{6632F6ED-8603-4896-8512-16451FD29FED}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Game", "src\game\game.vcxproj", "{7DB3076A-0879-4351-B790-29996FC2EC81}"
ProjectSection(ProjectDependencies) = postProject
{6632F6ED-8603-4896-8512-16451FD29FED} = {6632F6ED-8603-4896-8512-16451FD29FED}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86
@@ -20,10 +15,6 @@ Global
{6632F6ED-8603-4896-8512-16451FD29FED}.Debug|x86.Build.0 = Debug|Win32
{6632F6ED-8603-4896-8512-16451FD29FED}.Release|x86.ActiveCfg = Release|Win32
{6632F6ED-8603-4896-8512-16451FD29FED}.Release|x86.Build.0 = Release|Win32
{7DB3076A-0879-4351-B790-29996FC2EC81}.Debug|x86.ActiveCfg = Debug|Win32
{7DB3076A-0879-4351-B790-29996FC2EC81}.Debug|x86.Build.0 = Debug|Win32
{7DB3076A-0879-4351-B790-29996FC2EC81}.Release|x86.ActiveCfg = Release|Win32
{7DB3076A-0879-4351-B790-29996FC2EC81}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

+ 12
- 0
README.md View File

@@ -0,0 +1,12 @@
# OpenGL-Engine

A crude and small graphics-engine I've made during computer graphics courses in late 2018. Supports a variety of different Lighting types (Spotlights, Directional lights and Pointlights), dynamic recompiling of Shaders when the amount of Lightsources change, some basic primitive geometric shapes and a camera system. But sadly **this project is unfinished** in its current state.

## Dependencies

- SOIL
- ASSIMP
- GLEW
- GLFW3
- Freetype
- imgui

+ 0
- 0
doc/.gitkeep View File


BIN
models/blender/bomb.blend View File


BIN
models/blender/bomberman.blend View File


BIN
models/textures/container2.png View File


BIN
models/textures/container2_specular.png View File


BIN
models/textures/matrix.png View File


+ 0
- 11
src/game/Bomb.cpp View File

@@ -1,11 +0,0 @@
#include "Bomb.hpp"


Bomb::Bomb()
{
}


Bomb::~Bomb()
{
}

+ 0
- 10
src/game/Bomb.hpp View File

@@ -1,10 +0,0 @@
#ifndef BOMB_H
#define BOMB_H

class Bomb
{
public:
Bomb();
~Bomb();
};
#endif

BIN
src/game/BombermanGL.cpp View File


+ 0
- 11
src/game/Explosion.cpp View File

@@ -1,11 +0,0 @@
#include "Explosion.hpp"


Explosion::Explosion()
{
}


Explosion::~Explosion()
{
}

+ 0
- 9
src/game/Explosion.hpp View File

@@ -1,9 +0,0 @@
#ifndef EXPLOSION_H
#define EXPLOSION_H
class Explosion
{
public:
Explosion();
~Explosion();
};
#endif

+ 0
- 109
src/game/Game.cpp View File

@@ -1,109 +0,0 @@
#include "Game.hpp"
#include <Logger.hpp>

using namespace Engine;

Game::Game()
{
Window* win = new Window(WINDOW_WIDTH, WINDOW_HEIGHT, APPNAME);
win->setFramerateLimit(60);

Scene* scene = new Scene(win);
scene->setBackgroundColor(54, 57, 62);
win->setScene(scene);

Model* model = new Model();
model->translate(glm::vec3(-2.0f, 1.0f, -3.0f));
Model* model2 = new Model();
model2->translate(glm::vec3(2.0f, 0.0f, -3.0f));
scene->addModel(model);
scene->addModel(model2);
int texture_units = 0;
glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &texture_units);
logInfo("Tex units: %i", texture_units);

//Called every by every Windows Message update
win->addKeyCallback([&](Window* window, int key, int scancode, int action, int mods) -> void {
if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS) {
logInfo("Closing window.");
window->close();
}
if (key == GLFW_KEY_F2 && action == GLFW_PRESS) {
if (camEnabled) {
window->showCursor();
}
else {
window->hideCursor();
}
camEnabled = !camEnabled;
}
#ifdef ENGINE_DEBUG
if (key == GLFW_KEY_F1 && action == GLFW_PRESS) {
window->getScene()->recompileShaders();
}
#endif
});

//Called every single Frame
win->addRenderKeyCallback(GLFW_KEY_W, GLFW_PRESS, [&](Scene* scene, float deltaTime) -> void {
if(camEnabled) scene->getCamera()->moveForward(CAM_SPEED * deltaTime);
});
win->addRenderKeyCallback(GLFW_KEY_S, GLFW_PRESS, [&](Scene* scene, float deltaTime) -> void {
if (camEnabled) scene->getCamera()->moveForward(-CAM_SPEED * deltaTime);
});
win->addRenderKeyCallback(GLFW_KEY_A, GLFW_PRESS, [&](Scene* scene, float deltaTime) -> void {
if (camEnabled) scene->getCamera()->moveRight(-CAM_SPEED * deltaTime);
});
win->addRenderKeyCallback(GLFW_KEY_D, GLFW_PRESS, [&](Scene* scene, float deltaTime) -> void {
if (camEnabled) scene->getCamera()->moveRight(CAM_SPEED * deltaTime);
});
win->addRenderKeyCallback(GLFW_KEY_SPACE, GLFW_PRESS, [&](Scene* scene, float deltaTime) -> void {
if (camEnabled) scene->getCamera()->moveUp(CAM_SPEED * deltaTime);
});
win->addRenderKeyCallback(GLFW_KEY_LEFT_CONTROL, GLFW_PRESS, [&](Scene* scene, float deltaTime) -> void {
if (camEnabled) scene->getCamera()->moveUp(-CAM_SPEED * deltaTime);
});

win->addMouseCallback([&](Window* window, double xpos, double ypos) -> void {
if (camEnabled) {
if (firstMouse)
{
lastX = xpos;
lastY = ypos;
firstMouse = false;
}

float xoffset = xpos - lastX;
float yoffset = lastY - ypos;
lastX = xpos;
lastY = ypos;

float sensitivity = MOUSE_SENSITIVITY;
xoffset *= sensitivity;
yoffset *= sensitivity;

yaw += xoffset;
pitch += yoffset;

if (pitch > 89.99f)
pitch = 89.99f;
if (pitch < -89.99f)
pitch = -89.99f;
window->getScene()->getCamera()->setDirection(pitch, yaw);
}
});


while (win->isOpen()) {
model->rotate(sin(glfwGetTime() * 0.000002f), glm::vec3(1.0, 1.0, 0.0));
model->setPosition(glm::vec3(sin(glfwGetTime() * 0.5f) * 5.0f, cos(glfwGetTime() * 0.5f) * 5.0f, 3.0f));
model->setScale(glm::vec3((sin(glfwGetTime() * 0.5f)) + 1.0f, (cos(glfwGetTime() * 0.5f)) + 1.0f, (cos(glfwGetTime() * 0.5f)) + 1.0f));

win->update();
}
}


Game::~Game()
{
}

+ 0
- 36
src/game/Game.hpp View File

@@ -1,36 +0,0 @@
#ifndef GAME_H
#define GAME_H

#define CAM_SPEED 5.0f
#define MOUSE_SENSITIVITY 0.15f

#include <iostream>
#include <thread>

#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>

#include <Shader.hpp>
#include <Window.hpp>
#include <Scene.hpp>

#define APPNAME "BombermanGL"
#define WINDOW_WIDTH 800
#define WINDOW_HEIGHT 600


class Game
{
private:
bool camEnabled = true;
bool firstMouse = true;
float lastX = 400, lastY = 300;
float pitch, yaw = 0;
public:
Game();
~Game();
};
#endif

+ 0
- 11
src/game/Gamefield.cpp View File

@@ -1,11 +0,0 @@
#include "Gamefield.hpp"


Gamefield::Gamefield()
{
}


Gamefield::~Gamefield()
{
}

+ 0
- 10
src/game/Gamefield.hpp View File

@@ -1,10 +0,0 @@
#ifndef GAMEFIELD_H
#define GAMEFIELD_H

class Gamefield
{
public:
Gamefield();
~Gamefield();
};
#endif

+ 0
- 11
src/game/Player.cpp View File

@@ -1,11 +0,0 @@
#include "Player.hpp"


Player::Player()
{
}


Player::~Player()
{
}

+ 0
- 10
src/game/Player.hpp View File

@@ -1,10 +0,0 @@
#ifndef PLAYER_H
#define PLAYER_H

class Player
{
public:
Player();
~Player();
};
#endif

+ 0
- 197
src/game/game.vcxproj View File

@@ -1,197 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>15.0</VCProjectVersion>
<ProjectGuid>{7DB3076A-0879-4351-B790-29996FC2EC81}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>Game</RootNamespace>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
<ProjectName>Game</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<IncludePath>$(SolutionDir)include;$(SolutionDir)src\engine;$(IncludePath)</IncludePath>
<LibraryPath>$(SolutionDir)lib;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>$(SolutionDir)include;$(SolutionDir)src\engine;$(IncludePath)</IncludePath>
<LibraryPath>$(SolutionDir)lib;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>Engine_Debug.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>xcopy /y /d "$(SolutionDir)dll\*.dll" "$(OutDir)"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copying DLL's to binary path</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>Engine.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="Bomb.hpp" />
<ClInclude Include="Explosion.hpp" />
<ClInclude Include="Game.hpp" />
<ClInclude Include="Gamefield.hpp" />
<ClInclude Include="pch.h" />
<ClInclude Include="Player.hpp" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="Bomb.cpp" />
<ClCompile Include="BombermanGL.cpp" />
<ClCompile Include="Explosion.cpp" />
<ClCompile Include="game.cpp" />
<ClCompile Include="Gamefield.cpp" />
<ClCompile Include="pch.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="Player.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
<Target Name="AfterClean">
<ItemGroup>
<FilesToDelete Include="$(TargetDir)\*.dll"/>
</ItemGroup>
<Delete Files="@(FilesToDelete)" />
</Target>
</Project>

+ 0
- 60
src/game/game.vcxproj.filters View File

@@ -1,60 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Headers">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Source">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Ressources">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="pch.h">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="Bomb.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="Explosion.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="Game.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="Gamefield.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="Player.hpp">
<Filter>Headers</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="pch.cpp">
<Filter>Source</Filter>
</ClCompile>
<ClCompile Include="game.cpp">
<Filter>Source</Filter>
</ClCompile>
<ClCompile Include="Bomb.cpp">
<Filter>Source</Filter>
</ClCompile>
<ClCompile Include="BombermanGL.cpp">
<Filter>Source</Filter>
</ClCompile>
<ClCompile Include="Explosion.cpp">
<Filter>Source</Filter>
</ClCompile>
<ClCompile Include="Gamefield.cpp">
<Filter>Source</Filter>
</ClCompile>
<ClCompile Include="Player.cpp">
<Filter>Source</Filter>
</ClCompile>
</ItemGroup>
</Project>

+ 0
- 11
src/game/game.vcxproj.user View File

@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LocalDebuggerWorkingDirectory>$(OutDir)</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LocalDebuggerWorkingDirectory>$(OutDir)</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
</Project>

BIN
src/game/pch.cpp View File


BIN
src/game/pch.h View File


Loading…
Cancel
Save