Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Texuring


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
10 replies to this topic

#1 Ertai   Members   -  Reputation: 122

Like
Likes
Like

Posted 25 September 2001 - 04:22 AM

I finally was able to draw a textured quad. don''t laugh .. well .. i generated a texture that has RGB value 255,0,0 all over ... but the quad appeares in some kind of dark shade of red ... like there is some dark lighting applied or something ... can anyone tell me what could be the problem ?

Sponsor:

#2 promo   Members   -  Reputation: 122

Like
Likes
Like

Posted 25 September 2001 - 04:52 AM

As you probably suspect, there is no such thing as dark lighting.
Instead, OpenGL defaults to pretty dim ambient lighting.
you can change it either by calling glLightModeli and setting the diffuse+ambient to (1,1,1) - bright light, or enable a new light source which will be brighter.


--------------------
so, what you''''re saying is, that the mushroom spores were brought in from outer space by - who?? -cosmosis

#3 Ertai   Members   -  Reputation: 122

Like
Likes
Like

Posted 25 September 2001 - 06:20 AM

Sorry, isn''t there such a thing as no lighting ?

#4 GKW   Members   -  Reputation: 200

Like
Likes
Like

Posted 25 September 2001 - 06:25 AM

glDisable( GL_LIGHTING )

The fanatic is incorruptible: if he kills for an idea, he can just as well get himself killed for one; in either case, tyrant or martyr, he is a monster.
--EM Cioran

Opere Citato

#5 Ertai   Members   -  Reputation: 122

Like
Likes
Like

Posted 25 September 2001 - 07:51 AM

Yeah, i tried that, but it doesn''t seem to work ...
the darkness of the texture does seem to depent on glColor() though ...

#6 GKW   Members   -  Reputation: 200

Like
Likes
Like

Posted 25 September 2001 - 09:17 AM

glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE )

The fanatic is incorruptible: if he kills for an idea, he can just as well get himself killed for one; in either case, tyrant or martyr, he is a monster.
--EM Cioran

Opere Citato

#7 Ertai   Members   -  Reputation: 122

Like
Likes
Like

Posted 26 September 2001 - 03:47 AM

Hey! It works! ehm, what did I just do ?

btw, i will be wanting to apply lighting to my texture .. is that still possible when i called this line ? i want to use vertex lighting ...

#8 Ertai   Members   -  Reputation: 122

Like
Likes
Like

Posted 26 September 2001 - 03:52 AM

Actually i have some more questions:

I know how to use display lists now, i heard they are used to achieve speed increase, is there some tut on how and where to use them ? you know, to benefit the most from ''em

Is there some overview of GLState variables, parameters, whatever ... because there are a whole lot of things like Texture Environment i have never heard of .. I just can''t really get a overview of the opengl system ...

#9 GKW   Members   -  Reputation: 200

Like
Likes
Like

Posted 26 September 2001 - 05:38 AM

That call controls how you texture is combined with the color-fragment. You were either blending or modulating the texture with the color. I tried to find out what the default is but couldn''t find it. THere are 4 modes: GL_MODULATE, GL_REPLACE, GL_DECAL, GL_BLEND. GL_REPLACE discards the fragment color and just uses the texture to color the polygon. You can''t use that mode for lighing since the lighting will be discarded. What you will want to do is render you polygons with what ever lighting you require and then use the same call with GL_MODULATE. I think the opengl super bible and the old edition of the red book are online so look them up on google. I recommend buying the red book but you might want to wait until the new 1.3 red book comes ouyt.

The fanatic is incorruptible: if he kills for an idea, he can just as well get himself killed for one; in either case, tyrant or martyr, he is a monster.
--EM Cioran

Opere Citato

#10 Ertai   Members   -  Reputation: 122

Like
Likes
Like

Posted 26 September 2001 - 06:03 AM

Ahaaaa, i get it! and it makes sense too !
so, i also know how to do vertex lighting ... great

there is another thing i don''t get, I know about the GL_PROJECTION, GL_MODELVIEW and GL_TEXTURE stacks .. i know how to select them, how to manipulate the current texture of the selected stack and everything ... but i don''t know what they are doing and how and all ...
i know the GL_MODELVIEW currect matrix is used to render a model to the right position on the screen, and i even know how to do this, using glTranslate and glRotate but how is the matrix used to generate a Sreen.x and Screen.y from a World.x World.y and World.z ?

#11 GKW   Members   -  Reputation: 200

Like
Likes
Like

Posted 26 September 2001 - 06:43 AM

Read this, they will do a better job of explaining that I can.

OpenGL Redbook



The fanatic is incorruptible: if he kills for an idea, he can just as well get himself killed for one; in either case, tyrant or martyr, he is a monster.
--EM Cioran

Opere Citato




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