Skip to content
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

add skeletal animation to cmake and fix errors #237

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

add skeletal animation to cmake and fix errors #237

wants to merge 1 commit into from

Conversation

baptx
Copy link

@baptx baptx commented May 18, 2021

The skeletal animation was not added to cmake for compilation and there were several errors to fix to compile successfully.

@baptx
Copy link
Author

baptx commented May 18, 2021

When I execute the compiled example 8.guest__skeletal_animation, there is an error:

ERROR::SHADER::FILE_NOT_SUCCESFULLY_READ
ERROR::SHADER_COMPILATION_ERROR of type: VERTEX
0:1(1): error: syntax error, unexpected $end

 -- --------------------------------------------------- -- 
ERROR::SHADER_COMPILATION_ERROR of type: FRAGMENT
0:1(1): error: syntax error, unexpected $end

 -- --------------------------------------------------- -- 
ERROR::PROGRAM_LINKING_ERROR of type: PROGRAM
error: linking with uncompiled/unspecialized shadererror: linking with uncompiled/unspecialized shader
 -- --------------------------------------------------- -- 
Segmentation fault (core dumped)

Any idea why?

Update: I fixed most issues by using the vertex shader file from https://learnopengl.com/Guest-Articles/2020/Skeletal-Animation, copying the fragment shader file from the example 3.model_loading__1.model_loading and adding them to the src directory of the new example by using the names written in the source code (anim_model_vs.glsl and anim_model_fs.glsl). I also added the line "src/${CHAPTER}/${DEMO}/*.glsl" in the file CMakeLists.txt below the 2 lines "src/${CHAPTER}/${DEMO}/*.gs". However there is still a segfault and I can see this error message:

ERROR::SHADER_COMPILATION_ERROR of type: VERTEX
0:1(10): error: GLSL 4.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.40, 1.50, 3.30, 4.00, 4.10, 4.20, 1.00 ES, and 3.00 ES

 -- --------------------------------------------------- -- 
ERROR::PROGRAM_LINKING_ERROR of type: PROGRAM
error: linking with uncompiled/unspecialized shader
 -- --------------------------------------------------- -- 
Segmentation fault (core dumped)

Is it possible to make it work with a version of GLSL lower than 4.30? I changed the version to 3.30, fixed some variables errors (using finalBonesMatrices instead of finalBoneMatrices and MAX_BONES instead of MAX_JOINTS) and also added missing parts from the tutorial but there is still a segfault.

For the example 3.model_loading__1.model_loading there was an issue assimp/assimp#2754 recently and I was able to fix it by removing the includes/assimp directory. To compile the latest version of LearnOpenGL repository, I only needed to keep some files in this directory: quaternion.h, vector3.h and matrix4x4.h.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant