Added RenderScene and RenderSet class skeletons. Also updated VS project.
parent
4d05013cdc
commit
47ca485855
2
LOGIC
2
LOGIC
|
@ -2,7 +2,7 @@ This file describes the program logic and organization. It holds a focus on data
|
|||
|
||||
,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
Program Organization
|
||||
§§§§§§§§§§§§§§§§§§§§§§§§
|
||||
````````````````````````
|
||||
To begin with, RtB is governed by a state machine, individual states, and sub-states (modal dialogs/windows). The state machine, as run by the main loop, is as follows:
|
||||
|
||||
1. Check states for destroy/clean-up flags
|
||||
|
|
|
@ -76,6 +76,10 @@ xcopy /d /y "..\..\..\..\Dev\SDL2-2.0.3\lib\x86\SDL2.dll" "$(OutDir)"</Command>
|
|||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\main.cpp" />
|
||||
<ClCompile Include="..\..\src\RenderCamera.cpp" />
|
||||
<ClCompile Include="..\..\src\RenderScene.cpp" />
|
||||
<ClCompile Include="..\..\src\RenderSet.cpp" />
|
||||
<ClCompile Include="..\..\src\RenderView.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\..\..\Dev\glew-1.11.0\bin\Release\Win32\glew32.dll">
|
||||
|
@ -87,6 +91,13 @@ xcopy /d /y "..\..\..\..\Dev\SDL2-2.0.3\lib\x86\SDL2.dll" "$(OutDir)"</Command>
|
|||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\src\GL.hpp" />
|
||||
<ClInclude Include="..\..\src\RenderCamera.hpp" />
|
||||
<ClInclude Include="..\..\src\RenderScene.hpp" />
|
||||
<ClInclude Include="..\..\src\RenderSet.hpp" />
|
||||
<ClInclude Include="..\..\src\RenderView.hpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
|
|
|
@ -16,11 +16,26 @@
|
|||
<Filter Include="Build Copy">
|
||||
<UniqueIdentifier>{cf99fdc6-e0b4-4ff6-a517-63c2e5392c31}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Classes">
|
||||
<UniqueIdentifier>{e0e1a725-2ac7-4b9b-bc04-51850b74c96c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\main.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\RenderCamera.cpp">
|
||||
<Filter>Classes</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\RenderView.cpp">
|
||||
<Filter>Classes</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\RenderScene.cpp">
|
||||
<Filter>Classes</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\RenderSet.cpp">
|
||||
<Filter>Classes</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\..\..\Dev\SDL2-2.0.3\lib\x86\SDL2.dll">
|
||||
|
@ -30,4 +45,21 @@
|
|||
<Filter>Build Copy</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\src\RenderCamera.hpp">
|
||||
<Filter>Classes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\RenderView.hpp">
|
||||
<Filter>Classes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\GL.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\RenderScene.hpp">
|
||||
<Filter>Classes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\RenderSet.hpp">
|
||||
<Filter>Classes</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -9,4 +9,4 @@ This file provides common includes to access OpenGL types and functions
|
|||
#include "SDL_opengles.h"
|
||||
#else
|
||||
#include "SDL_opengl.h"
|
||||
#endif
|
||||
#endif
|
|
@ -0,0 +1,11 @@
|
|||
/* ================================================================
|
||||
RenderScene
|
||||
----------------
|
||||
This header file defines the RenderScene class.
|
||||
================================================================ */
|
||||
#include "RenderScene.hpp"
|
||||
/* ======== Constructors and Destructors ======== */
|
||||
RenderScene::RenderScene() {
|
||||
}
|
||||
RenderScene::~RenderScene() {
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
/* ================================================================
|
||||
RenderScene
|
||||
----------------
|
||||
This header file describes the RenderScene class.
|
||||
|
||||
A RenderScene is the class that contains the rendering objects for a
|
||||
3D scene. Additionally, it contains a vector of RenderCamera classes,
|
||||
each of which correspond to a different scene perspective.
|
||||
================================================================ */
|
||||
#ifndef RENDERSCENE_HPP
|
||||
#define RENDERSCENE_HPP
|
||||
#include "GL.hpp"
|
||||
#include "RenderCamera.hpp"
|
||||
#include <vector>
|
||||
class RenderScene {
|
||||
public:
|
||||
RenderScene();
|
||||
~RenderScene();
|
||||
private:
|
||||
std::vector<RenderCamera> cameras; // Our scene's cameras
|
||||
//std::vector<RenderSet> render_sets; // Our scene's render sets
|
||||
};
|
||||
#endif
|
|
@ -0,0 +1,11 @@
|
|||
/* ================================================================
|
||||
RenderSet
|
||||
----------------
|
||||
This header file defines the RenderSet class.
|
||||
================================================================ */
|
||||
#include "RenderSet.hpp"
|
||||
/* ======== Constructors and Destructors ======== */
|
||||
RenderSet::RenderSet() {
|
||||
}
|
||||
RenderSet::~RenderSet() {
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
/* ================================================================
|
||||
RenderSet
|
||||
----------------
|
||||
This header file describes the RenderSet class.
|
||||
|
||||
A RenderSet is a container class for similar RenderObject instances.
|
||||
It provides all contained RenderObjects with a shared shader program for
|
||||
their rendering. RenderSets are contained in a RenderScene and define different
|
||||
rendering layers of the program.
|
||||
================================================================ */
|
||||
#ifndef RENDERSET_HPP
|
||||
#define RENDERSET_HPP
|
||||
#include "GL.hpp"
|
||||
#include <vector>
|
||||
class RenderSet {
|
||||
public:
|
||||
RenderSet();
|
||||
~RenderSet();
|
||||
private:
|
||||
int mode; // bitflag, 0 = normal, 1 = hide
|
||||
//std::vector<RenderObject> objects; // Our vector of objects to render
|
||||
GLuint program; // Our rendering program
|
||||
};
|
||||
#endif
|
Loading…
Reference in New Issue