mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
add debug world generator visualization
This commit is contained in:
parent
88752806e6
commit
75d66b644b
11 changed files with 116 additions and 9 deletions
|
|
@ -41,7 +41,13 @@ void GLTexture::unbind() {
|
|||
glBindTexture(GL_TEXTURE_2D, 0);
|
||||
}
|
||||
|
||||
void GLTexture::reload(const ubyte* data){
|
||||
void GLTexture::reload(const ImageData& image) {
|
||||
width = image.getWidth();
|
||||
height = image.getHeight();
|
||||
reload(image.getData());
|
||||
}
|
||||
|
||||
void GLTexture::reload(const ubyte* data) {
|
||||
glBindTexture(GL_TEXTURE_2D, id);
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0,
|
||||
GL_RGBA, GL_UNSIGNED_BYTE, static_cast<const GLvoid*>(data));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue