add more loop debug logs
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
This commit is contained in:
parent
d558e60fd7
commit
bca1789457
@ -80,6 +80,7 @@ public class AssetManager {
|
||||
*/
|
||||
public void loadAssetsInQueue(){
|
||||
//models
|
||||
LoggerInterface.loggerEngine.DEBUG_LOOP("AssetManager - Load models");
|
||||
for(String currentPath : modelsInQueue){
|
||||
modelsInQueue.remove(currentPath);
|
||||
AIScene aiScene = ModelLoader.loadAIScene(currentPath);
|
||||
@ -102,11 +103,13 @@ public class AssetManager {
|
||||
}
|
||||
}
|
||||
//textures from disk to gpu
|
||||
LoggerInterface.loggerEngine.DEBUG_LOOP("AssetManager - Load textures");
|
||||
for(String currentPath : texturesInQueue){
|
||||
texturesInQueue.remove(currentPath);
|
||||
texturesLoadedIntoMemory.put(currentPath, new Texture(Globals.renderingEngine.getOpenGLState(), currentPath));
|
||||
}
|
||||
//audio from disk
|
||||
LoggerInterface.loggerEngine.DEBUG_LOOP("AssetManager - Load audio");
|
||||
if(Globals.audioEngine != null && Globals.audioEngine.initialized()){
|
||||
for(String currentPath : audioInQueue){
|
||||
audioInQueue.remove(currentPath);
|
||||
@ -114,6 +117,7 @@ public class AssetManager {
|
||||
}
|
||||
}
|
||||
//shaders
|
||||
LoggerInterface.loggerEngine.DEBUG_LOOP("AssetManager - Load shaders");
|
||||
for(ActorShaderMask currentShader : shadersInQueue){
|
||||
shadersInQueue.remove(currentShader);
|
||||
String key = getShaderKey(currentShader.getVertexShaderPath(),currentShader.getGeometryShaderPath(),currentShader.getFragmentShaderPath());
|
||||
@ -130,23 +134,31 @@ public class AssetManager {
|
||||
}
|
||||
}
|
||||
//pose models
|
||||
LoggerInterface.loggerEngine.DEBUG_LOOP("AssetManager - Load pose models");
|
||||
for(String currentPath: poseModelsInQueue){
|
||||
poseModelsInQueue.remove(currentPath);
|
||||
AIScene scene = ModelLoader.loadAIScene(currentPath);
|
||||
poseModelsLoadedIntoMemory.put(currentPath, new PoseModel(currentPath, scene));
|
||||
}
|
||||
//queued assets
|
||||
LoggerInterface.loggerEngine.DEBUG_LOOP("AssetManager - Load queued assets");
|
||||
queuedAssetLock.acquireUninterruptibly();
|
||||
for(QueuedAsset queuedAsset : queuedAssets){
|
||||
queuedAsset.load();
|
||||
}
|
||||
queuedAssets.clear();
|
||||
queuedAssetLock.release();
|
||||
|
||||
//allocate homogenous buffers
|
||||
LoggerInterface.loggerEngine.DEBUG_LOOP("AssetManager - Allocate homogenous buffers");
|
||||
allocateHomogenousBuffers();
|
||||
|
||||
//allocate instance array buffers
|
||||
LoggerInterface.loggerEngine.DEBUG_LOOP("AssetManager - Allocate instance array buffers");
|
||||
allocateInstanceArrayBuffers();
|
||||
|
||||
//override meshes
|
||||
LoggerInterface.loggerEngine.DEBUG_LOOP("AssetManager - Override meshes");
|
||||
performMeshOverrides();
|
||||
}
|
||||
|
||||
|
||||
@ -25,8 +25,6 @@ public class ModelLoader {
|
||||
*/
|
||||
public static AIScene loadAIScene(String path){
|
||||
AIScene rVal;
|
||||
// File file = new File(Thread.currentThread().getContextClassLoader().getResource(fileName).getFile());
|
||||
// Main.class.getResourceAsStream(fileName).readAllBytes();
|
||||
File toRead = FileUtils.getAssetFile(path);
|
||||
rVal = aiImportFile(toRead.getAbsolutePath(),
|
||||
aiProcess_GenSmoothNormals |
|
||||
@ -47,6 +45,7 @@ public class ModelLoader {
|
||||
if(scene != null){
|
||||
rVal = Model.createModelFromAiscene(path, scene);
|
||||
attemptAddTexturesFromPathname(path, localTextureMap, rVal);
|
||||
LoggerInterface.loggerRenderer.DEBUG("Finished loading model " + path);
|
||||
}
|
||||
return rVal;
|
||||
}
|
||||
@ -110,7 +109,6 @@ public class ModelLoader {
|
||||
LoggerInterface.loggerRenderer.DEBUG(mesh.getMeshName() + "->" + diffusePath);
|
||||
if(diffusePath != null){
|
||||
LoggerInterface.loggerRenderer.DEBUG(diffusePath);
|
||||
// Texture diffuse = new Texture(diffuse_path);
|
||||
Globals.assetManager.addTexturePathtoQueue(diffusePath);
|
||||
finalMat.set_diffuse(diffusePath);
|
||||
LoggerInterface.loggerRenderer.DEBUG(diffusePath);
|
||||
@ -121,7 +119,6 @@ public class ModelLoader {
|
||||
//set specular
|
||||
String specularPath = meshTextureData.getSpecular();
|
||||
if(specularPath != null){
|
||||
// Texture specular = new Texture(specular_path);
|
||||
Globals.assetManager.addTexturePathtoQueue(specularPath);
|
||||
finalMat.set_specular(specularPath);
|
||||
LoggerInterface.loggerRenderer.DEBUG(specularPath);
|
||||
|
||||
@ -7,7 +7,6 @@ import static org.lwjgl.opengl.GL20.GL_LINK_STATUS;
|
||||
import static org.lwjgl.opengl.GL20.GL_VERTEX_SHADER;
|
||||
import static org.lwjgl.opengl.GL20.glAttachShader;
|
||||
import static org.lwjgl.opengl.GL20.glCompileShader;
|
||||
import static org.lwjgl.opengl.GL20.glCreateProgram;
|
||||
import static org.lwjgl.opengl.GL20.glCreateShader;
|
||||
import static org.lwjgl.opengl.GL20.glDeleteShader;
|
||||
import static org.lwjgl.opengl.GL20.glGetProgramInfoLog;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user