Original Post
Hi,
I want to know if there are any articles floating about the web that could point me in the right direction with regards to following problem, or if any of you can give me a good idea as to how to solve this problem.
I am working on an Engine that use OpenGL and Direct Input.
The problem i have is that i don't like how i have Direct Input and OpenGL scene Interfacing.
What i currently do is
When user press a key or moves the mouse, i change the values of respective variable in my DrawScene Object (Variables are part of DrawScene Object Class). DrawScene then takes these value and appropriately moves the camera.
in the WinMain function i have the following
if (pDInput->Update())
{
if(pDInput->Keypressed(DIK_UP))
pDScene->Cam1->MoveCamera(SPD);
}
if(pDScene->DrawScene())
SwapBuffers(pGame->GetHDC());
Where pDInput is DirectInput Object and pDScene is the Rendering Object which renders the OpenGL stuff.
Cam1 is Camera Object within DrawScene.
Is there a better way of doing this. Something about the way i do this doesn't seem proper.
[edited by - Roy_Fokker on April 26, 2004 8:09:41 PM]