BASIC

Author Topic: DirectX support?  (Read 5211 times)

Offline doimus

  • Dr. Type
  • ****
  • Posts: 284
    • View Profile
DirectX support?
« on: 2009-Jul-13 »
Is there any chance of GLBasic supporting DirectX API anytime soon?

Not that I prefer it over Open GL (on contrary, I actually prefer OGL) but I am in the position to suggest GLB as framework for development of casual PC games. The only thing that prevents GLB from being ideal casual framework is lack of support for DirectX. And no, I do not think of DX9 with shaders 3.0 - I'm talking about basic DirectX support, like DX7.

Some discussion we had in PSP thread made me think about GLB and casual games market.
At the moment most if not all casual portals do not accept games which aren't DirectX compatible. There are multiple reasons for that and most prominent is that many Windows installations run on default Microsoft graphics drivers, which have horrible OpenGL support.

It would be nice if we had some kind of DirectX wrapper for GLB. Even the most basic, 2D only, DX7 support. Somethin like what BlitzMax does - runs on OpenGL, but reverts back to DX7 on Windows.

Yes, I know that DX sucks, but anyway....

Offline Hemlos

  • To boldy go where no pixel has gone before!
  • Global Moderator
  • Prof. Inline
  • *******
  • Posts: 1634
  • Particle Hawk
    • View Profile
Re: DirectX support?
« Reply #1 on: 2009-Jul-13 »
GLBasic supporting DirectX API

You cant mix opengl with directx typically.
Volume_of_Earth(km^3) = 4/3*3.14*POW(6371.392896,3)

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10697
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: DirectX support?
« Reply #2 on: 2009-Jul-13 »
The problem with DX is, that you have to rewrite and rewrite and rewrite your code with every single version the provide. It's such a pain.
I might consider writing a wrapper, but not #1 priority.
Someone has made a Xors wrapper, though.

Offline doimus

  • Dr. Type
  • ****
  • Posts: 284
    • View Profile
Re: DirectX support?
« Reply #3 on: 2009-Jul-13 »
I haven't yet met a programmer who likes Directx.  =D

And I'm fully aware of Microsoft's policies and destruction of backwards compatibility in newer versions.

What I'm proposing is just DX wrapper with basic functions, just as a fallback, idiot-proof platform on Windows.
I don't know what GLB does when OpenGL drivers are missing. It reverts to software? But I guess the performance of software rendering would be bad on higher resolutions, right?

Some kind of basic DX support would be great, just for those cases.

But of course, take your time with it. No hurries whatsoever.