Issue with glTexImage2D?
I am not sure why but when I use glTexImage2D I get white textures when I use gluBuild2DMipmaps everything is fine?
Also my glTexSubImage doesn't work either so I am under the assumption that it only works with glTexSubImage2D and not gluBuild2DMipmaps?
thanks
Code:
glTexImage2D(GL_TEXTURE_2D, 0, imageType, imageWidth, imageHeight, 0, imageType, GL_UNSIGNED_BYTE, imageData);Also my glTexSubImage doesn't work either so I am under the assumption that it only works with glTexSubImage2D and not gluBuild2DMipmaps?
thanks
Yeah Apple corrected it so that it's *proper* now. You need to specify glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR ) or whatever filtering you want to avoid the white textures.
Ugh I forgot I had GL_LINEAR_MIPMAP_LINEAR in as a parameter....
been awhile since I have looked at my texture loading code....
thanks
been awhile since I have looked at my texture loading code....
thanks
Now with the images loading correctly I have a new problem with glTexImage2D that I dont' have with gluBuild2DMipmaps. If I use gluBuild2DMipmaps all my textures load correctly and all are shown, I am using multitexturing and have 7 texture units at once. When I use glTexImage2D only the 4th texture unit shows up and the first 3 are not shown? I am using a fragment program and not sure what would be causing this? Thanks
Do your textures have power-of-two dimensions? gluBuild2DMipmaps will always rescale your texture data to POT sizes, so it works with all texture targets. With glTexImage you are free to specify any size, which may or may not work depending which target you are using.
arekkusu Wrote:Do your textures have power-of-two dimensions? gluBuild2DMipmaps will always rescale your texture data to POT sizes, so it works with all texture targets. With glTexImage you are free to specify any size, which may or may not work depending which target you are using.
Yes they are POW RGBA textures...
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| how to use Glubuild2DMipmaps, GlTexImage2D and glTexParameter | 007gamer | 1 | 3,826 |
Jan 31, 2007 04:36 AM Last Post: OneSadCookie |
|
| glTexImage2D bug? | Skorche | 1 | 2,680 |
Apr 12, 2005 01:28 AM Last Post: OneSadCookie |
|
| glTexImage2D formats clarification | WhatMeWorry | 1 | 3,668 |
Nov 17, 2004 01:31 AM Last Post: arekkusu |
|
| glTexImage2D() and single colour component textures | sealfin | 3 | 3,937 |
Aug 10, 2004 04:45 AM Last Post: arekkusu |
|
| glTexImage2D() & memory understanding... | sealfin | 4 | 3,209 |
Aug 7, 2004 03:15 PM Last Post: OneSadCookie |
|

