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

Refactor Graphics plugin architecture #27

Open
adamyaxley opened this issue Jun 28, 2018 · 1 comment
Open

Refactor Graphics plugin architecture #27

adamyaxley opened this issue Jun 28, 2018 · 1 comment

Comments

@adamyaxley
Copy link
Owner

adamyaxley commented Jun 28, 2018

Instead of implementing various classes such as Texture, Text, Map etc simply implement only one class which has simplified callbacks for rendering such as:

  • createContext()
  • destroyContext()
  • createTexture(std::shared_ptr<Texture>) - creates a native texture object and stores it in the Texture::m_userData
  • destroyTexture(std::shared_ptr<Texture>) - destroys the native texture object stored in Texture::m_userData
  • drawQuads(std::vector<Quad> quads) - draws quad vertices, transforms and texcoords
  • reset() - resets the state and gets ready for another frame
@adamyaxley
Copy link
Owner Author

Dear ImGUI has a ImDrawList::AddImageQuad that could be used for Sprites, Maps and potentially Text too. Text could directly use ImGUI's text functionality.

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