You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
358 B

  1. #pragma once
  2. #include "Vector3.h"
  3. class Texture2D {
  4. public:
  5. virtual Vector3 Sample(float u, float v) = 0;
  6. };
  7. class TextureRGB : public Texture2D {
  8. public:
  9. unsigned char* mImageFileContent;
  10. unsigned char* mRGBPixel;
  11. int mWidth, mHeight;
  12. TextureRGB();
  13. ~TextureRGB();
  14. void Set(const char* image_path);
  15. Vector3 Sample(float u, float v);
  16. };