X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fguicast%2Fvframe3d.C;h=52f096d7fa444385895067c2bce5a2bf82bf0949;hp=30c1b2bea23656a7873329b63c4e84c4841989db;hb=3305343c3d9bfb889f6892e7821cc0e2d68669de;hpb=853b81c6d430bd41037984ecc95fd304fd98964e diff --git a/cinelerra-5.1/guicast/vframe3d.C b/cinelerra-5.1/guicast/vframe3d.C index 30c1b2be..52f096d7 100644 --- a/cinelerra-5.1/guicast/vframe3d.C +++ b/cinelerra-5.1/guicast/vframe3d.C @@ -179,7 +179,6 @@ void VFrame::screen_to_texture(int x, int y, int w, int h) // Create texture BC_Texture::new_texture(&texture, get_w(), get_h(), get_color_model()); - if(pbuffer) { glEnable(GL_TEXTURE_2D); @@ -237,20 +236,15 @@ void VFrame::draw_texture(int flip_y) } -void VFrame::bind_texture(int texture_unit) +void VFrame::bind_texture(int texture_unit, int nearest) { // Bind the texture - if(texture) - { - texture->bind(texture_unit); + if(texture) { + texture->bind(texture_unit, nearest); } } - - - - void VFrame::init_screen(int w, int h) { #ifdef HAVE_GL @@ -266,7 +260,7 @@ void VFrame::init_screen(int w, int h) glMatrixMode(GL_MODELVIEW); glLoadIdentity(); // Shift down and right so 0,0 is the top left corner - glTranslatef(-(w-1)/2.f, (h-1)/2.f, 0.0); + glTranslatef(-w/2.f, h/2.f, 0.f); glTranslatef(0.0, 0.0, -(far + near) / 2); glDisable(GL_DEPTH_TEST);