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

error: shader input explicit location requires GL_ARB_explicit_attrib_location extension or GLSL 3.30 #81

Closed
jakubMitura14 opened this issue Oct 26, 2023 · 3 comments

Comments

@jakubMitura14
Copy link

Hello I get

error: shader input explicit location requires GL_ARB_explicit_attrib_location extension or GLSL 3.30

when invoking the validating function

function validateShader(shader)
	success = GLint[0]
	glGetShaderiv(shader, GL_COMPILE_STATUS, success)
	success[] == GL_TRUE
end

I had read that in case of the C++ such issue can be resolved by adding

#extension GL_ARB_explicit_uniform_location : require

Hovewer I do not know how to approach it in Julia

I had build the Modern Gl with debug flag True

Enviroment

Ubuntu Nvida RTX 3080

julia = "1.9"
FreeType = "4.1.0"
FreeTypeAbstraction = "0.10.0"
GLFW = "3.4.1"
ModernGL = "1.1.5"
CUDA = "4.2.0"

Also If you would like a full example I prepared docker container prepared for X server sharing using vs code dev containers

https://github.com/jakubMitura14/cudaDockerJulia.git
Data can be downloaded from https://drive.google.com/drive/folders/1HqEgzS8BV2c7xYNrZdEAnrHk7osJJ--2 - Task09
I will bundle data loading with docker if it will be more convenient for you
@SimonDanisch
Copy link
Member

You need to add #extension GL_ARB_explicit_uniform_location : require to the shader ;)

@jakubMitura14
Copy link
Author

jakubMitura14 commented Oct 26, 2023

Thank You @SimonDanisch for clue . However I get now error

extension `GL_ARB_explicit_attribute_location' unsupported in vertex shader

when vertex shader starts as

#version 140
#extension GL_ARB_explicit_attribute_location : require
#extension GL_ARB_explicit_uniform_location : require

I tried to also used newer versions of GSLS for example 3.3 but I get info

 Supported versions are: 1.10, 1.20, 1.30, 1.40, 1.00 ES, and 3.00 ES

This support is related with my driver or your package?

@SimonDanisch
Copy link
Member

Might be... How do you create the context? It's also possible to create a context which doesn't support the feature, even if your driver does...
You can have a look at the GLFW.Window constructor, which gives you the option to specify the desired OpenGL version

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

No branches or pull requests

2 participants