shall i install direct9 or allow him to select the driver?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
omarb
Posts: 23
Joined: Fri Jul 07, 2006 1:34 pm

shall i install direct9 or allow him to select the driver?

Post by omarb »

when creating my application.. shall i install Directx9 on the users computer along with it, or allow him to select the most suitable driver?
what is the best practice.. thanks
jam
Posts: 409
Joined: Fri Nov 04, 2005 3:52 am

Post by jam »

I think the best option in my opinion would be to let the user decide what driver to use. I suppose you could also try and start your program up with DirectX if createDevice returns null then try Opengl and so on.
system-independent, adj.:
Works equally poorly on all systems.
-- unknown
omarb
Posts: 23
Joined: Fri Jul 07, 2006 1:34 pm

Post by omarb »

hi,
i tried this: (as u notice i am using .net)
this is not crashing but i am getting a grey screen
Try
If device Is Nothing Then
device = New IrrlichtDevice(Irrlicht.Video.DriverType.OPENGL, New Dimension2D(c.Width, c.Height), 32, False, False, False, True, c.Handle)
End If
Catch ex As Exception
End Try
Try
If device Is Nothing Then
device = New IrrlichtDevice(Irrlicht.Video.DriverType.DIRECT3D9, New Dimension2D(c.Width, c.Height), 32, False, False, False, True, c.Handle)
End If
Catch ex As Exception
End Try
Try
If device Is Nothing Then
device = New IrrlichtDevice(Irrlicht.Video.DriverType.DIRECT3D8, New Dimension2D(c.Width, c.Height), 32, False, False, False, True, c.Handle)
End If
Catch ex As Exception
End Try

----------------------------
on this machine when i use this directly the application works:
device = New IrrlichtDevice(Irrlicht.Video.DriverType.OPENGL, New Dimension2D(c.Width, c.Height), 32, False, False, False, True, c.Handle)
any idea why that is happening?
jam
Posts: 409
Joined: Fri Nov 04, 2005 3:52 am

Post by jam »

Someone else more knowledgeable with .NET will have to help you with that code snippet.
system-independent, adj.:
Works equally poorly on all systems.
-- unknown
Post Reply