Added missing OpenGL 2.0 and 2.1 functions to wrapper - #28
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.
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.
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.
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.