void D3DUnitMap::set_texture(D3DGraphicContextProvider *gc, int index, const Texture &texture) { if (texture_units.size() < index + 1) texture_units.resize(index + 1); texture_units[index].object = texture; bind_texture(gc, index); set_sampler(gc, index, texture); }
/** * setup_pinhole - setup pinhole camera. * * w: horizontal resolution of pinhole sensor * h: vertical resolution of pinhole sensor * fov: field of view * */ bool setup_pinhole(void) { init_mapping(); if (!compute_coordsys()) return false; set_sampler(samplers[DEFAULT_SAMPLER]); return true; }