Home » Developing U++ » U++ Developers corner » OpenGL texture issues
|
Re: OpenGL texture issues [message #40711 is a reply to message #40710] |
Sun, 08 September 2013 07:35   |
 |
mirek
Messages: 14256 Registered: November 2005
|
Ultimate Member |
|
|
mirek wrote on Sun, 08 September 2013 01:30 |
- it looks to like OpenGL expects textures in non-premultiplies format. In that case we need to unmultiply Image, right? (I have not seen any such thing in CoreGL/resources.cpp, but I might be missing something).
|
Ha, 2 minutes after posting, I have found in CoreGL
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
which, AFAIK, should exactly switch OpenGL to premultiplied alpha mode, right? 
Mirek
|
|
|
Re: OpenGL texture issues [message #40716 is a reply to message #40711] |
Sun, 08 September 2013 12:26   |
|
mirek wrote on Sun, 08 September 2013 01:35 |
mirek wrote on Sun, 08 September 2013 01:30 |
- it looks to like OpenGL expects textures in non-premultiplies format. In that case we need to unmultiply Image, right? (I have not seen any such thing in CoreGL/resources.cpp, but I might be missing something).
|
Ha, 2 minutes after posting, I have found in CoreGL
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
I have to admit I didn't even think about it But docs says it is exactly prempultiplied mode.
If it comes to textures of power of 2 it is true for opengl es - so for all mobile devices. On desktop it is not required.
[Updated on: Sun, 08 September 2013 12:26] Report message to a moderator
|
|
|
Re: OpenGL texture issues [message #40719 is a reply to message #40716] |
Sun, 08 September 2013 19:05   |
 |
mirek
Messages: 14256 Registered: November 2005
|
Ultimate Member |
|
|
unodgs wrote on Sun, 08 September 2013 06:26 |
mirek wrote on Sun, 08 September 2013 01:35 |
mirek wrote on Sun, 08 September 2013 01:30 |
- it looks to like OpenGL expects textures in non-premultiplies format. In that case we need to unmultiply Image, right? (I have not seen any such thing in CoreGL/resources.cpp, but I might be missing something).
|
Ha, 2 minutes after posting, I have found in CoreGL
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
I have to admit I didn't even think about it But docs says it is exactly prempultiplied mode.
If it comes to textures of power of 2 it is true for opengl es - so for all mobile devices. On desktop it is not required.
|
Actually, OpenGL ES 2.0 says that non-power-of-2 textures are OK as well, just do not support mipmapping...
Mirek
|
|
|
Re: OpenGL texture issues [message #41176 is a reply to message #40719] |
Fri, 08 November 2013 15:06  |
raxvan
Messages: 60 Registered: December 2009
|
Member |
|
|
Hello,
In opengl/openglES(2.0+) there is almost no limitation on the dimension of the texures, only the maximum size and most mobile GPU's support 4096x4096 maximum size (desktops even more).
The power of 2 texture size is a limitation imposed by textures compossion, so if you want to have compressed textures you need power of 2 otherwise compression will not be possible.
PVRTC compression also requires for the textures to be square.
Other features such as mip mapping and swizzled textures will still not be possible without power of 2 textures.
Razvan.
92b48bf94855483bb4cec8bcc8c0c933
[Updated on: Fri, 08 November 2013 15:07] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sun May 04 01:25:37 CEST 2025
Total time taken to generate the page: 0.01097 seconds
|