Migrating DirectX to OpenGL 3.0

Started by
2 comments, last by zedz 15 years, 5 months ago
Hello, As always, I know this community has much more knowledge then I can find through any of my library's books, so here I go: I've been working on a game engine (Who isn't here? ha) in unmanaged C/C++ in DirectX 9. Though I feel comfortable with DX, I find it very messy, somewhat clunky to wrap into abstracted functions, and overly complex. I've decided to move to OpenGL, but I'm still unclear on three topics: Performance, the 3.0 version API / external API, and cross-platform development. Any help or answers for my below questions is very, and always, appreciated! Performance: From what I understand OpenGL wraps the hardware interface more cleanly that DX, is this true? If so, would I be loosing performance or is taht negligible? 3.0 API/3rd Party: I've heard of the new OpenGL 3.0 API set. I've tried to find some documentation but can't find anything that is very clear. Is this out yet, and if so should I target 3.0 or target 2.1? Also, I keep hearing about these smaller 3rd party libraries such as GLUT, but what exactly are their purpose? Cross-Platform Development: Naturally some parts of code must be written in different ways for different OS, especially the window management, but what about standard input? Is there a built-in standard keyboard/mouse interface in OpenGL? As I've said above, I really appreciate any and all help. Thank you!
Advertisement
as for cross-platformness, opengl apps run on windows, linux, macs and few consoles

performance - as long as you use opengl properly, performance should be same

3.0 - the drivers from nvidia and ati for opengl 3.0 are still in beta version. also, opengl 3.0 doesn't change that much. If you program without "deprecated" features such as glVertex or fixed function pipeline, you should be compatible with 2.1 AND set nicely for upgrade to 3.0

as for the keyboard/mouse interface - OpenGL, as the name says is a graphics library. It's an alternative to Direct3D, not DirectX. OpenGL needs another library to complement it (input, window creation). Usually people use SDL for that and sdl is cross-platform.
OpenGL fanboy.
Thank you,

This definitely helps clear up a few of my questions. Much appreciated!
A/ performance with opngl should be a bit better than d3d, carmack mentioned ~5%, but it depends on what sort of app youre doing
B/ keep in mind a lot of cards (eg mine) dont support ogl3.0, glut/sdl just help setting up the window/handle input etc
C/ I use SDL very stable multi platform window manager, use it + your app should run on the mac/linux/windows without any changes

This topic is closed to new replies.

Advertisement