Example #1
0
Texture::Texture(const Dim& dim, const int samples, const GLenum iformat, const GLenum format, const GLenum type)
	: size(dim), samples(samples), iformat(iformat), format(format), type(type)
{
	assert(samples > 0);
	assert(samples == 1 || (dim.GetHeight() >= 1 && dim.GetDepth() == 1));

	InitResource(0, false, nullptr);
}
Example #2
0
Texture::Texture(const Dim& dim, const int samples, const GLenum autoformat)
	: size(dim), samples(samples), iformat(autoformat)
{
	assert(samples > 0);
	assert(samples == 1 || (dim.GetHeight() >= 1 && dim.GetDepth() == 1));

	assert(DetectFormat());
	InitResource(0, false, nullptr);
}