mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
skybox: added moon and stars
This commit is contained in:
parent
b42a517cc6
commit
a4a5aef422
22 changed files with 258 additions and 52 deletions
|
|
@ -46,6 +46,13 @@ ImageData* Texture::readData() {
|
|||
return new ImageData(ImageFormat::rgba8888, width, height, data.release());
|
||||
}
|
||||
|
||||
void Texture::setNearestFilter() {
|
||||
bind();
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
glBindTexture(GL_TEXTURE_2D, 0);
|
||||
}
|
||||
|
||||
Texture* Texture::from(const ImageData* image) {
|
||||
uint width = image->getWidth();
|
||||
uint height = image->getHeight();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue