-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mesh_viewer error #316
Comments
Looks like a problem with compiling the GLSL shaders.
iirc, WSL on windows 10 uses software rendering for opengl.
I notice it says opengl 3.0... and maybe it doesn't like the "varying"
keyword, and maybe wants to use the newer "in" and "out" keywords? I had
converted to opengl 3.0 awhile back, but reverted back to an older version
of glsl because some older machines don't support it 3.0. Opengl 3.0 is
*supposed* to support "varying", but maybe on WSL with the software opengl
it doesn't work? Just a guess.
If I'm right, and you want to convert all the shaders to opengl 3.0 style
"in" and "out" instead of "varying", you could try applying this patch in
reverse:
https://github.com/smcameron/space-nerds-in-space/commit/774ebd19511c4820016a795e854de9c17cd4749b.patch
That is, save that file to a text file, then apply it with: patch -p1
--reverse < patchfile.txt
But I don't know if that will help.
Also, since it's using a software renderer and presumably you're burning up
all your CPUs with gaseous-giganticus at the same time, it might not
perform very well.
…-- steve
On Thu, Dec 9, 2021 at 3:40 PM Jordan Thompson ***@***.***> wrote:
I wanted to do the live viewing thing so I followed the extended
directions on the KSP forum for Windows 10, but I get this error when I run
the mesh_viewer
Initialized GLEW
OpenGL 3.0 available
Vertex shader compile error in files:
0: "string_vertex_header"
1: "single-color-lit-per-vertex.vert"
GLSL Error:
varying vec3 v_Color;
Then it proceeds to spit out tons of codes and other errors.
Am I missing a dependency or is it something else?
Full command log:
console.log
<https://github.com/smcameron/space-nerds-in-space/files/7688304/console.log>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#316>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAF22FA77INDGZCID3KJ63UQEH2HANCNFSM5JXNNVDQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
On the other hand, looking at that console log, either there's a bug in my GLSL shader compiling error handling, or, WSL opengl is giving me back garbage in the error information, hard to tell which. OTOH, on my (native linux) system, if I intentionally introduce an error into a shader, e.g.:
That 'xxx' is not supposed to be there, then when I try to run mesh_viewer, I get this:
That is, it reports that there's an error in the shader and puts an arrow pointing to the (non-comment) word immediately following the 'xxx', which seems more or less correct, and it gives me a sensible error message. So I'm sort of inclined to think the WSL opengl software implementation is not all that complete or robust and it's giving me back garbage for the compile error information. Or, it may be that it's giving me back sensible error messages, but they don't start with the line numbers, which I'm depending on. Perhaps I assumed too much about the format of the errors that come out of the GLSL compiler code. i.e., this code, in shader.c:
|
I think I'll set GG to 10 threads, that should give me 2 to hopefully run the mesh viewer decently enough (that's what I end up doing when I render in Terragen, set to 10 cores so I can browse the net or watch youtube/netflix). I think I remember something about a compilation error regarding opengl, and then I reinstalled the offending dependency and ran the compilation again. Perhaps I unknowingly introduced a error. Now that all the dependencies should be ready to go I'm going to try a fresh make. |
No I seem to be getting the same or similar issue, though I did catch some infromation from the fresh compilation I don't think I caught before.
from a function the compiler can't find. |
Nah, all that stuff is unrelated. feenableexcept() is related to debugging floating point NaNs and the '-t' option of snis_client for debugging floating point issues. The shaders for SNIS are in share/snis/shader, and they are "compiled" at runtime by the OpenGl library to run on the GPU. They're not compiled when the C code is compiled. The problem is, SNIS is asking OpenGl to compile the shaders, and OpenGl is saying, "I don't like these shaders." but not really saying why it doesn't like them in a way that SNIS understands, or SNIS is being overly particular about the format of the messages. Could be that the error messages coming back from the WSL software implementation of OpenGL doesn't match what is produced by OpenGl on all the linux systems I've tried, but it's kind of hard to tell. In any case, there's something about the shaders that it doesn't like. Since it claimed OpenGl 3.0, and the shaders are all written for OpenGl 2.1 (see this and the opengl version number decoder ring) that made me suspect that maybe it didn't like "varying", because when I changed the shaders to use "in" and "out" instead of "varying", I also had to change the opengl version to 3.0, because those keywords don't exist in opengl 2.1, hence why I pointed you to that patch. I had thought that OpenGl 3.0 should be able to compile 2.1 shaders, but maybe not, or maybe not in the case of the software based OpenGl on windows 10 WSL, I just don't really know. The other thing I'll mention is I believe you have to run an X server in WSL as well, see for example: microsoft/WSL#2855 Maybe you already knew that, but you didn't mention it so I thought I should mention it. |
Alright. I'll have to try that patch out and see. And yeah I have the X Server thingy installed and tested the "xeyes" which worked fine, and it does open the mesh viewer window, but of course it just crashes and closes. |
I wanted to do the live viewing thing so I followed the extended directions on the KSP forum for Windows 10, but I get this error when I run the mesh_viewer
Then it proceeds to spit out tons of code, and other errors.
Am I missing a dependency or is it something else?
Full command log:
console.log
The text was updated successfully, but these errors were encountered: