Skip to content

Please consider exporting the internal marshaling functions #67

Open
@ekmett

Description

@ekmett

I've pretty much spent the last few hours hacking around the fact that I can't get at the GLenum's for an arbitrary ParameterizedTextureTarget in order to set up texture swizzling. =(

I basically wanted to:

    glTexParameter t gl_TEXTURE_SWIZZLE_R GL_RED
    glTexParameter t gl_TEXTURE_SWIZZLE_G GL_RED
    glTexParameter t gl_TEXTURE_SWIZZLE_B GL_RED
    glTexParameter t gl_TEXTURE_SWIZZLE_A GL_ONE

This would have been trivial and I could have continued to use the built in abstractions if we acknowledged that our abstractions leak as it is I pretty much had to give up on carrying on the abstraction through my own API.

If

class ParameterizedTextureTarget t where
   marshalParameterizedTextureTarget :: t -> GLenum
   marshalParameterizedTextureTargetProxy :: t -> GLenum
   marshalParameterizedTextureTargetEnableCap :: t -> EnableCap

exported the various marshal functions, I'd have been off to the races. There are dozens of these types sprinkled throughout the library.

What is gained from hiding the implementations of these classes? The ability to bump minor versions when you change how they are implemented?

You have lots of lovely little abstractions sprinkled around the OpenGL library. Please let us build atop them. =)

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