Jump to content

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

D3D style Ambient in OpenGL

4: Adsense

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   

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.

#2 grady   Members   

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   

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.