Open Source Tomb Raider Engine
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

Sprite.h 541B

1234567891011121314151617181920212223242526272829303132333435
  1. /*!
  2. * \file include/Sprite.h
  3. * \brief World Sprite
  4. *
  5. * \author xythobuz
  6. */
  7. #ifndef _SPRITE_H_
  8. #define _SPRITE_H_
  9. #include "system/Shader.h"
  10. class Sprite {
  11. public:
  12. Sprite(int tile, int x, int y, int width, int height);
  13. void display(glm::mat4 MVP);
  14. private:
  15. int texture;
  16. ShaderBuffer vertices, uvs;
  17. };
  18. class SpriteSequence {
  19. public:
  20. SpriteSequence(int objectID, int offset, int size)
  21. : id(objectID), start(offset), length(size) { }
  22. private:
  23. int id;
  24. int start;
  25. int length;
  26. };
  27. #endif