Skip to content

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

@elect86

Description

@elect86

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions