OpenGL-Sandbox

 view release on metacpan or  search on metacpan

lib/OpenGL/Sandbox.c  view on Meta::CPAN

		return;
	}
	/* Else we are defining the storage for the texture and more things need considered.
	 * Also the texture object should be updated with the result of the calculations below. */
	
	if (internal_p) internal_fmt= SvIV(internal_p);
	else if (known_format) internal_fmt= default_internal_fmt;
	else carp_croak("No default internal_format for given format %d; must be specified", format);
	
	/* use mipmaps if the user set it to true, or if the min_filter uses a mipmap,
	   and default in absence of any user prefs is true. But not if the user has specified 'level' */
	with_mipmaps= level? 0
		: mipmap_p? SvTRUE(mipmap_p)
		: !min_filter_p? 1
		: (SvIV(min_filter_p) == GL_NEAREST || SvIV(min_filter_p) == GL_LINEAR) ? 0
		: 1;
	
	if (with_mipmaps) {
		if (major < 3) {
			glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE);
			if (mag_filter_p)



( run in 1.006 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )