Example #1
0
sge::opengl::texture::planar::planar(
	sge::opengl::texture::basic_parameters const &_basic_parameters,
	sge::renderer::texture::planar_parameters const &_parameters
)
:
	sge::opengl::texture::planar_basic(
		_basic_parameters,
		sge::opengl::texture::convert::make_type(
			GL_TEXTURE_2D
		),
		_parameters,
		sge::opengl::context::use<
			sge::opengl::texture::surface_context
		>(
			_basic_parameters.context()
		).config()
	)
{
}
Example #2
0
sge::opengl::texture::cube::cube(
	sge::opengl::texture::cube_config const &_config,
	sge::opengl::texture::basic_parameters const &_basic_parameters,
	sge::renderer::texture::cube_parameters const &_parameters
)
:
	sge::opengl::texture::cube_basic(
		_basic_parameters,
		_config.cube_texture_type(),
		_parameters
	),
	size_(
		_parameters.size()
	),
	sides_(
		[
			&_config,
			&_basic_parameters,
			&_parameters,
			this
		]{
			sge::opengl::texture::scoped_work_binding const binding(
				_basic_parameters.log(),
				_basic_parameters.context(),
				this->type(),
				this->id()
			);

			sge::opengl::texture::surface_config const &surface_config{
				sge::opengl::context::use<
					sge::opengl::texture::surface_context
				>(
					_basic_parameters.context()
				).config()
			};

			return
				fcppt::algorithm::enum_array_init<
					side_array
				>(
					[
						&binding,
						&surface_config,
						&_config,
						&_basic_parameters,
						&_parameters,
						this
					](
						sge::renderer::texture::cube_side const _side
					)
					{
						return
							sge::opengl::texture::init<
								sge::opengl::texture::cube_types
							>(
								binding,
								_basic_parameters,
								_parameters,
								surface_config,
								_config.cube_texture_type(),
								_config.cube_sides()[
									_side
								],
								this->id()
							);
					}
				);
		}()
	)
{
}