Skip to content
This repository has been archived by the owner on Jul 25, 2024. It is now read-only.

OpenGL wrapper/bindings #1

Open
Dominaezzz opened this issue Jan 30, 2019 · 3 comments
Open

OpenGL wrapper/bindings #1

Dominaezzz opened this issue Jan 30, 2019 · 3 comments

Comments

@Dominaezzz
Copy link
Owner

For the OpenGL wrapper, I want to support all targets provided by Kotlin, although it is currently limited by the platforms supported by kotlinx-io which is used for raw memory handling.

The plan is to provide a common interface that calls either OpenGL, OpenGL ES or WebGL on the appropriate platform.
I don't think OpenGL ES 1.0/1.1 should be supported as it doesn't have much in common with the others.

Since there are multiple versions of the api, I'm not sure if expect/actual will help. An interface in common with implementations for each platforms may work better.

Whether to provide top level functions or an object to call functions on is still undecided. (Depends on how OpenGL is exposed on each platform I guess).

@Dominaezzz
Copy link
Owner Author

I've started to implement a bit of the code generation required in the opengl branch.
It currently generates enums and function loaders on mingw target.

@Dominaezzz
Copy link
Owner Author

All core commands except these have been generated,

  • glDebugMessageCallback
  • glGetActiveAttrib
  • glGetActiveSubroutineName
  • glGetActiveSubroutineUniformName
  • glGetActiveUniform
  • glGetActiveUniformBlockName
  • glGetActiveUniformName
  • glGetBufferPointerv
  • glGetDebugMessageLog
  • glGetNamedBufferPointerv
  • glGetObjectLabel
  • glGetObjectPtrLabel
  • glGetPointerv
  • glGetProgramInfoLog
  • glGetProgramPipelineInfoLog
  • glGetProgramResourceName
  • glGetShaderInfoLog
  • glGetShaderSource
  • glGetString
  • glGetStringi
  • glGetTransformFeedbackVarying
  • glGetVertexAttribPointerv
  • glMapBuffer
  • glMapBufferRange
  • glMapNamedBuffer
  • glMapNamedBufferRange
  • glMultiDrawElements
  • glMultiDrawElementsBaseVertex

These have not been generated yet either because they require allocation to write it's result or it returns a block of memory where the size cannot be (trivially) determined from the OpenGL registry.

@Dominaezzz
Copy link
Owner Author

All core commands have been generated for native targets.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant