Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


NeHe: glTexCoord2d


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
6 replies to this topic

#1 vincoof   Members   -  Reputation: 514

Like
Likes
Like

Posted 24 September 2002 - 09:02 PM

NeHe sent in the following question : Does anyone know what's up with glTexCoord2d? Seems it should be supported on all cards, but the majority of low end cards I tested displayed nothing but crap, even with updated drivers. [edited by - vincoof on September 25, 2002 4:10:18 AM]

Sponsor:

#2 Crispy   Members   -  Reputation: 556

Like
Likes
Like

Posted 25 September 2002 - 01:32 AM

I know this doesn''t answer your question, but why would you/NeHe want to use the double version of glTexCoord? It seems like a waste of valuable processing time as most of the operations you do don''t require any more precision than floating point has to offer. Will test glTexCoord2d later on my gpu back home and try to further understand the problem.

Crispy

#3 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 25 September 2002 - 01:48 AM

I thought glTexCoord2d() was in "decimal" (aka integer) numbers.

And no, it''s YOUR CODE that''s at fault here.

#4 vincoof   Members   -  Reputation: 514

Like
Likes
Like

Posted 25 September 2002 - 01:58 AM

Crispy: just as you''ve written, "most of the operations you do don''t require any more precision than floating point has to offer", which means than *sometimes* we may need more precision.

And it''s not a waste of time on some architecture, because if coordinates are treated as doubles in graphics processor, then it''s slower to send floats because the time required to convert the float into double is longer than the time required to send the double into the pipeline.

#5 Prosper/LOADED   Members   -  Reputation: 100

Like
Likes
Like

Posted 25 September 2002 - 02:01 AM

From the MSDN :

quote:

void glTexCoord2d(
GLdouble s,
GLdouble t
);

void glTexCoord2f(
GLfloat s,
GLfloat t
);

void glTexCoord2i(
GLint s,
GLint t
);

void glTexCoord2s(
GLshort s,
GLshort t
);



So, anonymous poster was wrong.

Back to your problem : perhaps that vendors haven't implemented it because it's pretty useless (at least for most applications). Even if you use a huge texture, you're able to access one precise texel with floats.

Edit (just saw your reply) : even if it can be usefull, some programmers are just lazy bastards and don't care for the standard, thus providing incomplete drivers. I've experienced quite the same problem as you in the past (not with glTexCoord though) and it was a pain in the ass.

[edited by - Prosper/LOADED on September 25, 2002 9:06:01 AM]

#6 vincoof   Members   -  Reputation: 514

Like
Likes
Like

Posted 29 September 2002 - 08:08 PM

I mailed NeHe and he replied that he had problems with "Older TNT, older NON detonator driver, most ATI cards (older), etc."

I'm assuming that's a nothing more than a driver issue. Not alot we can do, except reporting the bug to concerned companies...

[edited by - vincoof on September 30, 2002 3:12:03 AM]

#7 NeHe   GDNet+   -  Reputation: 379

Like
Likes
Like

Posted 03 October 2002 - 04:19 PM

The problem occurs with 2i as well... the reason to use it is to make mapping specific parts of a texture easier, and the code nice to look at... would you rather see...

glTexCoord2f(0.0f, 0.12109375f) or
glTexCoord2i(0, 31)

Not a big deal, just a bug or driver issue I noticed on some cards.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS