[rtextures/rlgl] Load mipmaps for cubemaps (#4429)
* [rlgl] Load cubemap mipmaps * [rtextures] Only generate mipmaps that don't already exist * [rtextures] ImageDraw(): Implement drawing to mipmaps * [rtextures] Load cubemap mipmaps
This commit is contained in:
parent
91a4f04794
commit
7fedf9e0b8
3 changed files with 78 additions and 20 deletions
|
@ -191,7 +191,7 @@ static TextureCubemap GenTextureCubemap(Shader shader, Texture2D panorama, int s
|
|||
// STEP 1: Setup framebuffer
|
||||
//------------------------------------------------------------------------------------------
|
||||
unsigned int rbo = rlLoadTextureDepth(size, size, true);
|
||||
cubemap.id = rlLoadTextureCubemap(0, size, format);
|
||||
cubemap.id = rlLoadTextureCubemap(0, size, format, 1);
|
||||
|
||||
unsigned int fbo = rlLoadFramebuffer();
|
||||
rlFramebufferAttach(fbo, rbo, RL_ATTACHMENT_DEPTH, RL_ATTACHMENT_RENDERBUFFER, 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue