Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cube map dimensions validation #16

Closed
SpartanJ opened this issue Apr 24, 2017 · 1 comment
Closed

Cube map dimensions validation #16

SpartanJ opened this issue Apr 24, 2017 · 1 comment

Comments

@SpartanJ
Copy link
Owner

Original report by Michael IV (Bitbucket: Krioboss, ).


Hi.Don't you think the following chunk that validates cubemap dimensions is wrong?I mean,what sort of texture size is that where the width must be 6 times bigger than height and height must be 6 times bigger than width?It doesn't make sense.

#!c

if( (width != 6*height) &&
		(6*width != height) )
	{
		SOIL_free_image_data( img );
		result_string_pointer = "Single cubemap image must have a 6:1 ratio";
		return 0;
	}
@SpartanJ
Copy link
Owner Author

Original comment by Martín Lucas Golini (Bitbucket: SpartanJ, GitHub: SpartanJ).


Hi!

That line is OK, i think you misread it, one of its sides must be 6 time bigger than the other, that's what it checks, if that condition is not met, it can't create a cube map from a static image ( you have to have 6 sides with the same size each one ).

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant