🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.graphics.api.opengl
Article #25

Re: Update: Voodoo2 Texturing

#25
From: fungus
Date: Wed, 06 Sep 2000 13:08
50 lines
2584 bytes
Mathias Heyer wrote:
> 
> this code works on my riva128-card. The voodoo produced
> garbled results
>
>  glMatrixMode(GL_TEXTURE);
>  glLoadIdentity();
> 
> Now look at my "fix":
> 
>  glMatrixMode(GL_TEXTURE);
>  glLoadIdentity();
>  glTranslatef(0,0,0); //  this solved my problems!!!
> 
> Can someone explain, why this works???
> 

Ummm...because there's a bug in the driver....???



OK...here's what I think is happening:

Normally the texture matrix is inactive until you
call "glMatrixMode(GL_TEXTURE)". This enables the
texture matrix.

"glLoadIdentity()" doesn't do anything except set a flag
saying "matrix does nothing - don't transform the texture
coordinates", it doesn't actually alter the data in the
texture matrix. After calling glLoadIdentity() the matrix
contains uninitialized values

Somehow the driver is failing to check this flag, and
transforms your texture coordinates by these uninitialized
values, giving a garbage result.


When you do "glTranslatef(0,0,0);", the driver checks the
flag and chooses to do either a "loadMatrix()" or
"multMatrix()" (I'm making these names up) depending on
the state of the flag. In your case it does a loadMatrix()
with a translation matrix of (0,0,0). This is an identity
matrix so it fixes the problem.


-- 
<\___/>
/ O O \
\_____/  FTB.
Technical Details
Message-ID: <39B640B3.46AEA2C6@egg.chips.and.spam.com>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-east!sn-xit-uk!supernews.com!193.162.153.122.MISMATCH!news.tele.dk!193.190.198.17!newsfeeds.belnet.be!naxos.belnet.be!news.belnet.be!news.rediris.es!newsfeed.mad.ttd.net!telenews.teleline.es!not-for-mail
References: <8p2c8d$bu7$1@piggy.rz.tu-ilmenau.de> <8p5des$llf$1@piggy.rz.tu-ilmenau.de>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f65bb,460833b5201c327c
X-Google-Attributes: gidf65bb,public
X-Google-Thread: 100291,7a563ebca6466f90,start
X-Google-Attributes: gid100291,public
X-Google-ArrivalTime: 2000-09-06 06:07:17 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-east!sn-xit-uk!supernews.com!193.162.153.122.MISMATCH!news.tele.dk!193.190.198.17!newsfeeds.belnet.be!naxos.belnet.be!news.belnet.be!news.rediris.es!newsfeed.mad.ttd.net!telenews.teleline.es!not-for-mail
Message-ID: <39B640B3.46AEA2C6@egg.chips.and.spam.com>
From: fungus <spam@egg.chips.and.spam.com>
X-Mailer: Mozilla 4.7 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: comp.graphics.api.opengl,3dfx.opengl
Subject: Re: Update: Voodoo2 Texturing
References: <8p2c8d$bu7$1@piggy.rz.tu-ilmenau.de> <8p5des$llf$1@piggy.rz.tu-ilmenau.de>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 50
Date: Wed, 06 Sep 2000 13:08:59 GMT
NNTP-Posting-Host: 213.0.67.223
X-Complaints-To: usenet@teleline.es
X-Trace: telenews.teleline.es 968245739 213.0.67.223 (Wed, 06 Sep 2000 15:08:59 MET DST)
NNTP-Posting-Date: Wed, 06 Sep 2000 15:08:59 MET DST
Organization: Clientes_Teleline