diff options
author | SmileTheory <SmileTheory@gmail.com> | 2015-12-24 16:34:58 -0800 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2016-04-07 11:46:05 +0100 |
commit | fae2cb94e089fabe9a69d0909a5c25e1014cb25f (patch) | |
tree | df06cc51e60c921182556c55714b0f99196f07b3 /src/renderergl2/tr_backend.c | |
parent | cedfa02c6b3b17cda26202abf5e4dd32f9720cb5 (diff) |
OpenGL2: Add r_cubemapSize.
Diffstat (limited to 'src/renderergl2/tr_backend.c')
-rw-r--r-- | src/renderergl2/tr_backend.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/renderergl2/tr_backend.c b/src/renderergl2/tr_backend.c index 4a29c966..557f553b 100644 --- a/src/renderergl2/tr_backend.c +++ b/src/renderergl2/tr_backend.c @@ -1765,7 +1765,7 @@ const void *RB_ExportCubemaps(const void *data) if (cmd) { FBO_t *oldFbo = glState.currentFBO; - int sideSize = CUBE_MAP_SIZE * CUBE_MAP_SIZE * 4; + int sideSize = r_cubemapSize->integer * r_cubemapSize->integer * 4; byte *cubemapPixels = ri.Malloc(sideSize * 6); int i, j; @@ -1780,12 +1780,12 @@ const void *RB_ExportCubemaps(const void *data) for (j = 0; j < 6; j++) { qglFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_CUBE_MAP_POSITIVE_X + j, cubemap->image->texnum, 0); - qglReadPixels(0, 0, CUBE_MAP_SIZE, CUBE_MAP_SIZE, GL_RGBA, GL_UNSIGNED_BYTE, p); + qglReadPixels(0, 0, r_cubemapSize->integer, r_cubemapSize->integer, GL_RGBA, GL_UNSIGNED_BYTE, p); p += sideSize; } Com_sprintf(filename, MAX_QPATH, "cubemaps/%s/%03d.dds", tr.world->baseName, i); - R_SaveDDS(filename, cubemapPixels, CUBE_MAP_SIZE, CUBE_MAP_SIZE, 6); + R_SaveDDS(filename, cubemapPixels, r_cubemapSize->integer, r_cubemapSize->integer, 6); ri.Printf(PRINT_ALL, "Saved cubemap %d as %s\n", i, filename); } |