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.
16 lines
358 B
16 lines
358 B
#pragma once
|
|
#include "Vector3.h"
|
|
class Texture2D {
|
|
public:
|
|
virtual Vector3 Sample(float u, float v) = 0;
|
|
};
|
|
class TextureRGB : public Texture2D {
|
|
public:
|
|
unsigned char* mImageFileContent;
|
|
unsigned char* mRGBPixel;
|
|
int mWidth, mHeight;
|
|
TextureRGB();
|
|
~TextureRGB();
|
|
void Set(const char* image_path);
|
|
Vector3 Sample(float u, float v);
|
|
};
|