Hi,
I have just read your discussions about MAX_TEXTURES and I would like to ask
a question about ATI 9600 and 9800 and my G4 and G5 machines.
On my PowerBook G4 1GHz with an ATI Radeon 9600 (GL_MAX_TEXTURE_UNITS = 6,
64 RAM) I can see my texture I made with
glEnable(GL_TEXTURE_2D);
glEnable(GL_TEXTURE_GEN_S);
glEnable(GL_TEXTURE_GEN_T);
glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);
glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);
only if I call GL_TEXTURE0. In facts when I set GL_TEXTURE1, I see garbage.
On my G5 dual 2GHz with ATI Radeon 9800 (GL_MAX_TEXTURE_UNITS = 8, 256 RAM),
my same application can quite use the same texture settings with
GL_TEXTURE0, 1, 2 and 3... without any problem. And here I even use multiple
textures very well.
I don't want to believe that my ATI 9600 can run one GL_TEXTURE_2D only, and
just the number 0 only, even because GL_MAX_TEXTURE_UNITS return 6 and even
because after calling glActiveTexture(GL_TEXTURE1) the call glGetError()
returns 0.
So, where should I check for my error?
Do you think I am missing something?
Thank you for any help you could provide me.
Best Regards
--
Lorenzo
email: email@hidden
> From: email@hidden
> Reply-To: email@hidden
> Date: Thu, 26 Feb 2004 13:02:09 -0800
> To: email@hidden
> Subject: mac-opengl digest, Vol 3 #847 - 11 msgs
>
> Message: 2
> Cc: Jeremy Bell <email@hidden>, email@hidden
> From: Jeremy Sandmel <email@hidden>
> Subject: Re: vertex program and multiple textures
> Date: Thu, 26 Feb 2004 11:48:16 -0500
> To: Keith Bauer <email@hidden>
>
> On Feb 12, 2004, at 7:23 PM, Keith Bauer wrote:
>
>>> However, can I write a single vertex program that handles any number
>>> of textures between 1-4? For example, if I just assumed there were 4
>>> texture units and passed the texture coordinates through, would
>>> OpenGL simply ignore them if there really was only 1? Here is the
>>> program so far, which only uses 1 texture unit.
>>
>> That's right. Just pass through as many as you like; the unused ones
>> will be ignored.\
>
> Hmmmm, if this is true right now, I don't think this is supposed to be
> so.
>
> Depending on how you are using the texture coordinates in the fragment
> processing, the underlying hardware might not support the extra tex
> coords. The only option that point would be to fall back to a
> software-based rasterization path.
>
> However, note that the ARB vertex program specification
> http://oss.sgi.com/projects/ogl-sample/registry/ARB/vertex_program.txt
> defines the legal grammar to use within the shading language and it
> defines the <vtxAttribItem> as:
>
> <vtxAttribItem> ::= "position"
> | "weight" <vtxOptWeightNum>
> | "normal"
> | "color" <optColorType>
> | "fogcoord"
> | "texcoord" <optTexCoordNum>
>
> and a <optTexCoordNum> as:
>
> <optTexCoordNum> ::= ""
> | "[" <texCoordNum> "]"
>
> and a <texCoordNum> as:
>
> <texCoordNum> ::= <integer> from 0 to MAX_TEXTURE_UNITS-1
>
> So, according to the specification, you should only be able to legally
> refer to texcoord units 0 through (GL_MAX_TEXTURE_UNITS -1).
>
> The value of GL_MAX_TEXTURE_UNITS is implementation dependent.
>
> For ATI hardware, the value of GL_MAX_TEXTURE_UNITS is:
>
> 2: Rage 128, Rage 128 Pro
> 3: Radeon, Radeon 7000, Radeon 7500
> 6: Radeon 8500, Radeon 9000
> 8: Radeon 9600, Radeon 9700, Radeon 9800
>
> So I don't think you should rely on the behavior of "unused" tex coords
> being ignored.
> An application is responsible for querying the value of
> GL_MAX_TEXTURE_UNITS before trying to refer to texture coordinates
> within the vertex or fragment programs.
>
> It sounds like a possible bug that programs which access more than
> GL_MAX_TEXTURE_UNITS are not rejected as invalid.
>
> - Jeremy
>
> ATI Research, Inc.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/email@hidden
This email sent to email@hidden