Multitexturing with GL_ARB_multitexture

I am getting an “invalid operation” message error from my OGL error checking code whenever I use more than 2 textures–specifically when I use the glActiveTextureARB(GL_TEXTURE2_ARB) command. All three texture are there and seem to be working fine–why am I still getting these error messages?

Originally posted by nebrown1:
I am getting an “invalid operation” message error from my OGL error checking code whenever I use more than 2 textures–specifically when I use the glActiveTextureARB(GL_TEXTURE2_ARB) command. All three texture are there and seem to be working fine–why am I still getting these error messages?

You have to check how much texture units you can use:
GLint maxUnits = 0;
glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &maxUnits);

You can use at most “maxUnits” texture Units!

Kosta

Thanks for the help. Sure enough, I only have 2 textures available. Why is that? Is it because of my video card, OpenGL version, or what?

mainly it depends on the card.
multitexturing, to be fast and efficent, has to be performed in hardware.
the tnt/tnt2 has a 2-stage texture pipeline, so it can at most perform a blend between two textures in a single pass.
if i’m not wrong, the nv10 (geforce) has a 4-stage pipeline.

however, opengl supports at most 32 textures, ranging from unit 0 to unit 31.

Dolo//\ightY

GeForce only has 2 texture units as well. I don’t know of any hardware that supports more than 2 units right now. Interesting question, though.

good to know!
creative said something like “4-pixel pipeline…” and i thought it meant a 4-unit multitexturing capability, but i didn’t took the time to test…

Dolo//\ightY

[This message has been edited by dmy (edited 03-16-2000).]

The Radeon has 3 texture units. The Kryo and Kryo 2 can multitexture with as many as 8 textures (although they only have 2 units) - don’t know how many they allow in OpenGL, though. I think that the pixel shaders on the GeForce3 can allow for quite a few texture stages, but again, I don’t know if this is implemented directly (or only through NV extensions).

This is REALLY off topic but the Flipper supports 8 texture units at once in hardware AND its rumored to support OpenGL (thats a very loose rumor at this point though). For those that are unaware, the Flipper is the GameCube’s GPU…

[This message has been edited by BwB (edited 03-19-2001).]

Cass, Have you ever seen an mpeg of Nvidia Geforce II GTS promo featuring Bungie’s Halo?

In it it states, the geforce 2 can use 8 textures at once??

thought this was a bit mad, as doesn’t Geforce 3 only have 4 texture units?

bizarre…

Nutty.

all have 2 textures in one pas, radeon has 3, gf3 has 4

this is what i know, perhaps there is an other board wich has more… or less ( voodoo1 didnt had multitexturing, had it? )

What nVidia means when they say “4 pixel pipeline” is that the GeForce2 can draw 4 pixels at once, each with 2 textures.

I think the GeForce256 can only draw 2 pixels while multitexturing, and 4 without. Not sure about that one, though.

j

is this so important? what you need to know is how many textures you can use ( and, for example how many passes the register combiners can do, when u want to use this nvextension etc ), how it works then if it draws 4 or 8 pixels per pass is not truly important for YOU to use them, cause you cant all you get from more pixels per pass is more speed, thats nice that this is so, but you dont need to worry bout this 2 textures is what you can use for today if you dont want to develop gf3 or radeon only ( you can set up special textur combinations for them if you want, that would be nice for every one and motivates all to buy a gf3 or an ati but dont miss the “older” gpus… )

Originally posted by Nutty:
[b]Cass, Have you ever seen an mpeg of Nvidia Geforce II GTS promo featuring Bungie’s Halo?

In it it states, the geforce 2 can use 8 textures at once??[/b]

I remember the video you are talking about but I dont remember the exact wording(do you know where I can get a copy from to refresh my memory). As I recall, nvidia was advertising something “like” 7 or 8 textures, but I dont think their exact wording was “texture”, rather it was “material” or something like that. What they were referring to are the register combiners inputs.
Tex0
Tex1
Primary Color
Secondary Colo
Fog Color
Constant Color 0
Constant Color 1

So that makes 7 inputs that can be combined together per-pixel in a single pass.

Or perhaps they were trying to say that Halo uses up to 8 textures per poly? Like I said, my memory of that video is kinda fuzzy.

Originally posted by j:
[b]What nVidia means when they say “4 pixel pipeline” is that the GeForce2 can draw 4 pixels at once, each with 2 textures.

I think the GeForce256 can only draw 2 pixels while multitexturing, and 4 without. Not sure about that one, though.

j[/b]

The GF2MX has the 2 pipelines with 2 textures per pixel, but as for GF1 i don’t remember well.

Little correction :
Kyro is a tile based renderer using Raytracing internally (sort of).
It supports 8 textures in a single pass (not single clock), however current drivers only reports 4 textures units.
(Who needs more for now ?)

Flipper is also a tile base renderer and is rumored to support 8 textures in a single pass (not single clock).

I have the video here it’s 25 meg though…
22 meg zipped…

I could stick it up somewhere if you want it?

The exact words are

“The Geforce 2 GTS has support for 8 textures at full speed”

Originally posted by Nutty:
I have the video … I could stick it up somewhere if you want it?

No, thats quite alright, as long as you pulled the exact wording out, but thanks anyway.

[b]The exact words are

“The Geforce 2 GTS has support for 8 textures at full speed”
[/b]

Now, to examine that phrase carefully…depending on the internal architecture of the chip, that phrase MAY be 100% accurate. The chip has 4 dual texture pipelines. Now, as long as the card is designed so that each pipeline can work with different textures than the other 3 pipelines, then YES, there is support for 8 simultaneous textures. Misleading? YES! Incorrect? NO!

However, if the chip is set up so that each of the 4 pipelines needs to work in unison, sharing the same 2 texture units, then yes, this would be an incorrect statement, but I DONT think this is how the chip works internally (though I have no real way of knowing).

A surprise - I thought GeForce 3 and 4 (not MX), had 4 texture units - so you could bind and combine 4 textures at once!??

Oops - forgiveness please ladies - this thread is a little out of date

Originally posted by BwB:
[b]This is REALLY off topic but the Flipper supports 8 texture units at once in hardware AND its rumored to support OpenGL (thats a very loose rumor at this point though). For those that are unaware, the Flipper is the GameCube’s GPU…

[This message has been edited by BwB (edited 03-19-2001).][/b]

Game Cube does not use OpenGL, but what does is very simular to OpenGL. It is very striaght forward to convert OpenGL commands to Game Cube graphics commands.