Seems the texture definition is not complete.
What I’m missing is texture sampling mode.
In OpenGL the default min. filter is mipmap
and your code doesnt load all mipmap levels.
@Jackis: If texture is not complete then the texture is effectively disabled. It means the polygon is rendered without a texture. In most cases the result is white.
@mfort: AFAIK, if texture is not complete, result of texture look-up is (0,0,0,1). It is said so in FP specification. Maybe, it is not so for fixed pipeline, should see.
@brinck, @mfort
Escuse me, I was mistaken - with fixed pipeline uncomplete texture lookups are abandonned, you are totally right. I forgot about that - didn’t use FFP for years. I was guided by ARB_fragment_program specification, where it is said
(23) What is the result of a sample from an incomplete texture?
RESOLVED: The result of a sample from an incomplete texture is the constant vector (0,0,0,1). The benefit of defining the result to be a constant is that broken apps are guaranteed to generate unexpected (black) results from their bad samples.
@knackered
As people say: “If you are so clever - so why aren’t you a Bentley car owner yet?”