Hopson97 / open-builder

Open "Minecraft-like" game with multiplayer support and Lua scripting support for the both client and server
https://github.com/Hopson97/open-builder/projects/3
GNU General Public License v3.0
700 stars 80 forks source link

Add support for texture arrays #63

Closed Hopson97 closed 4 years ago

Hopson97 commented 4 years ago

Suggestion Title Texture Arrays

Describe your suggestion Have texture arrays would allow displaying multiple block types

Implementations ideas [optional] Some kind of interface in src/client/gl/textutes.h like

class TextureArray final {
  public:
    void create();

    // return value being the "layer" added (?)
    int addTexture(const std::string& texture);

    void destroy();
    void bind();

  private:
    unsigned m_textureCount = 0;
    GLuint m_handle = 0;
};