Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


D3D style Ambient in OpenGL


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

#1 stefu   Members   -  Reputation: 120

Like
Likes
Like

Posted 16 July 2001 - 10:54 PM

Hi, In D3D you can set pd3dDevice->SetRenderState(D3DRS_AMBIENT,(DWORD)D3DXCOLOR(0.5,0.5,0.5,1.0)). What is corresponding in OpenGL? I know I can set glLightfv(GL_LIGHT0,GL_AMBIENT,LightAmbient); but I think that corresponds to the Ambient in D3DLIGHT8 (pd3dDevice->SetLight(0,&light)). I need to know it for my D3D/OGL wrapper.

Sponsor:

#2 grady   Members   -  Reputation: 122

Like
Likes
Like

Posted 16 July 2001 - 11:42 PM

Well, I don''t know what this does pd3dDevice->SetRenderState(D3DRS_AMBIENT,(DWORD)D3DXCOLOR(0.5,0.5,0.5,1.0));

maybe its the same as this

GLfloat ambient_light[] = {1.0f, 0.5f, 1.0f, 1.0f};
glLightModelfv(GL_LIGHT_MODEL_AMBIENT, ambient_light);

#3 stefu   Members   -  Reputation: 120

Like
Likes
Like

Posted 17 July 2001 - 01:51 AM

Oops, it was that simple. Hope it does the same. Thanks.




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