PDA

View Full Version : How to replace those DirectX functions by OpenGL



beachboy1976
03-28-2002, 06:53 PM
Hi,
I need to replace some DirectX functions by using OpenGL. Since I don't know anything about DirectX, I have very hard time with them.
m_device->SetTexture(0, NULL);
m_device->LightEnable(0,True);
m_device->SetRenderState(D3DRS_AMBIENT, 0x00202020);
m_device->SetStreamSource(0, m_buffer, sizeof(buffer));
m_device->SetVertexShader(SW3_FVF);
m_device->SetIndices(m_buffer, 0L);
m_device->DrawIndexPrimitive(D3DPT_TRIANGLELIST, 0, m_points, 0, m_itris);

I built a vertex array to replace m_buffer and I built a index array also. Other than that, I really don't understand what are SetStreamSource,SetVertexShader,SetIndices,DrawInd exPrimitive for.
Please help me out with those functions.
Thanks

Bob
03-29-2002, 02:57 AM
Have you tried the DirectX documentation (http://msdn.microsoft.com) ?