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

Shall we drop the identifier in several gl calls? #13

Open
elect86 opened this issue Apr 10, 2019 · 0 comments
Open

Shall we drop the identifier in several gl calls? #13

elect86 opened this issue Apr 10, 2019 · 0 comments

Comments

@elect86
Copy link
Contributor

elect86 commented Apr 10, 2019

We may consider dropping the identifier, which is superfluous

glGenBuffers, glBindBuffers, glCreateBuffers, glDeleteBuffers

and others, would become

glGen, glBind, glCreate, glDelete

Since we use inline classes, the compiler can figure it out without any problems

Another alternative is to just add them in parallel and keep both versions together. This has also the plus to be coherent with vkk, which in turn "borrowed" this from Vulkan-hpp


  template<typename Dispatch>
  VULKAN_HPP_INLINE void Device::destroyAccelerationStructureNV( AccelerationStructureNV accelerationStructure, const AllocationCallbacks* pAllocator, Dispatch const &d) const
  {
    d.vkDestroyAccelerationStructureNV( m_device, static_cast<VkAccelerationStructureNV>( accelerationStructure ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
  }

  template<typename Dispatch>
  VULKAN_HPP_INLINE void Device::destroy( AccelerationStructureNV accelerationStructure, const AllocationCallbacks* pAllocator, Dispatch const &d) const
  {
    d.vkDestroyAccelerationStructureNV( m_device, static_cast<VkAccelerationStructureNV>( accelerationStructure ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
  }

Althought in vulkan those are just extension-function/object-oriented calls, which we already have

GlBuffer(s)::gen/create/bind/delete

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