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

Modernize Renderer #218

Open
Tracked by #217
IllustrisJack opened this issue Jan 23, 2024 · 1 comment · May be fixed by #179
Open
Tracked by #217

Modernize Renderer #218

IllustrisJack opened this issue Jan 23, 2024 · 1 comment · May be fixed by #179
Assignees
Labels
engine Any PR/Issue affiliated with the engine portion of LTR

Comments

@IllustrisJack
Copy link
Member

No description provided.

@IllustrisJack IllustrisJack added the engine Any PR/Issue affiliated with the engine portion of LTR label Jan 23, 2024
@dgavedissian
Copy link
Collaborator

dgavedissian commented Jul 22, 2024

I just opened a PR to move us from legacy OpenGL 2.1 (with slow immediate mode APIs, some glitches in shaders) to modern OpenGL 3.3: #293

Next steps are:

  • Remove Shader.SetFloat4 and related "global" Shader functions that depend on you having run shader:start first. Make those part of the shader itself i.e. shader:setFloat4.
  • Add the concept of a "uniform buffer" which can be shared across shaders. Perhaps worth also supporting automatic uniform buffer population by parsing the GLSL shaders.
  • Replace Draw.Clear/Draw.ClearDepth with the concept of a "render pass".
  • Improve the Lua rendering API by getting rid of all the Push/Pop's everywhere around shaders. I want it to be solid and not depend on the "current" global state so much. Perhaps introduce a new "RenderState" type?
  • Rename ShaderState to Material. Move render state features into Material? Need to think on this one.
  • Incorporate ShaderVar.* functions into Shader i.e. ShaderVar.PushMatrix -> Shader.PushGlobalMatrix. Or perhaps, come up with a better abstraction for "global" variables (maybe uniform buffers?)

@dgavedissian dgavedissian self-assigned this Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engine Any PR/Issue affiliated with the engine portion of LTR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants