Exception: No shader code found

classic Classic list List threaded Threaded
28 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Exception: No shader code found

fmorat
Sorry for all the messages but I'm no longer getting the

 java.lang. Error: java.lang.RuntimeException: com.jogamp.opengl. GLException: No shader code found (source nor binary) for src: [.. / ../shader/texture01 xxx.vp], bin: null at

I think adding the "open" keyword to the module-info.java fixed the problem. Still having other issues that seem to be mainly with my own code but at least this is not one of them anymore.

I think my original issue has been fixed. Thanks for all the help!
Reply | Threaded
Open this post in threaded view
|

Re: Exception: No shader code found

Sven Gothel
Administrator
In reply to this post by gouessej
gouessej wrote
SharderCode.class.getModule().getResourceAsStream() should work if and only if the resource file is visible in the module path. Please use --show-module-resolution to show what is visible.
Thanks Julien, perhaps we should add this detail to a bug-report where we
intend to add the module feature?

This shall just change our GlueGen runtime lib .. enabling all our 'modules' (projects)
to be used as modules?
Something for 2.6.0 I guess.
Reply | Threaded
Open this post in threaded view
|

Re: Exception: No shader code found

Sven Gothel
Administrator
In reply to this post by fmorat
please share your module info java file, thx.

You still need to hack the shader resource or does it work with GlueGen/JOGL as-is?
Please detail a wrap up / summary of the whole situation. Thank you.
Reply | Threaded
Open this post in threaded view
|

Re: Exception: No shader code found

fmorat
>>please share your module info java file, thx.

I will do this. Just need to do a bit more teesting.

>>You still need to hack the shader resource or does it work with GlueGen/JOGL as-is?

It works as is. No changes were made.

>>Please detail a wrap up / summary of the whole situation.

That is my plan.
Reply | Threaded
Open this post in threaded view
|

Re: Exception: No shader code found

Sven Gothel
Administrator
Awesome. If you like, I give you a bugzilla account and you can lead the module support
while adding this stuff in gluegen, joal, .. ?
(using a dedicated branch, which I later merge etc)

I would love that (for 2.6.0)
Reply | Threaded
Open this post in threaded view
|

Re: Exception: No shader code found

gouessej
Administrator
In reply to this post by Sven Gothel
"opens" seems to do the trick, it's a good piece of news.

Please be aware that we'll need to provide several modules. The provided example is an excellent starting point but we'll need something more modular. For example, a few projects use JOGL with NEWT and without OpenJFX.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Exception: No shader code found

fmorat
In reply to this post by Sven Gothel
>>If you like, I give you a bugzilla account and you can lead the module support
while adding this stuff in gluegen, joal, .. ?

I would like to give this a try, Yes. Definitely interested in helping out.
Reply | Threaded
Open this post in threaded view
|

Re: Exception: No shader code found

fmorat
In reply to this post by Sven Gothel
>>please share your module info java file, thx.

>>You still need to hack the shader resource or does it work with GlueGen/JOGL as-is?
>>Please detail a wrap up / summary of the whole situation. Thank you.

Hello, this a summary of the whole situation.

So originally this whole thread started because I was getting this exception:

 "the file .. / ../shader/texture01_xxx.vp cannot be found."

When trying to open my application as a MacOS .app bundle.

The solution was to inject this module-info.java file:

module-info.java

into the jar file:  jogamp-fat.jar

---------------------------------------

To add more context to the whole situation and in the hope of helping others, here is a bit more detail

I've created a Java app that uses  jogamp-fat.jar. It works great when running it from the command line.

I then proceeded to try to bundle it as a MacOS .app application.

First I needed to create a self contained java image of my application. For that I used the java jlink command.

In my case, I used the Ant link task.

Unfortunately jlink only works with .jar files that contain a module-info.java file. I created the module-info file and injected it into the jogamp-fat.jar file. No other changes were made.

After creating the Java image I place it in MyApp.app/Contents/MacOS/

The jar files go here: MyApp.app/Resources/Java/

This is my info.plist file in case it helps anybody:

Info.plist


And that is it. This is all I can think of. Any questions let me know.

 




 
12