Error in SunVtx Shader compile - For both Demo and Standalone projects
clxyder opened this issue · 2 comments
Setup
42
off of commit71249ff
- WSL2 Ubuntu 20.04 (without the new
wsl --update
feature) - VcXsrv 1.20.14.0 (Xming 6.9.31 did not originally want to work for me)
Problem Description
Hi there thanks again for making this great resource. I am trying to follow along the OpenSatKit's SimSat project that uses 42
.
I kept running into a few issues, so I figured I would clone 42
directly and run the demo.
After building the project, whenever I run the Demo
I can see the Cam
, Map
, Unit Sphere Viewer
and the Orrey
windows.
But, I don't think they are rendering correctly because I also see the following output in my terminal.
Reached CmdScript EOF at Time = 0.000000
Initializing GLUT
Initializing Cam Window
Loading Cam Shaders
Error in SunVtx Shader compile
Error in SunFrag Shader compile
Error in WorldVtx Shader compile
Error in WorldFrag Shader compile
Error in BodyVtx Shader compile
Error in BodyFrag Shader compile
Loading Cam Textures
Loading 3D Noise
Loading Cam Lists
Cam Window Width = 800
Cam Window Height = 800
Cam Screen Width = 4480
Cam Screen Height = 1080
Done Initializing Cam Window
Error in MapVtx Shader compile
Error in MapFrag Shader compile
Error in MoonMapFrag Shader compile
42 Case ./Demo/ is 0% Complete at Time = 0.000
I would get a similar output when running it from OpenSatKit and when I run the Standalone
project.
Side question, should 42 Case ./Demo/ is 0% Complete at Time = 0.000
stay at 0% indefinitely, even though I can see the sim time increasing?
This is what it looks like when I run ./42 Demo
I added the following snippet inside LoadCamShaders
to determine if shader compilation is supported.
GLint Result = GL_FALSE;
glGetIntegerv(GL_SHADER_COMPILER, &Result);
if (Result == GL_FALSE) {
printf("Error in GL_SHADER_COMPILER\n");
}
Seems like it is not, I will investigate if there is a way to enable it.
Initializing GLUT
Initializing Cam Window
Loading Cam Shaders
Error in GL_SHADER_COMPILER
Error in SunVtx Shader compile
I was able to fix my issue by removing the following flag from my .bashrc
file.
# export LIBGL_ALWAYS_INDIRECT=1
Once I removed it I was able to compile the shaders without running into an error for the Demo
and the Standalone
projects.