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

Checklist/Idea for renderer cleanup #6

Open
5 tasks
KevinW1998 opened this issue Aug 3, 2015 · 2 comments
Open
5 tasks

Checklist/Idea for renderer cleanup #6

KevinW1998 opened this issue Aug 3, 2015 · 2 comments

Comments

@KevinW1998
Copy link
Contributor

KevinW1998 commented Aug 3, 2015

Here is a checklist for cleaning up the Renderer class:

We'll do for sure:

  • Move to smart pointers instead of raw pointers
  • clean up things relating to RenderOp::m_FramesLeft as that's not particularly clean/clear right now
  • Remove some leftover stuff that's in "if (false) {" blocks and unused
  • Move things that are part of the "Render" namespace (as opposed to Renderer class) into their own file
  • Design it to support multiple queues of RenderOps, for supporting multiple layers. Could be something like std::map>. Even if only one layer (HUD) is defined initially it would be good to set this up to support that in the future.

Ideas:

  • Move from std::list to std::vector (better performance?)
  • Transfrom RenderString and std::list to RenderOp?
@Bluenaxela
Copy link
Contributor

  • Feel pretty neutral about smart pointers, but they could be okay.
  • For moving some things away from std::list, I suggest std::queue rather than std::vector, as that better matches the purpose.
  • Might want to clean up things relating to RenderOp::m_FramesLeft as that's not particularly clean/clear right now
  • Remove some leftover stuff that's in "if (false) {" blocks and unused
  • Move things that are part of the "Render" namespace (as opposed to Renderer class) into their own file
  • Design it to support multiple queues of RenderOps, for supporting multiple layers. Could be something like std::queue<RenderOp*> mRenderQueues[RENDER_LAYER_MAX];. Even if only one layer (HUD) is defined initially it would be good to set this up to support that in the future.

@KevinW1998
Copy link
Contributor Author

  • Smart Pointers: I tend to use smart pointers for sake of organization
  • Container: Probably std::queue is best for the design method. I have read that vectors can have better use of the CPU cache, because dereferencing cost a bit of performance (latency)...

For the other points I totally agree

@Wohlstand Wohlstand added this to the OpenGL Subsystem milestone Aug 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants