9
\$\begingroup\$

I'm thinking on technical design for a game/game engine using OpenGL, and I wonder if there is any recent consoles (Xbox360, PS3, Wii U, Xbox one and PS4) that I could work with if I do so.

I found plenty of conflicting answers through forums. The only straight answer seems that it is impossible for Xboxes because Microsoft forbid to use something else than DirectX, its own product.

So, finally, does anyone know for sure which consoles can support an OpenGL-based game?

\$\endgroup\$
1
  • \$\begingroup\$ For Xbox, that is correct, it only supports D3D. Wii, I have no idea. Sony has always provided a custom implementation of OpenGL for the PS-family, sometimes called the "PSGL", which should be usable for simpler games, but the high-perf 3A stuff seldom uses it and implements rendering with the specific hardware interfaces. So depending on the size and complexity of the project, the answer might be: none. \$\endgroup\$
    – glampert
    Aug 30, 2015 at 18:37

3 Answers 3

6
\$\begingroup\$

Probably the easiest answer: Don't bother, instead pick what works best for you to work with now (i.e. whatever you're more proficient with.

If you think you should write an engine with portability in mind ("create games, not engines!"), create a renderer abstraction layer, so you're able to plug in any back end you'd need.

While most desktop systems understand/have OpenGL, you'll need OpenGL ES for most mobile platforms. As such it would be just a small additional step to add DirectX as well later.

More specific details are, as far as I know, really hard to get, since most specifics are hidden behind NDAs and stuff like that (for whatever reason).

It's pretty much known that Microsoft favors (and only supports?) DirectX, while I think Sony offers support for OpenGL (although I'm not sure about the feature level/version). Since both require a developer license, I guess they're out of question for now anyway.

No idea about Nintendo, possibly OpenGL or some proprietary stuff? They want you to sign contracts first as well, anyway.

Many other (micro) consoles (such as the Ouya, Amazon's FireTV, etc.) use Android and as such support OpenGL ES 1.1 as well as OpenGL ES 2.0.

Windows PCs usually offer DirectX as well as OpenGL, OpenGL ES is indirectly supported through wrappers (like Google's ANGLE project).

Linux and Mac based systems usually provide OpenGL and OpenGL ES. Wrappers for DirectX exist, although I'm pretty sure this is really just exclusive to emulation. Haven't seen any used elsewhere.

Unfortunately, as you can see, there's no "one interface fits them all" solution.

If you want to limit yourself to one interface for now (which you definitely should IMO), go with (modern) OpenGL. It allows you the easiest/biggest cross-platform use right now, and also makes debugging pretty easy. With some adjustments (to use OpenGL ES rather than OpenGL), this code will run on most phones and micro consoles as well.

If you favor programming under Windows with Microsoft Visual Studio, DirectX might be an option for the Visual Studio integration (graphics debugger, etc.). Just keep in mind this won't work anywhere else (except XBox, which requires a developer license anyway).

\$\endgroup\$
3
  • 1
    \$\begingroup\$ Well I'm more thinking about an engine rather than a game, and if I don't care about porting now, it shall be harder to add later. And even if I do an abstraction in order to add other implementations later, I have to choose the first one to implement. And I would like to use the most portable between DirectX and OpenGL. \$\endgroup\$
    – Aracthor
    Aug 30, 2015 at 7:00
  • \$\begingroup\$ @Aracthor In that case go with OpenGL. I'll expand a bit above. \$\endgroup\$
    – Mario
    Aug 30, 2015 at 19:20
  • 2
    \$\begingroup\$ @Aracthor Updated; also, if you want the most portable interface, go with OpenGL. Even while ignoring the popular consoles, OpenGL has far bigger support outside the Windows world. \$\endgroup\$
    – Mario
    Aug 30, 2015 at 19:34
2
\$\begingroup\$

None of the consoles you list use OpenGL as their native rendering API. The PS3 used to support a proprietary variant of OpenGL called PSGL but it was never the preferred API and I'm not sure it's even supported any more. To my knowledge none of the others have any kind of official support for OpenGL although you could in theory use ANGLE on Xbox 360 and Xbox One with some slight modifications.

If you want to target consoles with a custom engine you will need to support multiple rendering back-end APIs since there is no one API that you can use across all of them. In fact, of the consoles you list no two even share the same rendering API. The PS4 and PS3 have different APIs as do the Xbox 360 and Xbox One.

\$\endgroup\$
2
\$\begingroup\$

The Nintendo Switch is the first console which supports OpenGL (even desktop OpenGL!) natively. Source: https://www.tweaktown.com/news/55537/nintendo-switch-certified-vulkan-opengl-4-5/index.html

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged .