Skip to content

Conversation

@LukaTD
Copy link

@LukaTD LukaTD commented Oct 30, 2025

General adjustments:

  • Changed non-void pointers to [*c] (C pointers),
  • changed void pointers to ?*anyopaque,
  • changed non-GL types to GL types,
  • added const where needed,
  • adjusted argument names to match those in the registry.

Additional specific changes:

  • Fixed wrong type of params argument for getPointerv and getPointervKHR (void* -> void**),
  • made callback argument of debugMessageCallback and debugMessageCallbackKHR optional, so debug callback can be unset by passing null.

…closely

* converted non-void pointers to '[*c]' (C pointers)
* converted void pointers to '?*anyopaque'
* converted non-GL types to GL types
* added 'const' where needed
* adjusted argument names to match those in the registry
* makes it possible to unset the debug callback, by passing in 'null'
@hazeycode hazeycode requested a review from Copilot October 30, 2025 10:40
Copy link

Copilot AI left a 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 standardizes pointer type declarations in OpenGL bindings for Zig, converting from inconsistent pointer types to the more appropriate [*c] (C pointer) convention and nullable optionals where appropriate.

Key changes include:

  • Converting single-item pointers (*const Type) to C pointers ([*c]const Type) for consistency with C FFI
  • Converting bare pointer types to nullable optionals (?*const anyopaque) where nullability is semantically valid
  • Renaming parameters to match OpenGL specification conventions (e.g., binary_format to binaryFormat, shader_type to shadertype)
  • Removing unnecessary @"type" escaping in parameter names

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

1 participant