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

Loading extensions? #70

Open
heyx3 opened this issue Oct 17, 2021 · 1 comment
Open

Loading extensions? #70

heyx3 opened this issue Oct 17, 2021 · 1 comment

Comments

@heyx3
Copy link
Contributor

heyx3 commented Oct 17, 2021

How would I load extensions (whether in a fork of this library, or in my own project)? Say, ARB_bindless_texture.

@heyx3
Copy link
Contributor Author

heyx3 commented Nov 14, 2021

I did some experimenting, and it seems to work as expected if I just declare the extensions like any other parts of OpenGL: adding functions with @glfunc and adding constants to glConstants.jl. For example, here's ARB_bindless_texture:

#=   In glFunctions.jl =#
@glfunc glGetTextureHandleARB(texture::GLuint)::GLuint64
@glfunc glGetTextureSamplerHandleARB(texture::GLuint, sampler::GLuint)::GLuint64
@glfunc glMakeTextureHandleResidentARB(handle::GLuint64)::Cvoid
@glfunc glMakeTextureHandleNonResidentARB(handle::GLuint64)::Cvoid
@glfunc glGetImageHandleARB(texture::GLuint, level::GLint, layered::GLboolean, layer::GLint, format::GLenum)::GLuint64
@glfunc glMakeImageHandleResidentARB(handle::GLuint64, access::GLenum)::Cvoid
@glfunc glMakeImageHandleNonResidentARB(handle::GLuint64)::Cvoid
@glfunc glUniformHandleui64ARB(location::GLint, value::GLuint64)::Cvoid
@glfunc glUniformHandleui64vARB(location::GLint, count::GLsizei, value::Ptr{GLuint64})::Cvoid
@glfunc glProgramUniformHandleui64ARB(program::GLuint, location::GLint, value::GLuint64)::Cvoid
@glfunc glProgramUniformHandleui64vARB(program::GLuint, location::GLint, count::GLsizei, values::Ptr{GLuint64})::Cvoid
@glfunc glIsTextureHandleResidentARB(handle::GLuint64)::GLboolean
@glfunc glIsImageHandleResidentARB(handle::GLuint64)::GLboolean
@glfunc glVertexAttribL1ui64ARB(index::GLuint, x::GLuint64)::Cvoid
@glfunc glVertexAttribL1ui64vARB(index::GLuint, v::Ptr{GLuint64})::Cvoid
@glfunc glGetVertexAttribLui64vARB(index::GLuint, pname::GLenum, params::Ptr{GLuint64})::Cvoid

#=   In glConstants.jl   =#
...
GL_UNSIGNED_INT64_ARB = 0x140F
...

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

1 participant