Merge remote-tracking branch 'origin/master' into blender2.8
authorDalai Felinto <dfelinto@gmail.com>
Mon, 2 Jan 2017 10:34:05 +0000 (11:34 +0100)
committerDalai Felinto <dfelinto@gmail.com>
Mon, 2 Jan 2017 10:47:26 +0000 (11:47 +0100)
I'm deliberately ignoring/reverting rB070f22c4 which in turns means T49861 is happening on 2.8

1  2 
source/blender/windowmanager/intern/wm_draw.c
source/blender/windowmanager/intern/wm_stereo.c

index 0758fa84e205ffa5ee8777b8a76a986b835d747d,77ffa46b99097b1a2618b35eaed8fb89b19642f7..df09331e8d011bcea9a70d432e0bc97af6a0742b
@@@ -407,26 -416,21 +407,27 @@@ static bool wm_triple_gen_textures(wmWi
  
        /* setup actual texture */
        glBindTexture(triple->target, triple->bind);
 -      glTexImage2D(triple->target, 0, GL_RGB8, triple->x, triple->y, 0, GL_RGB, GL_UNSIGNED_BYTE, NULL);
 +
 +      /* no mipmaps */
 +#if USE_TEXTURE_RECTANGLE
 +      /* already has no mipmaps */
 +#else
 +      glTexParameteri(triple->target, GL_TEXTURE_MAX_LEVEL, 0);
 +      /* GL_TEXTURE_BASE_LEVEL = 0 by default */
 +#endif
 +
        glTexParameteri(triple->target, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
        glTexParameteri(triple->target, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
 -      glBindTexture(triple->target, 0);
  
 -      /* not sure if this works everywhere .. */
 -      if (glGetError() == GL_OUT_OF_MEMORY) {
 -              printf("WM: failed to allocate texture for triple buffer drawing (out of memory).\n");
 -              return 0;
 -      }
 +      glTexImage2D(triple->target, 0, GL_RGB8, triple->x, triple->y, 0, GL_RGB, GL_UNSIGNED_BYTE, NULL);
 +
 +      glBindTexture(triple->target, 0);
  
 -      return 1;
 +      return true;
  }
  
- void wm_triple_draw_textures(wmWindow *win, wmDrawTriple *triple, float alpha)
 -void wm_triple_draw_textures(wmWindow *win, wmDrawTriple *triple, float alpha, bool is_interlace)
++/* TODO: fix interface - T49861 */
++void wm_triple_draw_textures(wmWindow *win, wmDrawTriple *triple, float alpha, bool UNUSED(is_interlace))
  {
        const int sizex = WM_window_pixels_x(win);
        const int sizey = WM_window_pixels_y(win);