projects
/
goodguy
/
history.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
prev/next label fix in viewer, inout highlight, modify folder layout, ffmpeg scan...
[goodguy/history.git]
/
cinelerra-5.1
/
guicast
/
bctexture.C
diff --git
a/cinelerra-5.1/guicast/bctexture.C
b/cinelerra-5.1/guicast/bctexture.C
index b527b4e137327ab853a7528958907338d30b56d2..59e21810d50ba64ffd07c23ebb4ca240592b4d11 100644
(file)
--- a/
cinelerra-5.1/guicast/bctexture.C
+++ b/
cinelerra-5.1/guicast/bctexture.C
@@
-33,7
+33,6
@@
BC_Texture::BC_Texture(int w, int h, int colormodel)
this->h = h;
this->colormodel = colormodel;
texture_id = -1;
this->h = h;
this->colormodel = colormodel;
texture_id = -1;
- texture_id = -1;
texture_w = 0;
texture_h = 0;
texture_components = 0;
texture_w = 0;
texture_h = 0;
texture_components = 0;
@@
-247,11
+246,14
@@
void BC_Texture::write_tex(const char *fn)
#ifdef HAVE_GL
int prev_id = -1;
glGetIntegerv(GL_ACTIVE_TEXTURE, &prev_id);
#ifdef HAVE_GL
int prev_id = -1;
glGetIntegerv(GL_ACTIVE_TEXTURE, &prev_id);
- glActiveTexture(this->texture_id);
+ glActiveTexture(GL_TEXTURE31);
+ glBindTexture(GL_TEXTURE_2D, texture_id);
+ glEnable(GL_TEXTURE_2D);
int w = get_texture_w(), h = get_texture_h();
int w = get_texture_w(), h = get_texture_h();
- uint8_t
img
[w*h*3];
+ uint8_t
*img = new uint8_t
[w*h*3];
glGetTexImage(GL_TEXTURE_2D, 0, GL_RGB, GL_UNSIGNED_BYTE, img);
write_ppm(img, w, h, "%s", fn);
glGetTexImage(GL_TEXTURE_2D, 0, GL_RGB, GL_UNSIGNED_BYTE, img);
write_ppm(img, w, h, "%s", fn);
+ delete img;
glActiveTexture(prev_id);
#endif
}
glActiveTexture(prev_id);
#endif
}