Results 1 to 10 of 29

Thread: Abstracting Graphical APIs

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    I have read some articles of other people trying to achieve similar thing, and it seems the lower the level of the API is, the harder it gets to design it. And for a hobby project, it doesn't worth the effort. On the other hand, a higher level API would be much easier to design, but it will seriously limit the potential scenarios it can handle.

    So for now I would avoid doing such kind of abstraction layer and stick to either DirectX or OpenGL for each application, or maybe use SDL.

    Quote Originally Posted by imcold
    Seems that https://github.com/bkaradzic/bgfx does something close to what your goal is, so you may find some inspiration there perhaps. As for API: provide low level functions and build the high level stuff on it, so it would be optional to use?
    This looks very interesting, I'll definately take a look at how it is designed.

    Quote Originally Posted by phibermon
    Also ask yourself if you really want to support DirectX at all with Freepascal/Delphi. We're unlikely to see Xbox support any time soon and OpenGL exists on the windows platform too, so you get a fully capable 3D API on all operating systems you can potentially target with your language.
    In this case the only platforms which doesn't support OpenGL seems to be XBox and WindowsRT, but I'm not interested in those anyway.

    I'm interested to know are there big performance differences between OpenGL and DirectX on Windows, I have read some articles stating the Direct3D would perform better on Windows platforms?

  2. #2
    Quote Originally Posted by Anton View Post
    I'm interested to know are there big performance differences between OpenGL and DirectX on Windows, I have read some articles stating the Direct3D would perform better on Windows platforms?
    From my expirience that largely depends on graphical drivers. One think that you definitly want to avoid is using graphical drivers that are installed by windows itself.
    Always instal official drivers from your graphic card manufactuer becouse drivers that come with windows often don't provide full functionality and in case of some older graphics card they even limit OpenGL to OpenGL 1 compatiblility even thou the graphic card itself does full support OpenGL 2.
    I'm not sure how it is this with newest graphics cards becouse now I always install official drivers right after installing chipsets drivers for motherboard. Now in case of older computers and ATI graphics card it is also recomended to install sound drivers before graphical drivers especiall for graphics card that already support HDMI so that graphics drivers can corectly interface with sound drivers (I had encountered severl dificulties when this didn't happen). But on newer AMD graphics card this is no longer necessary as they have full sound card support integrated right into them and therefore no longer require your computer to have other sound card.

    As far as raw performance goes I have rarely seen any significant diferences when comparing benchmarks between DirectX and OpenGL. And whenever DirectX actually did give higher performance running of DirectX benchmark itself utilized CPU much more than the OpenGL benchmark therefore I can conclude that the aditional performance of DirectX test was due to aditionaly utilizing CPU for certain graphical processing. But in games that probably would not give you much performance boost, infact it could result in worse performasnce becouse it would eat up CPU performance that might be necessry for your game logic.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •