Red Book Clarifications

Member
Posts: 321
Joined: 2004.10
Post: #1
Chapter 9 - Texture Mapping says:

glTexEnv()...param can be GL_DECAL, GL_MODULATE, or GL_BLEND, to specify how texture values are to be combined with the color values of the fragment being processed.

What exactly is "the fragment being processed". Is it the object being defined with the glVertex3f() commands? And if so, what are it's color values?

For instance, I typically have something like the following.

Code:
glBegin(GL_POLYGON);
  glTexCoord2f(0.0, 0.0); glVertex3f(-2.0, -1.0, 0.0);    
  glTexCoord2f(0.0, 3.0); glVertex3f(-2.0, 1.0, 0.0);
  glTexCoord2f(3.0, 3.0); glVertex3f(0.0, 1.0, 0.0);
  glTexCoord2f(3.0, 0.0); glVertex3f(0.0, -1.0, 0.0);
glEnd();


To my mind I'm mapping the current texture to a bland skeleton like framework. Devoid of any inherent color.

Is there any gaps or flaws in my reasoning?

thanks.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
you can think of a fragment as being a pixel.
Quote this message in a reply
Member
Posts: 321
Joined: 2004.10
Post: #3
Ok. Thanks. So paraphrasing above: "the texel is combined with the color values of the pixel being processed". I take it that this pixel is already stored in the framebuffer?

But how is glTexEnv() different from just blending -glBlendFunc()- in general? In Chapter 6 on blending, it says "When blending is enabled, the alpha value is often used to combine the color value of the fragment being processed with that of a pixel already stored in the frambuffer..." Isn't that semantically identical to the texture blending quote above?

Sorry to be so dense.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #4
That's the major difference between a fragment and a pixel, is that a fragment is not in the framebuffer Rasp
Quote this message in a reply
Post Reply