Page 1 of 1
Table fields from glTexture()?
Posted: Tue Feb 19, 2013 6:24 pm
by nate
glTexture seems to return a nice table, with a bunch of fields containing diverse and useful information, that are apparently referenced array style
Anybody know what the various fields refer to? I'd rather not do a bunch of science.
Re: Table fields from glTexture()?
Posted: Tue Feb 19, 2013 11:48 pm
by darkgod
1: texture itself
2: texture width
3: texture height
4: width ratio
5: height ratio
6: image width
7: image height
Re: Table fields from glTexture()?
Posted: Wed Feb 20, 2013 4:39 am
by nate
I appreciate the prompt response but have to confess that doesn't clarify much to me

Not sure how texture width is different from image width, or what the ratios are ratios of (height to width and vice versa?) I can always do some experimentation though.
Re: Table fields from glTexture()?
Posted: Thu Feb 21, 2013 11:43 pm
by darkgod
Textures size is a power of 2, while image size can be anything and the ratio is needed to correctly map texture on quad
Re: Table fields from glTexture()?
Posted: Fri Feb 22, 2013 12:20 am
by nate
darkgod wrote:Textures size is a power of 2, while image size can be anything and the ratio is needed to correctly map texture on quad
Ahh, thanks!