-
Notifications
You must be signed in to change notification settings - Fork 15
Added missing OpenGL 2.0 and 2.1 functions to wrapper #28
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
Conversation
other notable changes: * enum parameter used by `blendEquationSeparate` is now also used by `blendEquation` in OpenGL 1.4, * extracted enum parameter used by `getProgramiv` to its own type, * adjusted `uniformMatrix4fv` to be consistent with other functions like it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive wrapper functions for OpenGL 2.0 and 2.1, significantly expanding the API coverage. The changes include new enum types for better type safety and consistency across the wrapper API.
- Introduces 6 new enum types (ColorBufferSingle, BlendEquation, ProgramParameter, AttribType, UniformType, VertexAttribParameter, VertexAttribPointerParameter)
- Refactors existing functions to use new enum types for improved type safety
- Adds 80+ OpenGL 2.0 wrapper functions including shader/program management, vertex attributes, and uniform operations
- Adds 6 OpenGL 2.1 wrapper functions for non-square matrix uniforms
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @intFromEnum(face), | ||
| @intFromEnum(func), | ||
| @as(Int, @bitCast(ref)), | ||
| @as(Uint, @bitCast(mask)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The @ass should be redundant, the result type is inferred from the arg type of the procedure we're passing to.
hazeycode
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Looks good to me other than the picky nitpick about redundant @as usage.
|
Sure, I can omit |
Additional changes:
blendEquationSeparateis now also used byblendEquationin OpenGL 1.4,getProgramivto its own type,uniformMatrix4fvto be consistent with other functions like it.