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

API Documentation incomplete #2

Open
4 tasks
ScottFreeCode opened this issue Oct 22, 2023 · 1 comment
Open
4 tasks

API Documentation incomplete #2

ScottFreeCode opened this issue Oct 22, 2023 · 1 comment

Comments

@ScottFreeCode
Copy link

  • LineCtx has a Float parameter that is not explained or named. It appears it sets glLineWidth.
  • PointCtx has a Float parameter that is not explained or named. It appears it sets GL_POINT_FADE_THRESHOLD_SIZE.
  • map is referenced in much of the code on the page, but is not in the initial list of functions. I am familiar with map, of course, but it would be nice to document whether it's there just to explain the implementations or if it is (as I would expect) usable in .lc code, and whether it is equivalent to Haskell's map on lists or fmap on functors.
  • PointSpriteCoordOrigin's constructor UpperLeft is commented as "texture origin is lower left corner" (upper vs lower).
@ScottFreeCode
Copy link
Author

I could put this in its own issue if you'd prefer, as I'm not sure if it would be in the API documentation or another page, but I noticed in the LambdaCube GL package's Mesh module the disposeMesh function. This showed up naturally since you have to use the Mesh module for adding meshes to the GPU. I tried using it, but was getting memory leaks and my render calls were taking more and more CPU time and slowing down the more meshes I had added, even if all but the current ones were removed. I eventually figured out I need to also call removeObject on (the storage and) the Object returned from adding the object to the storage's attributes.

These two functions do not appear to be documented so as to explain how to properly remove a mesh. It would be great either to have them mention each other in their comments / Haddock documentation, or to have something on the website describing how to add and remove meshes.

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