From: Brian P. <br...@va...> - 2001-03-07 15:34:57
|
Andrew Richardson wrote: > > I can't rem if this was originaly posted here or on DRI but... > > If you flush the VB down into the driver (and card) then I have a question. > I want to show video using ogl as the renderer (cf glmovie from loki). So I > want to paste multiple textures onto muliple quads. Say I have two textures > and two quads, I want two texture units to do the texturing, one quad-texture > each. the code is like > > glClientActiveTextureARB ( GL_TEXTURE0_ARB ); You probably want glActiveTextureARB() here. glClientActiveTextureARB() is for selecting vertex array sets. > glTexture2D(/*texture 0*/); > glCallList(QUAD0); > > glClientActiveTextureARB ( GL_TEXTURE1_ARB ); > glTexture2D(/*texture 1*/); > glCallList(QUAD1); > > The second glTexture2D call will flush the VB, but to where? If there are any queued rendering commands, they'll get executed and retired. > Does the card > process all of texture/quad 0's stuff? If so I don't see how I can use both > texture units at the same time for texture procedures that don't share > verticies. Of course I may not be implementing the dual text-unit stuff > correctly but even if Im not the question still stands, what happens with > multi-texturing when the two (or more) units don't share verticies. I think you're confused about how multitexture works. Texture units don't know anything about vertices. Each vertex processed has N sets of texture coordinates associated with it- one set per texture unit. The application of texture environments is pipelined so all active units contribute to processing each fragment (pixel). I don't understand what you're trying to do. > Also how does Mesa deal with references to GL_TEXTURE~N~_ARB where ~N~ is > larger than the actual number of tex-units, Trying to address or enable ~N~ would cause an error and be a no-op. > does it map them to the texture > units that ARE present or is it in the ogl spec that it returns an error? You should read the spec. It's an error. -Brian |