Hello Guest

Shader issue

  • 4 Replies
  • 4337 Views
*

ApexModder

Shader issue
« on: July 05, 2018, 10:07:48 »
Hi, Im fairly new to game development although I have been developing with Java for years now, looking to get into game development and creating a simple game using LWJGL. Although I seem to be having this weird issue when rendering a simple triangle to my screen. The triangle renders fine until I wrap it inside of a Shader bind / unbind which then my screen is just pure red (due to the glClearColor call) and no triangle like the shader is by passing my VAO and VBO renders. Anyone any idea why this might be happening?

If it helps my source code is on GitHub

preview
« Last Edit: July 05, 2018, 10:24:59 by ApexModder »

*

Offline KaiHH

  • ****
  • 334
Re: Shader issue
« Reply #1 on: July 05, 2018, 10:37:39 »
I tried to checkout the "initial" branch (which you referenced in your Renderer.java link), but that fails due to incorrect loading of the shader text (you only load the first line of the shader file).
Then I tried the "master" branch, but there you don't do anything in the Renderer class.
So the question is: Is there any version in any branch or commit that reproduces your problem?

My advice however is: Use LWJGLX/debug by downloading it from https://lwjgl.org/customize (select any release version and check only "LWJGLX/debug" under "Addons"). This will give you a zip file containing lwjglx-debug-1.0.0.jar.
Then you need to run your application with the JVM argument "-javaagent:<dir>/lwjglx-debug-1.0.0.jar", where <dir> is the directory you extracted the lwjglx-debug-1.0.0.jar into.

*

ApexModder

Re: Shader issue
« Reply #2 on: July 05, 2018, 10:41:52 »
I tried to checkout the "initial" branch (which you referenced in your Renderer.java link), but that fails due to incorrect loading of the shader text (you only load the first line of the shader file).
Then I tried the "master" branch, but there you don't do anything in the Renderer class.
So the question is: Is there any version in any branch or commit that reproduces your problem?

My advice however is: Use LWJGLX/debug by downloading it from https://lwjgl.org/customize (select any release version and check only "LWJGLX/debug" under "Addons"). This will give you a zip file containing lwjglx-debug-1.0.0.jar.
Then you need to run your application with the JVM argument "-javaagent:<dir>/lwjglx-debug-1.0.0.jar", where <dir> is the directory you extracted the lwjglx-debug-1.0.0.jar into.

ahh lol its always the small issues that get you, reading 1 line rather than the whole damn file xD thanks for pointing that out lol


*

Offline KaiHH

  • ****
  • 334

*

ApexModder

Re: Shader issue
« Reply #4 on: July 05, 2018, 11:01:29 »