Fix texture
All checks were successful
Run ReCI Build Test / Explore-Gitea-Actions (push) Successful in 6m10s
All checks were successful
Run ReCI Build Test / Explore-Gitea-Actions (push) Successful in 6m10s
This commit is contained in:
@@ -25,14 +25,14 @@ namespace JGL {
|
||||
|
||||
/// Represents texture data loaded on the GPU. Contains a handle that can be passed to OpenGL draw calls.
|
||||
class Texture {
|
||||
private:
|
||||
protected:
|
||||
GLuint texture_handle = 0;
|
||||
Vector2 texture_size = {0, 0};
|
||||
ReTexture::TextureFlag texture_flags;
|
||||
ReTexture::TextureFormat texture_format;
|
||||
TextureFilteringMode texture_filtering_mode;
|
||||
TextureWrappingMode texture_wrapping_mode;
|
||||
void load(SoftwareTexture* software_texture, const Vector2& size, const TextureFormat& format, TextureFilteringMode filtering_mode, TextureWrappingMode wrapping_mode);
|
||||
virtual void load(SoftwareTexture* software_texture, const Vector2& size, const TextureFormat& format, TextureFilteringMode filtering_mode, TextureWrappingMode wrapping_mode);
|
||||
public:
|
||||
explicit Texture(const std::string& file, TextureFilteringMode filtering_mode = TextureFilteringMode::BILINEAR, TextureWrappingMode wrapping_mode = TextureWrappingMode::CLAMP_TO_EDGE);
|
||||
Texture(const std::string& file, const TextureFlag& flags, TextureFilteringMode filtering_mode = TextureFilteringMode::BILINEAR, TextureWrappingMode wrapping_mode = TextureWrappingMode::CLAMP_TO_EDGE);
|
||||
@@ -44,6 +44,8 @@ namespace JGL {
|
||||
TextureFormat GetFormat() const;
|
||||
std::vector<Color4> GetPixelData() const;
|
||||
|
||||
void SetTextureHandle(GLuint handle);
|
||||
|
||||
void Erase();
|
||||
};
|
||||
|
||||
|
@@ -129,7 +129,6 @@ namespace JGL
|
||||
|
||||
for (const auto &c: color3)
|
||||
result.emplace_back(c);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -158,4 +157,7 @@ namespace JGL
|
||||
return texture_filtering_mode;
|
||||
}
|
||||
|
||||
void Texture::SetTextureHandle(GLuint handle) {
|
||||
texture_handle = handle;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user