Some refactoring in multithreading.

This commit is contained in:
2021-07-08 17:42:26 +02:00
parent 979ae4686f
commit be4e63046a
42 changed files with 598 additions and 285 deletions

View File

@@ -1,14 +1,30 @@
{
"directionalLight": {
"intensity": 0.5,
"direction": [-0.2, -1.0, -0.3],
"color": [1.0, 1.0, 1.0]
"intensity": 0.25,
"direction": [
-0.2,
-1.0,
-0.3
],
"color": [
1.0,
1.0,
1.0
]
},
"pointLights": [
{
"intensity": 7.5,
"position": [0.0, 1.0, 0.0],
"color": [1.0, 1.0, 1.0]
"position": [
0.0,
1.0,
0.0
],
"color": [
1.0,
1.0,
1.0
]
}
]
}
}

View File

@@ -26,16 +26,32 @@
"unique_name": "backpack",
"model": "backpack",
"shaderProgram": "defaultProgram",
"position": [0.0, 1.0, 0.0],
"rotation": [0.0, 0.0, 0.0],
"position": [
0.0,
1.0,
0.0
],
"rotation": [
0.0,
0.0,
0.0
],
"scale": 0.6
},
{
"unique_name": "container",
"model": "container",
"shaderProgram": "defaultProgram",
"position": [10.0, 1.0, 0.0],
"rotation": [45.0, 45.0, 45.0]
"position": [
10.0,
1.0,
0.0
],
"rotation": [
45.0,
45.0,
45.0
]
},
{
"unique_name": "ground",
@@ -48,7 +64,7 @@
"shaderProgram": "lightProgram"
}
],
"textures" : [
"textures": [
{
"unique_name": "fallback_normal",
"path": "data/res/models/tex/fallback_normal.png"
@@ -57,4 +73,4 @@
"skybox": {
"texturePath": "data/res/textures/skybox/"
}
}
}

View File

@@ -2,32 +2,56 @@
"loadingScreen": [
{
"unique_name": "background",
"position": [0.0, 0.0],
"dimensions": [1.0, 1.0],
"position": [
0.0,
0.0
],
"dimensions": [
1.0,
1.0
],
"texture": "data/res/textures/loading.png"
}
],
"mainMenuScreen": [
{
"unique_name": "play",
"position": [0.4, 0.5],
"dimensions": [0.25, 0.1],
"position": [
0.4,
0.5
],
"dimensions": [
0.25,
0.1
],
"texture": "data/res/textures/play.png",
"callbackId": 1
},
{
"unique_name": "exit",
"position": [0.4, 0.2],
"dimensions": [0.25, 0.10],
"position": [
0.4,
0.2
],
"dimensions": [
0.25,
0.10
],
"texture": "data/res/textures/exit.png",
"callbackId": 2
},
{
"unique_name": "background",
"position": [0.0, 0.0],
"dimensions": [1.0, 1.0],
"position": [
0.0,
0.0
],
"dimensions": [
1.0,
1.0
],
"texture": "data/res/textures/mainMenu.png",
"callbackId": 0
}
]
}
}

View File

@@ -37,4 +37,4 @@
"geometryPath": "data/shaders/pointShadowDepth.geom"
}
]
}
}

View File

@@ -4,7 +4,8 @@ layout(location = 0) out vec4 f_color;
in vec2 v_texCoord;
struct Material {
struct Material
{
sampler2D texture_diffuse0;
};
uniform Material u_material;