// Create texture
BC_Texture::new_texture(&texture,
get_w(), get_h(), get_color_model());
-
if(pbuffer) {
glEnable(GL_TEXTURE_2D);
}
-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
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);