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 OpenGL 4.5 #67

Merged
merged 4 commits into from
Oct 2, 2021
Merged

Add OpenGL 4.5 #67

merged 4 commits into from
Oct 2, 2021

Conversation

heyx3
Copy link
Contributor

@heyx3 heyx3 commented Sep 30, 2021

I haven't explicitly tested each new function/constant, but here is a quick rundown of my process to add this stuff:

  1. Refer to the OpenGL wiki to see what extensions were made core in OpenGL 4.5: https://www.khronos.org/opengl/wiki/History_of_OpenGL#OpenGL_4.5_.282014.29
  • ARB_clip_control
  • ARB_cull_distance
  • ARB_ES3_1_compatibility
  • ARB_conditional_render_inverted
  • ARB_derivative_control
  • ARB_direct_state_access
  • ARB_get_texture_sub_image
  • KHR_robustness
  • ARB_shader_texture_image_samples
  • ARB_texture_barrier
  1. For each extension, look at their "new tokens" and "new procedures and functions" sections.

  2. Add all new "tokens" to glConstants.jl

  3. Add all new functions to glFunctions.jl

If this gets merged in, I intend on doing OpenGL 4.6 next.

@heyx3
Copy link
Contributor Author

heyx3 commented Sep 30, 2021

By the way, are the export statements necessary for glConstants.jl? A quick glance over the @GenEnums macro shows that it ends with an export expression:

esc(Expr(:block, enumtype, tmp..., Expr(:export, :($(enumName)))))

@heyx3
Copy link
Contributor Author

heyx3 commented Oct 1, 2021

For reference, if anybody wants to use OpenGL 4.4 through 4.6 right away, I have a branch in my fork that implements those changes. I haven't checked if anything's missing from 4.3 and below.

https://github.com/heyx3/ModernGL.jl/tree/v4.6

@SimonDanisch
Copy link
Member

Cool stuff :) is this ready to merge?

@heyx3
Copy link
Contributor Author

heyx3 commented Oct 2, 2021

I'll try to go over the constants and functions one more time today to verify that they're correct. The DSA ones are a big pain just because there's so many new functions!

The test does still run successfully, so there's no compilation errors or anything.

@heyx3
Copy link
Contributor Author

heyx3 commented Oct 2, 2021

Went over it again, and it looks correct to me.

@SimonDanisch
Copy link
Member

Awesome, thank you! At some point it would be worth to wrap these automatically with Clang.jl...
When we wrapped these, Clang wasn't in a great state, but now it seems to be fairly forward to wrap even complicated headers, and also apply the needed transformation (e.g. the whole function pointer loading) as part of the Clang build ;)

@SimonDanisch SimonDanisch merged commit 976bcd1 into JuliaGL:master Oct 2, 2021
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.

2 participants