nV News Forums

 
 

nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA Linux (http://www.nvnews.net/vbulletin/forumdisplay.php?f=14)
-   -   Driver bug: glTexCoord() != glMultiTexCoord(GL_TEXTURE0)? (http://www.nvnews.net/vbulletin/showthread.php?t=71270)

sfink 06-05-06 03:49 PM

Driver bug: glTexCoord() != glMultiTexCoord(GL_TEXTURE0)?
 
1 Attachment(s)
I have a minimal test case that behaves different depending on whether I use glTexCoord() or glMultiTexCoord(GL_TEXTURE0). As I read the documentation, these should be identical. I don't actually care about that specific problem, but what I really want is to use glMultiTexCoord(GL_TEXTURE2).

The attached test case ('make run' to see it) displays two quads, one using glTexCoord, the other glMultiTexCoord. The glTexCoord one correctly shows both the s and t texture coordinates varying from 0 to 1. The glMultiTexCoord one shows t stuck at zero, and s going from 0 to 2. Or something. I would be curious to see if other people see the same output. I have filed a bug, but haven't heard back yet.

Oddly, this forum won't accept the file as a .tar.gz, but will accept a .zip.

This happens on two different computers, both with GeForce FX 5700s, and one using driver 7676, the other 8178.

netllama 06-05-06 03:53 PM

Re: Driver bug: glTexCoord() != glMultiTexCoord(GL_TEXTURE0)?
 
In the bug report in your tarball, you're running the 1.0-8178 driver, however 1.0-8762 is the latest version. Does this reproduce with 1.0-8762 as well?

Thanks,
-Lonni

sfink 06-05-06 04:21 PM

Re: Driver bug: glTexCoord() != glMultiTexCoord(GL_TEXTURE0)?
 
1 Attachment(s)
Quote:

Originally Posted by netllama
In the bug report in your tarball, you're running the 1.0-8178 driver, however 1.0-8762 is the latest version. Does this reproduce with 1.0-8762 as well?

Yes.

netllama 06-05-06 04:31 PM

Re: Driver bug: glTexCoord() != glMultiTexCoord(GL_TEXTURE0)?
 
Just so that I'm sure I understand, your expected behavior is to have both squares render all green in their upper left corner and all red in the lower right corner (with a transition between)?

Thanks,
Lonni

sfink 06-05-06 04:52 PM

Re: Driver bug: glTexCoord() != glMultiTexCoord(GL_TEXTURE0)?
 
Oops. Sorry, that last run was with 8756, not 8762. And it'll take me a little while to try the latest, because my hard drive is choosing this time to die.

Quote:

Originally Posted by netllama
Just so that I'm sure I understand, your expected behavior is to have both squares render all green in their upper left corner and all red in the lower right corner (with a transition between)?

Correct. Both should look the same as the one in the upper right. I expect both images to look like

http://0xdeadbeef.net/~sfink/uploads/good.png

netllama 06-05-06 05:15 PM

Re: Driver bug: glTexCoord() != glMultiTexCoord(GL_TEXTURE0)?
 
Thanks. I've reproduced this behavior, and opened bug 232676.

sfink 06-05-06 06:27 PM

Re: Driver bug: glTexCoord() != glMultiTexCoord(GL_TEXTURE0)?
 
1 Attachment(s)
I was attempting to work around the problem in my original program by switching to vertex attributes, but I can't get them to work either. I'm attaching a test case, in case it's related to the same problem. However, I have never used vertex attributes before, so I don't know for sure whether I'm doing them correctly.

The expected output of this test program is the same as the last, except I've set blue to 0.3 everywhere (because the output I'm getting is all black, so I wanted to be sure I wasn't doing something *really* stupid.) The actual output is a dark blue square, meaning that the vertex attribute is getting read as zero everywhere.

sfink 07-12-06 01:49 AM

Re: Driver bug: glTexCoord() != glMultiTexCoord(GL_TEXTURE0)?
 
It was the same problem.

The problem is in the way I am including the GL headers. I include glut.h first, which includes gl.h with no particular flags, and then later I include gl.h and glext.h. If I switch the order, so that I define GL_GLEXT_PROTOTYPES and then include gl.h and only then include glut.h, everything works fine.

Rather nasty error behavior -- almost everything appears to work fine, including compiling shaders and running with them. But some things silently and uncomplainingly do the wrong thing.

Someday, I'll slog through the preprocessor swamp and figure out why.

sfink 07-15-06 04:38 PM

Re: Driver bug: glTexCoord() != glMultiTexCoord(GL_TEXTURE0)?
 
Quote:

Originally Posted by sfink
Rather nasty error behavior -- almost everything appears to work fine, including compiling shaders and running with them. But some things silently and uncomplainingly do the wrong thing.

Someday, I'll slog through the preprocessor swamp and figure out why.

I am an idiot. No need to slog through anything; the reason is obvious. I was ignoring warning messages about various functions not being defined -- functions with floating point arguments. In my code, I was passing in things like 1 and 0, which are integers in the absence of a prototype.

Now I have to return to my actual code to see what's going wrong, since my stupid stripped-down test case is invalid and irrelevant.


All times are GMT -5. The time now is 02:12 PM.

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.