Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-02-06 19:51:09 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-02-06 19:51:09 +0300
commit1b0a49478a8eb79c3bd0db7131e4a8965d13803e (patch)
tree15d04619d23e11e3a7fd3b78b45c78d579040dfe /source/blender/windowmanager
parent84e2de8ca7a86334c604e4476cf2938c8b444fcb (diff)
2.5: Enable triple buffer drawing by default (if it doesn't work
or flickers, kick me). Also removed proxy texture test since it does not seem to be implemented well by all drivers.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_draw.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/source/blender/windowmanager/intern/wm_draw.c b/source/blender/windowmanager/intern/wm_draw.c
index 34ab1c8d48f..7dc30695862 100644
--- a/source/blender/windowmanager/intern/wm_draw.c
+++ b/source/blender/windowmanager/intern/wm_draw.c
@@ -365,7 +365,7 @@ static void wm_draw_triple_fail(bContext *C, wmWindow *win)
static int wm_triple_gen_textures(wmWindow *win, wmDrawTriple *triple)
{
- GLint width;
+ GLint maxsize;
int x, y;
/* compute texture sizes */
@@ -402,16 +402,13 @@ static int wm_triple_gen_textures(wmWindow *win, wmDrawTriple *triple)
for(y=0; y<triple->ny; y++) {
for(x=0; x<triple->nx; x++) {
- /* disabled, does not seems to work well everywhere */
/* proxy texture is only guaranteed to test for the cases that
* there is only one texture in use, which may not be the case */
- glBindTexture(triple->target, triple->bind[x + y*triple->nx]);
- glTexImage2D(GL_PROXY_TEXTURE_2D, 0, GL_RGB8, triple->x[x], triple->y[y], 0, GL_RGB, GL_UNSIGNED_BYTE, NULL);
- glGetTexLevelParameteriv(GL_PROXY_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, &width);
+ glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxsize);
- if(width == 0) {
+ if(triple->x[x] > maxsize || triple->y[y] > maxsize) {
glBindTexture(triple->target, 0);
- printf("WM: failed to allocate texture for triple buffer drawing (GL_PROXY_TEXTURE_2D).\n");
+ printf("WM: failed to allocate texture for triple buffer drawing (texture too large for graphics card).\n");
return 0;
}