Conversation
|
@chobomuffin lol what a scam you cant check in this: |
ac2a68f to
4d49662
Compare
| ~GLManager(void); | ||
|
|
||
| void renderScene(Entity *entity); | ||
| void renderScenes(std::vector<Entity*> entities); |
There was a problem hiding this comment.
Even though it is not completely necessary you should think about passing std::vectors by reference to prevent copying. You should also think about decoupling your entity representation from the renderer and feed your renderer with the necessary structures for rendering from the outside instead of passing your entities.
|
|
||
| void TextureData::updateTexture(unsigned char* data) | ||
| { | ||
| glBindTexture(m_textureTarget, m_textureId); |
There was a problem hiding this comment.
If you have a GLManager, then try to move the GL-specific code to the GLManager (e. g. try passing a *TextureData to a GLManager->initTexture method and then initialize it there).
| } | ||
|
|
||
| int TextureData::getHeight(void) { | ||
| return m_height; |
There was a problem hiding this comment.
You could also think about implementing an isAlpha method returning if the texture is an RGBA texture which allows for transparency sorting later.
| } | ||
|
|
||
| void Animation::updateFrameNumber(int frameNumber) { | ||
| previousFrame = currentFrame; |
There was a problem hiding this comment.
You can reset your animation by using currentFrame = frameNumber % MAX_FRAMES;
No description provided.