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

Distinct for OpenGL IDs #39

Open
planetis-m opened this issue Nov 23, 2022 · 3 comments
Open

Distinct for OpenGL IDs #39

planetis-m opened this issue Nov 23, 2022 · 3 comments

Comments

@planetis-m
Copy link
Owner

planetis-m commented Nov 23, 2022

  • Texture.id, DrawCall.textureId, rlEnableTexture id, rlEnableTextureCubemap id, rlTextureParameters id, rlLoadTexture, rlLoadTextureDepth, rlLoadTextureCubemap, rlUpdateTexture, rlUnloadTexture, rlGenTextureMipmaps, rlReadTexturePixels, could be of type TextureId = distinct uint32
  • Shader.id, rlEnableShader, rlUnloadShaderProgram could be ShaderProgramId = distinct uint32
  • Mesh.vaoId, VertexBuffer.vaoId, rlEnableVertexArray vaoId, rlLoadVertexArray, rlUnloadVertexArray vaoId -> VertexArrayId = distinct uint32
  • Mesh.vboId, VertexBuffer.vboId, rlEnableVertexBuffer id, rlEnableVertexBufferElement id, rlLoadVertexBuffer, rlUnloadVertexBuffer vboId, rlLoadVertexBufferElement, rlUpdateVertexBufferElements, rlUpdateVertexBuffer, rlUnloadVertexBuffer -> BufferId = distinct uint32
  • rlLoadShaderProgram vShaderId, fShaderI -> ShaderId = distinct uint32
  • rlEnableVertexAttribute index, rlDisableVertexAttribute index ->GlArray = distinct int32
  • rlSetVertexAttribute index, rlSetVertexAttributeDivisor index
  • rlSetVertexAttributeDefault locIndex ->
  • rlActiveTextureSlot slot -> GlTextureI = distinct int32
  • rlEnableFramebuffer id, rlLoadFramebuffer -> FrameBufferId = distinct uint32
  • rlUpdateVertexBuffer bufferId, rlUpdateVertexBufferElements id ->
  • rlGetGlTextureFormats format
  • rlFramebufferAttach
@planetis-m
Copy link
Owner Author

planetis-m commented Nov 23, 2022

PixelFormat

  • rlLoadTextureCubemap format
  • rlGetGlTextureFormats format
  • rlUpdateTexture
  • rlGenTextureMipmaps
  • rlReadTexturePixels
  • rlBindImageTexture

LocationUniform LocationAttrib = distinct int32 or use ShaderLocation

  • rlGetLocationUniform
  • rlGetLocationAttrib
  • rlSetVertexAttributeDefault locIndex
  • rlSetUniform
  • rlSetUniformMatrix
  • rlSetUniformSampler

@planetis-m planetis-m changed the title Distinct for OpenGL ids Distinct for OpenGL IDs Nov 23, 2022
@planetis-m
Copy link
Owner Author

planetis-m commented Nov 23, 2022

How about simplifying AttribName, UniformName to ShaderVariable = distinct cstring.

@planetis-m
Copy link
Owner Author

planetis-m commented Nov 23, 2022

Let's use GlEnum and GlUint and not go overboard for a start.

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