TexImage2D() Format and Type

Started by
2 comments, last by Guacamole 14 years, 10 months ago
Why do I need the Format and Type parameters for TexImage2D()? Isn't the internal format enough?
Advertisement
Becuase format and type define the format/type of the input data, which might be in different format than the internal format.

For example, loading with internal format RGBA8, and giving it RGB8 pixel data.
format and type describe the pixel data you are passing to the call, internal format is a request that the data be stored this way, but the spec does not guarantee that it will match one to one, it may, but it may just match it approximately.
Aha, thanks!

This topic is closed to new replies.

Advertisement