Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GL_TEXTURE_2D on ATI 9600 and 9800



Hi,
a developer needs to call the command
    glActiveTexture(GL_TEXTURE1);
and after
    glActiveTexture(GL_TEXTURE0);
or
    glActiveTexture(GL_TEXTURE2);

in order to define more textures to combine together with the command
    glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE);

For example you can define the texture 0 then you define the texture 1 then
you mix them together in order to get a blend result or in order to get the
texture 1 with the alpha channel of the texture 0. This way you can get e.g.
a letter A shape (alpha channel of texture 0) with a texture of a tiger
(color channel of texture 0).

I my case I add a reflection effect on a previous defined texture.
But on my ATI 9800 defining a GL_TEXTURE_2D with the GL_TEXTURE1 works well
but on my ATI 9600 the GL_TEXTURE1 doesn't work. I have to use only
GL_TEXTURE0

Does anyone know why?


Best Regards
-- 
Lorenzo
email: email@hidden

> From: Gordon Erlebacher <email@hidden>
> Date: Tue, 16 Nov 2004 08:55:50 -0500
> To: Lorenzo <email@hidden>
> Subject: Re: GL_TEXTURE_2D on ATI 9600 and 9800
> 
> I never saw the glActiveTexture command. Ever. It is not in the man
> pages of my powerbook. Why do you need it at all?
> 
> Quoting Lorenzo <email@hidden>:
> 
>> Hi,
>> GL_TEXTURE1 doesn't work on my ATI 9600, but it works on my ATI 9800.
>> The code is just the following:
>> 
>>     glActiveTexture(GL_TEXTURE1);
>>     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);
>>     glBindTexture(GL_TEXTURE_2D, texture[0]);
>>     // draw a QUAD...
>> 
>> GL_TEXTURE1 works on my ATI 9800 but it doesn't work on my ATI 9600.
>> In order to make it work on my ATI 9600 I have to use the texture zero.
>>     glActiveTexture(GL_TEXTURE0);
>>    
>> Does anyone know why?
>> 
>> 
>> Best Regards
>> -- 
>> Lorenzo
>> email: email@hidden
>> 
>>> From: Gordon Erlebacher <email@hidden>
>>> Date: Tue, 16 Nov 2004 07:12:09 -0500
>>> To: Lorenzo <email@hidden>
>>> Subject: Re: GL_TEXTURE_2D on ATI 9600 and 9800
>>> 
>>> I am having various types of problems with pbuffers, shaders and glut,
>>> so this might be
>>> related (I have a Radeon 9
>>> never stated? Is this the glMultiTexture command? Or are they others?
>>> Could you send
>>> a code fragment with GL_TEXTURE0 included to see exactly what you are
>>> doing? Thanks.
>>> 
>>>  Gordon
>>> 
>>> 
>>> 600). What command does one use GL_TEXTURE0 in?) You Lorenzo wrote:
>>> 
>>>> Hi,
>>>> I would like to ask a question about ATI 9600 and 9800.
>>>> On my 9800 I can see a Texture2D calling GL_TEXTURE0 or 1 or 2 or 3...
>> and
>>>> it works well.
>>>> On my ATI 9600 I can see a Texture2D only if I call GL_TEXTURE0...
>>>> Why?
>>>> 
>>>> In detail
>>>> ----------
>>>> 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
>>>>  
>>>> 
>>> 
>> 
>> 
> 
> 
> -- 
> Gordon Erlebacher
> 489 Dirac Science Library
> Florida State University
> Tallahassee, FL 32309
> Tel: (850) 644-0186
> FAX: (850) 644-0098

 _______________________________________________
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



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.