Florian focused on NPOT issues and missed the more fundamental issue.On 13-04-19 04:26 AM, Kirill Prazdnikov wrote:
I have an issue with texture mapping:
Any texture which does not have the generateMipmap call rendered as black.
Also any non-power of two texture images rendered as black.
I use the latest Firefox build on windows.
I have read all the spec about texturing here:
And haven not found any mention about the fact that only power-of-two textures supported and all mip-maps have to be generated.
Is there intended or probably a bug in Firefox ?
What Florian said; plus: if you open the Web Console, make sure JS warnings are enabled, and reload your page, you will get a detailed warning message about why your texture is being rendered as black.
The fundamental issue, which is one of the pitfalls most new
OpenGL programmers fall into, is that the default value of
MIN_FILTER, NEAREST_MIPMAP_LINEAR, is one which requires a
complete mipmap pyramid. If you change MIN_FILTER to NEAREST or
LINEAR you will not need to call generateMipmap.
NOTE: This electronic mail message may contain confidential and privileged information from HI Corporation. If you are not the intended recipient, any disclosure, photocopying, distribution or use of the contents of the received information is prohibited. If you have received this e-mail in error, please notify the sender immediately and permanently delete this message and all related copies.