Add fallback model
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -3,3 +3,4 @@ build
|
|||||||
.vscode
|
.vscode
|
||||||
res/models
|
res/models
|
||||||
res/textures
|
res/textures
|
||||||
|
.kdev4
|
||||||
|
|||||||
@@ -1,60 +0,0 @@
|
|||||||
[Buildset]
|
|
||||||
BuildItems=@Variant(\x00\x00\x00\t\x00\x00\x00\x00\x01\x00\x00\x00\x0b\x00\x00\x00\x00\x01\x00\x00\x00\x14\x00F\x00a\x00l\x00l\x00-\x00F\x00e\x00v\x00e\x00r)
|
|
||||||
|
|
||||||
[CMake]
|
|
||||||
Build Directory Count=1
|
|
||||||
Current Build Directory Index-Host-System=0
|
|
||||||
|
|
||||||
[CMake][CMake Build Directory 0]
|
|
||||||
Build Directory Path=/home/derek/Projekte/CXX/OpenGL/Fall-Fever/build
|
|
||||||
Build Type=DEBUG
|
|
||||||
CMake Binary=/usr/bin/cmake
|
|
||||||
CMake Executable=/usr/bin/cmake
|
|
||||||
Environment Profile=
|
|
||||||
Extra Arguments=
|
|
||||||
Install Directory=/usr/local
|
|
||||||
Runtime=Host-System
|
|
||||||
|
|
||||||
[Launch]
|
|
||||||
Launch Configurations=Launch Configuration 0,Launch Configuration 1
|
|
||||||
|
|
||||||
[Launch][Launch Configuration 0]
|
|
||||||
Configured Launch Modes=execute
|
|
||||||
Configured Launchers=nativeAppLauncher
|
|
||||||
Name=Fall-Fever
|
|
||||||
Type=Native Application
|
|
||||||
|
|
||||||
[Launch][Launch Configuration 0][Data]
|
|
||||||
Arguments=
|
|
||||||
Dependencies=@Variant(\x00\x00\x00\t\x00\x00\x00\x00\x01\x00\x00\x00\x0b\x00\x00\x00\x00\x03\x00\x00\x00\x14\x00F\x00a\x00l\x00l\x00-\x00F\x00e\x00v\x00e\x00r\x00\x00\x00\x06\x00s\x00r\x00c\x00\x00\x00\x14\x00F\x00a\x00l\x00l\x00-\x00F\x00e\x00v\x00e\x00r)
|
|
||||||
Dependency Action=Build
|
|
||||||
EnvironmentGroup=
|
|
||||||
Executable=file:///home/derek/Projekte/CXX/OpenGL/Fall-Fever
|
|
||||||
External Terminal=konsole --noclose --workdir %workdir -e %exe
|
|
||||||
Kill Before Executing Again=4194304
|
|
||||||
Project Target=Fall-Fever,src,Fall-Fever
|
|
||||||
Use External Terminal=false
|
|
||||||
Working Directory=file:///home/derek/Projekte/CXX/OpenGL/Fall-Fever
|
|
||||||
isExecutable=false
|
|
||||||
|
|
||||||
[Launch][Launch Configuration 1]
|
|
||||||
Configured Launch Modes=execute
|
|
||||||
Configured Launchers=nativeAppLauncher
|
|
||||||
Name=RenderDoc
|
|
||||||
Type=Native Application
|
|
||||||
|
|
||||||
[Launch][Launch Configuration 1][Data]
|
|
||||||
Arguments=
|
|
||||||
Dependencies=@Variant(\x00\x00\x00\t\x00\x00\x00\x00\x01\x00\x00\x00\x0b\x00\x00\x00\x00\x03\x00\x00\x00\x14\x00F\x00a\x00l\x00l\x00-\x00F\x00e\x00v\x00e\x00r\x00\x00\x00\x06\x00s\x00r\x00c\x00\x00\x00\x14\x00F\x00a\x00l\x00l\x00-\x00F\x00e\x00v\x00e\x00r)
|
|
||||||
Dependency Action=Build
|
|
||||||
EnvironmentGroup=
|
|
||||||
Executable=file:///home/derek/Projekte/CXX/OpenGL/Fall-Fever
|
|
||||||
External Terminal=/home/derek/Tools/RenderDoc/bin/renderdoccmd capture %exe
|
|
||||||
Kill Before Executing Again=4194304
|
|
||||||
Project Target=Fall-Fever,src,Fall-Fever
|
|
||||||
Use External Terminal=true
|
|
||||||
Working Directory=file:///home/derek/Projekte/CXX/OpenGL/Fall-Fever
|
|
||||||
isExecutable=false
|
|
||||||
|
|
||||||
[Project]
|
|
||||||
VersionControlSupport=kdevgit
|
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
"entities": [
|
"entities": [
|
||||||
{
|
{
|
||||||
"unique_name": "backpack",
|
"unique_name": "backpack",
|
||||||
"model": "backpack",
|
"model": "backpvack",
|
||||||
"shaderProgram": "defaultProgram",
|
"shaderProgram": "defaultProgram",
|
||||||
"position": [0.0, 1.0, 0.0],
|
"position": [0.0, 1.0, 0.0],
|
||||||
"rotation": [0.0, 0.0, 0.0],
|
"rotation": [0.0, 0.0, 0.0],
|
||||||
|
|||||||
@@ -74,8 +74,11 @@ std::vector<Entity*> JsonParser::getEntities(std::vector<Model*> &models, std::v
|
|||||||
current_model = *it;
|
current_model = *it;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!current_model)
|
if(!current_model) {
|
||||||
|
// Apply fallback model (first model in vector)
|
||||||
|
current_model = models[0];
|
||||||
std::cout << "[Warning] Model could not be found by unique name \"" << entity_model << "\"" << std::endl;
|
std::cout << "[Warning] Model could not be found by unique name \"" << entity_model << "\"" << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
const Json::Value positionJson = entitiesJson[index]["position"];
|
const Json::Value positionJson = entitiesJson[index]["position"];
|
||||||
const Json::Value rotationJson = entitiesJson[index]["rotation"];
|
const Json::Value rotationJson = entitiesJson[index]["rotation"];
|
||||||
|
|||||||
@@ -41,9 +41,6 @@ private:
|
|||||||
|
|
||||||
// Lights
|
// Lights
|
||||||
std::vector<Light*> lights;
|
std::vector<Light*> lights;
|
||||||
//DirectionalLight directionalLight;
|
|
||||||
//std::vector<PointLight> pointLights;
|
|
||||||
//SpotLight spotLight;
|
|
||||||
|
|
||||||
// Shadows
|
// Shadows
|
||||||
const int SHADOW_RES = 4096 / 4;
|
const int SHADOW_RES = 4096 / 4;
|
||||||
|
|||||||
Reference in New Issue
Block a user