Shadows - need to fix frame buffers
This commit is contained in:
@@ -64,6 +64,7 @@ HydraID HydraTextureBufferManager::LoadTexture(std::string texture_filename)
|
||||
format,
|
||||
GL_NEAREST_MIPMAP_NEAREST,
|
||||
GL_LINEAR,
|
||||
1,
|
||||
GL_UNSIGNED_BYTE,
|
||||
5,
|
||||
data,
|
||||
@@ -112,6 +113,7 @@ HydraID HydraTextureBufferManager::CreateTexture(std::string texture_name,
|
||||
uint32_t internal_format,
|
||||
uint32_t min_filter,
|
||||
uint32_t mag_filter,
|
||||
uint32_t levels,
|
||||
uint32_t format,
|
||||
uint32_t data_type,
|
||||
uint32_t mip_levels,
|
||||
@@ -121,8 +123,8 @@ HydraID HydraTextureBufferManager::CreateTexture(std::string texture_name,
|
||||
glCreateTextures(GL_TEXTURE_2D, 1, &gl_tex_id);
|
||||
glBindTexture(GL_TEXTURE_2D, gl_tex_id);
|
||||
|
||||
// important to create mip_levels + 1 images
|
||||
glTextureStorage2D(gl_tex_id, mip_levels + 1, internal_format, width, height);
|
||||
|
||||
glTextureStorage2D(gl_tex_id, levels, internal_format, width, height);
|
||||
|
||||
if (data != nullptr)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user