|
From: Dair G. <da...@re...> - 2004-06-16 17:47:21
|
=46rank C wrote: >On a related note: Is there ever a good reason to bind a NULL texture?=20 It shouldn't really matter - as long as texturing is turned off at the same time, even if something was bound it would never apply. >I've gained some speed by removing all NULL binds and wrapping=20 >glBindTexture in a GL_Util*** routine that compares the last texture to=20 >the requested one, avoiding redundant uploads. The texture won't be uploaded when it's bound: unless it got bumped out of vram by something else since the last time it was bound, it'll still be there. >This helps the transparent pass quite a bit since it often >binds/unbinds the same texture over and over (for every triangle) when >drawing a mostly self-sorted mesh. I guess it removes the need to call GL, but I would expect glBindTexture to not do anything if the same object is already bound - although I suppose it could be implementation dependent (perhaps some drivers do no checking at all: seems unlikely though, checking for a no-change is such an obvious thing to do if you were writing glBindTexture). -dair ___________________________________________________ mailto:dair+refnum.com http://www.refnum.com/ |