So, I developed an engine a while back following ThinMatrix's tutorials and it worked perfectly. However, upon trying to create my own simple lightweight game engine from scratch, I hit a snag. I created an engine that only wants to render my specified background color, and nothing else. I first tried to render just one cube, and when that failed I figured that i probably just had the incorrect coordinates set, so I went and generated a hundred random cubes... Nothing. Not even a framerate drop. So I figure that they aren't being passed through the shaders, however the shaders are functioning as I'm getting no errors (to my knowledge, I can't be sure). The engine itself is going to be open source and free anyways, so I don't mind posting the source here. Coded in Java, using OpenGL (from LWJGL), and in Eclipse (Neon) format. Warning: When first running the engine, it will spit out an error saying it couldn't find a config file, this will then generate a new folder in your %appdata% directory labeled 'Fusion Engine' with a Core.cfg file. This file can be opened in any old text editor, so if you aren't comfortable with that just change it in the source at: "src/utility/ConfigManager.java" before running. Just ask if you need more info, please I've been trying to fix this for a month now.
Need help - Objects not rendering in custom engine.
use a graphics debugger, like nvidia nsight or visual studios graphics debugger (if your using directx). make sure your draw calls are being made, and the pipeline state is what you expect, and all your data has been pushed up and is available
I just realized you said you were using java and opengl, i missed that, so you won't be using the vs graphics debugger, but there is still nvidia nsight and renderdoc
14 hours ago, iedoc said:use a graphics debugger, like nvidia nsight or visual studios graphics debugger (if your using directx). make sure your draw calls are being made, and the pipeline state is what you expect, and all your data has been pushed up and is available
I just realized you said you were using java and opengl, i missed that, so you won't be using the vs graphics debugger, but there is still nvidia nsight and renderdoc
I'll definitely try that, as I hadn't thought to check for something like that before.
(EDIT): Neither one shed light onto my issue sadly. Still trying RenderDoc though, as it still seems promising.
What were your findings using a graphics debugger? did you see your draw calls being executed? was the pipeline state exactly what you expected it to be? did your geometry get uploaded to the gpu and used for your draw calls? were your object/view/projection matrices what you set them to? did you get output from your vertex and fragment shaders? did you try stepping through the vertex and pixel shaders? (not sure if that last one is always possible depending on the graphics debugger your using)
Normally, at a high level, you should be able to see the output from each of the shaders. this will at least give you an idea of where the problem might be. for example, you see that your geometry was sent out of the vertex shader, but your pixel shader had no output. so you know it was somehting after your vertex shader. or maybe your vertex shader didn't send out your model, so you know it could either be wrong matrices, or your geometry was never uploaded, or it was never bound to be used
On 7/12/2018 at 6:00 AM, iedoc said:What were your findings using a graphics debugger? did you see your draw calls being executed? was the pipeline state exactly what you expected it to be? did your geometry get uploaded to the gpu and used for your draw calls? were your object/view/projection matrices what you set them to? did you get output from your vertex and fragment shaders? did you try stepping through the vertex and pixel shaders? (not sure if that last one is always possible depending on the graphics debugger your using)
Normally, at a high level, you should be able to see the output from each of the shaders. this will at least give you an idea of where the problem might be. for example, you see that your geometry was sent out of the vertex shader, but your pixel shader had no output. so you know it was somehting after your vertex shader. or maybe your vertex shader didn't send out your model, so you know it could either be wrong matrices, or your geometry was never uploaded, or it was never bound to be used
I had actually run into an issue using any debugger. My JVM was closing my Engine whenever it found a hook in OpenGL. The issue was that the JVM is spitting out Access Restriction Errors, so I'm looking for other alternatives. As GLSL is a C style language, I'm trying to figure out if I can force it to print to the console whenever it does something, so I can find out where any errors are, or at least where the pipeline gets 'clogged' so to speak.