cant map textures to my terrain!

Started by
16 comments, last by _Titan_ 21 years, 10 months ago
nah, i figured it out, i used a function i found in one of the tutorials. I dont see how it differs from what i had, but it works so who cares.
Advertisement
quote:Original post by _Titan_
nah, i figured it out, i used a function i found in one of the tutorials. I dont see how it differs from what i had, but it works so who cares.


But do you understand why it works? If I were you, I''d be spending a little time analyzing the difference between my code and the "function I found", so that I''d know why it works correctly.

AP: I''m also curious why glTexCoord2f would make a difference from glTexCoord2d?

----------------Amusing quote deleted at request of owner
yakuza :

glTexCoord2d takes as input only integers, whereas glTexCoord2f takes floats ...

SO :
if you do glTexCoord2d(x/150, y/150) it is equivalent to glTexCoord2d(0, 0) if x and y are inferior to 150 and glTexCoord2d(something>=1, something>=1) if x and y are superior to 150

if you do glTexCoord2f(x/150, y/150) x/150 is a number between 0 and 1 if x<=150

that''s all

now re-read previous posts and all will become clear (if you''re smart enough)
So that''s probably what he was doing wrong...

Thanks AP, I''m not sure where my brain was on that one.
----------------Amusing quote deleted at request of owner
I did take the time to understand it, and i do understand now. I understood before what i needed to do, but was confused on exact code on doing it...

Anyways, Thanks for the help.
quote:Original post by Anonymous Poster
yakuza :

glTexCoord2d takes as input only integers, whereas glTexCoord2f takes floats ...

SO :
if you do glTexCoord2d(x/150, y/150) it is equivalent to glTexCoord2d(0, 0) if x and y are inferior to 150 and glTexCoord2d(something>=1, something>=1) if x and y are superior to 150

if you do glTexCoord2f(x/150, y/150) x/150 is a number between 0 and 1 if x<=150

that''s all

now re-read previous posts and all will become clear (if you''re smart enough)



hmmm... since when is an double an integer?
glTexCoord2d Accepts GLdouble
glTexCoord2f Accepts GLfloat

glTexCoord2i Accepts GLint <-- this would be the one you are babling about....

the difference between double and float is that a double uses double precision (find a programmers guide, or a math guru :D if you want to know what that means)


Oh and I just love the
quote: (if you''re smart enough)
bit
Why blatantly try to confuse people?

Haha, you tricked me into showing I''m a novice programmer. I was confused, because in my mind there shouldn''t be a difference in behavior when using doubles or floats for the texture coords. Then you start "babling" about doubles being integers, and I didn''t take a second thought to it ''cause I''ve seen you post much more advanced topics, so I figured you knew what the hell you were talking about.

In my opinion, misleading newbies isn''t cool, but whatever makes you happy...

---------------------------

I hate have to split some cost of something between three people when you are out to buy something and not being able to do the split correctly due to our inferior base-10 system. -- felonius
----------------Amusing quote deleted at request of owner
Thougth Id better register to clear a few things up...

quote:Original post by yakuza
Why blatantly try to confuse people?


Ehrm... you couldn''t know it but :

Im not the same "anonymous poster" that did the original posts - I just thougt I''d bitch slap him for playing smart and not knowing what he was talking about

quote:
In my opinion, misleading newbies isn''t cool, but whatever makes you happy...

Wich was why thought i''d better corret his misinformation...


/Please excuse my bad spelling - My native language is binary not english

/Take my advice - I don''''t use it...
/Please excuse my bad spelling - My native language is binary not english|Visit meTake my advice - I don''t use it...

This topic is closed to new replies.

Advertisement