These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

Macintosh

 
  • Topic is locked indefinitely.
12Next page
 

DirectX to OpenGL

Author
Vincent Athena
Photosynth
#1 - 2012-07-19 16:17:41 UTC
I know one of the issues of running eve on a Mac is eve uses DirectX graphics calls and the Macintosh uses OpenGL. The Cider wrapper does translations. But that does not really seem to explain the issue. Maybe someone who knows, or someone at CCP can explain this? Specifically:

The Macintosh hardware is in no way limited to OpenGL. To prove this to yourself, but in bootcamp and run eve. Now DirectX calls control the Graphics Processor Unit directly. Question: Why cannot an application running on the Mac side use DirectX? The hardware can handle it. Why the limitation to OpenGL? Why can the Mac OS not just be bypassed and DirectX calls sent directly to the GPU?

Even if there is no way to do this and the translation must be done, could this not be done before I download the client? That is;

If ( UseOpenGL = true ) then
OpenGL call
else
DirectX call


where the openGL call is exactly the call Cider would have made if it was asked to do the translation. My guess is if even 5% of the graphics calls made by the client included "pre-translated" calls, there would be a marked improvement in fps, assuming the most heavily used calls were translated.

Know a Frozen fan? Check this out

Frozen fanfiction

Dersen Lowery
The Scope
#2 - 2012-07-19 16:39:04 UTC
Apple doesn't see it as in their interest to allow a native DirectX driver on OS X. As soon as there is one, it will become the preferred graphics driver by sheer inertia, and then Apple will be dependent on Microsoft for a crucial piece of their system software.

I have no inside information with either company, but I'd guess that CCP hires OpenGL programmers before Apple allows a native DirectX driver.

Proud founder and member of the Belligerent Desirables.

I voted in CSM X!

Vincent Athena
Photosynth
#3 - 2012-07-19 16:41:27 UTC
Why cannot a native DirectX driver be part of Cider?

Know a Frozen fan? Check this out

Frozen fanfiction

Dersen Lowery
The Scope
#4 - 2012-07-19 17:09:35 UTC
Vincent Athena wrote:
Why cannot a native DirectX driver be part of Cider?


Somebody would have to write the drivers. Usually, that would be the companies responsible for the cards, in cooperation with the operating system vendor. Apple probably has agreements with them that they will not provide third-party graphics drivers for OS X.

They really, really, don't want native DirectX. The closest thing would be for CCP to pay someone like Westlake to port the game--the porting companies have excellent DX->OGL shims--but then they'd have to delay the Windows releases of the game, and with CCP's aggressive release schedule I think this would be a costly option.

I know where you're coming from, and I hate that the answer is politics, but from watching the industry for as long as I have I'm afraid that the answer is politics.

Hey, CCP Spitfire, if I brush up my now 15-year-old OpenGL skills, will you hire me? Pirate

Proud founder and member of the Belligerent Desirables.

I voted in CSM X!

Vincent Athena
Photosynth
#5 - 2012-07-19 17:26:25 UTC
Im still missing something.

DirectX drivers do not have to be written, they already exist. Otherwise no one could use DirectX on any computer with any operating system. Furthermore DirectX drivers that work on a Macintosh already exist, they are loaded whenever you use bootcamp.

Apple already allows DirectX drivers on their hardware. They are loaded on whenever you start bootcamp.

Im not suggesting adding DirectX drivers to OSX. I understand Apple has the right to prevent mucking with their OS. Im suggesting adding them to Cider and bypassing OSX, so the only app that can use them is Eve. Cider already has an odd DirectX driver, it works by first translating the calls to OpenGL. Why not have a better one, one that can use the DirectX call directly?

Know a Frozen fan? Check this out

Frozen fanfiction

Dersen Lowery
The Scope
#6 - 2012-07-19 20:16:44 UTC
Vincent Athena wrote:
Im still missing something.

DirectX drivers do not have to be written, they already exist. Otherwise no one could use DirectX on any computer with any operating system. Furthermore DirectX drivers that work on a Macintosh already exist, they are loaded whenever you use bootcamp.

Apple already allows DirectX drivers on their hardware. They are loaded on whenever you start bootcamp.

Im not suggesting adding DirectX drivers to OSX. I understand Apple has the right to prevent mucking with their OS. Im suggesting adding them to Cider and bypassing OSX, so the only app that can use them is Eve. Cider already has an odd DirectX driver, it works by first translating the calls to OpenGL. Why not have a better one, one that can use the DirectX call directly?


It's not the hardware that matters, it's the operating system. Hardware + OS (+ included apps) = platform.

Drivers are highly specific to the operating system they're written for. The DX drivers written for Windows would have to be rewritten for OS X--not from the ground up, but it's not a trivial effort, either. OS X and Windows treat drivers differently, and they have completely different models for how the driver interacts with the operating system.

Now that I'm thinking about it, there is an other than political reason: Apple has built OS X's entire display layer on top of OpenGL (more recently, MS did the same with DirectX). If the user loaded a hypothetical DirectX driver onto a Mac, the user interface wouldn't work anymore. Apple could port their system to run on OpenGL or DirectX, but then we're back into politics--they'll never let another company control one of the fundamental pieces of their operating system. So, as long as you're running OS X, DirectX will only be available under one form or another of emulation.

Does that make sense?

Proud founder and member of the Belligerent Desirables.

I voted in CSM X!

Vincent Athena
Photosynth
#7 - 2012-07-19 21:00:14 UTC
Sort of, but I still do not see why the driver needs to interact with the OS. Why not use a driver that directly drives the GPU without any consideration of the OS at all?

For example when I first turn on my computer I see the PgP log in screen. That appears before OSX has been loaded. Obviously something is controlling the graphics without the need for OSX. And as I can type stuff in at that point, the UI is still working. Why cannot cider do the same?

Also what about my second method, have OpenGL calls pre-translated and in the code, so Cider does not need to spend time doing the translating?

Know a Frozen fan? Check this out

Frozen fanfiction

Dersen Lowery
The Scope
#8 - 2012-07-20 15:08:36 UTC
Vincent Athena wrote:
Sort of, but I still do not see why the driver needs to interact with the OS. Why not use a driver that directly drives the GPU without any consideration of the OS at all?


The whole point of a driver is to tell the operating system about the capabilities of the hardware it drives. The hardware has its physical interface; the OS has its driver interface; the driver gets those two talking to each other.

Vincent Athena wrote:
For example when I first turn on my computer I see the PgP log in screen. That appears before OSX has been loaded. Obviously something is controlling the graphics without the need for OSX. And as I can type stuff in at that point, the UI is still working. Why cannot cider do the same?


There's a small computer-within-a-computer with a very rudimentary interface running the machine at that point. None of the drivers have been loaded, because the OS hasn't been loaded--it's talking directly to hardware. From there, you can either load OS X and its OpenGL drivers, or Windows and its DirectX drivers.

Vincent Athena wrote:
Also what about my second method, have OpenGL calls pre-translated and in the code, so Cider does not need to spend time doing the translating?


That's what a company like Westlake Interactive would do, for a price. It works very well.

Proud founder and member of the Belligerent Desirables.

I voted in CSM X!

Vincent Athena
Photosynth
#9 - 2012-07-20 15:29:10 UTC
[quote=Dersen Lowery
There's a small computer-within-a-computer with a very rudimentary interface running the machine at that point. None of the drivers have been loaded, because the OS hasn't been loaded--it's talking directly to hardware. [/quote]

Why could not Cider talk directly to the hardware?

Also, I thought Cider, being a PC emultor, contains some part of the PC OS. Why not have the DX driver interact with that, instead of OSX?

In other words. Why cannot Cider just ignore OSX?

Know a Frozen fan? Check this out

Frozen fanfiction

Manssell
OmiHyperMultiNationalDrunksConglomerate
#10 - 2012-07-20 16:47:18 UTC  |  Edited by: Manssell
Vincent Athena wrote:
[quote=Dersen Lowery
There's a small computer-within-a-computer with a very rudimentary interface running the machine at that point. None of the drivers have been loaded, because the OS hasn't been loaded--it's talking directly to hardware.


Why could not Cider talk directly to the hardware?

Also, I thought Cider, being a PC emultor, contains some part of the PC OS. Why not have the DX driver interact with that, instead of OSX?

In other words. Why cannot Cider just ignore OSX?[/quote]

I have to preference everything I say about a computer with "I'm not a programer". I just grew up cursing at them all my life. So I may be really wrong here.

But in my layman's understanding I'm pretty sure that once you boot into either OS, those drivers are the only drivers that the hardware will recognize from that point on. It's kinda like giving it it's second firmware, until you reboot again. Also if Cider were to ignore the OS, then there would be times the hardware would be getting commands in both OpenGl and DirecX. For instance when running two clients, or in window mode. Basically anytime the monitor would be needed to "draw" something from Eve, and also the OS it would be getting conflicting instructions. I would also bet that the OS gives the monitor commands even while EVE is in fullscreen too.
Dersen Lowery
The Scope
#11 - 2012-07-20 21:37:52 UTC  |  Edited by: Dersen Lowery
Vincent Athena wrote:
Why could not Cider talk directly to the hardware?


If you could boot into Cider, sure, but there's a better solution: Boot Camp into Windows.

All applications running on modern OS's only know what the OS tells them about the hardware they're running on, and all access to that hardware goes through the OS. Otherwise, for example, OS X and Windows 7 couldn't do the transparent window-over-window compositions or preview windows, or OS X's minimize effect to the dock. Screenshots wouldn't work, and so on. All of that depends on all graphics being rendered through the operating system's graphics layer.

It used to be possible, when 3d accelerators were optional enhancements and people still lusted after VOODOO cards. Now, they're crucial system components.

Vincent Athena wrote:
Also, I thought Cider, being a PC emultor, contains some part of the PC OS. Why not have the DX driver interact with that, instead of OSX?


It contains original code that mimics Windows well enough to fool many Windows applications, including EVE, which is mostly written in platform-independent Python. That includes a library that looks like DirectX, but which is actually a shim that translates DirectX calls into OpenGL.

You can't run a Windows driver, because it expects to sit between the hardware and Windows; but WINE isn't Windows, it just looks kind of like Windows from above.

Proud founder and member of the Belligerent Desirables.

I voted in CSM X!

Adrenalinemax
Lap Dancers
Brothers of Tangra
#12 - 2012-07-21 14:45:03 UTC
You can't run a .exe on a mac without some sort of translator (Wine, crossover etc)

You can't run DirectX on a mac without some sort of emulator (CIDER)

Until DirectX becomes mac OSX Native you will always have to use an emulator.

OpenGL is Mac and Windows capable, but there is so much more thrust from M$ to keep developers on DirectX than there is to get them to transition to OpenGL.
Matthew Barsrallah
Nerbles
#13 - 2012-07-23 05:23:27 UTC
to put it simply. Direct X is a Microsoft technology. Yes, nvidia/ati/intel graphics cards/ship support both, however it doesn't make sense for Microsoft to license one of their best proprietary software technologies to a competing company (apple)



Vincent Athena
Photosynth
#14 - 2012-07-23 15:30:53 UTC
Dersen Lowery wrote:


All applications running on modern OS's only know what the OS tells them about the hardware they're running on, and all access to that hardware goes through the OS. Otherwise, for example, OS X and Windows 7 couldn't do the transparent window-over-window compositions or preview windows, or OS X's minimize effect to the dock. Screenshots wouldn't work, and so on. All of that depends on all graphics being rendered through the operating system's graphics layer.

Im willing to give up having the eve window transparent, or an eve preview window once eve is running, and even minimizing. Im willing that to have the only way to do screenshots of eve be the routine built into eve. Would not you for 3 times the fps?


Dersen Lowery wrote:

It contains original code that mimics Windows well enough to fool many Windows applications, including EVE, which is mostly written in platform-independent Python. That includes a library that looks like DirectX, but which is actually a shim that translates DirectX calls into OpenGL.

Why could it not contain an actual DirectX driver rather than a shim?

Dersen Lowery wrote:
You can't run a Windows driver, because it expects to sit between the hardware and Windows; but WINE isn't Windows, it just looks kind of like Windows from above.

Why could it not sit between the hardware and Cider? Why could Cider not just send OSX a "placeholder" graphics (say a white square that fills the eve window) then use DX to put the eve graphics on that space? That way any OpenGL graphics commands sent by OSX would just be behind the white square. OSX need not know that that white square is being overwritten by Cider.

Matthew Barsrallah wrote:
to put it simply. Direct X is a Microsoft technology. Yes, nvidia/ati/intel graphics cards/ship support both, however it doesn't make sense for Microsoft to license one of their best proprietary software technologies to a competing company (apple) .


I'm not suggesting it be licensed to Apple, Im suggesting it be licensed to Transgaming or CCP.

Know a Frozen fan? Check this out

Frozen fanfiction

Dersen Lowery
The Scope
#15 - 2012-07-23 19:34:02 UTC  |  Edited by: Dersen Lowery
Vincent Athena wrote:
Im willing to give up having the eve window transparent, or an eve preview window once eve is running, and even minimizing. Im willing that to have the only way to do screenshots of eve be the routine built into eve. Would not you for 3 times the fps?


But Apple is not willing to let anyone give those up. (Neither is Microsoft.) It's a Pandora's box. What I'm trying to tell you is that those are reasons why Apple will simply not let it happen. There's nothing that CCP or the Cider developers can do about that. Apple wants all graphics routed through OS X, and so all graphics are routed through OS X. Same deal on Windows, only with DirectX.

It's frustrating, I know, and it's the main reason why OS X has always lagged seriously behind Windows as a game platform. But there it is.

Vincent Athena wrote:

Why could it not contain an actual DirectX driver rather than a shim?


Because Cider is just an application, so the driver would have to be written for OS X. Applications can't access drivers directly. They have to go through the operating system. Even if it could, somebody would have to write a driver specifically for Cider, because Cider only looks like Windows from the point of view of the application it's wrapped around. It looks like an application to OS X, not an operating system.

Cider is a clever bit of trickery, not an OS.

Vincent Athena wrote:
Matthew Barsrallah wrote:
to put it simply. Direct X is a Microsoft technology. Yes, nvidia/ati/intel graphics cards/ship support both, however it doesn't make sense for Microsoft to license one of their best proprietary software technologies to a competing company (apple) .


I'm not suggesting it be licensed to Apple, Im suggesting it be licensed to Transgaming or CCP.


Cider and CCP couldn't do anything with it, because Cider is an app and EVE is an app, and a driver is a low-level operating system extension subject to tight security protocols and careful testing by both the video card vendor and the operating system vendor. (Buggy or compromised drivers can create massive security holes, or more commonly crash your machine hard.) The operating system sits between the driver and the applications, by design. The more powerful and secure the operating system, the more true this will be. The trend has been away from what you're looking for.

Also, there can only be one driver for hardware at any given time, again by design. If you have one GPU, it will have one driver. If that GPU is in a Mac, that driver will implement OpenGL, because that's the only graphics API that the upper levels of OS X know about, and for that and for political reasons, it's the only API that Apple will allow to be shipped with OS X.

Proud founder and member of the Belligerent Desirables.

I voted in CSM X!

Adrenalinemax
Lap Dancers
Brothers of Tangra
#16 - 2012-07-25 14:07:52 UTC
One other thing to consider here, using Blizzard as an example

WoW client for window runs on directx 9 or 11

WoW client for OSX runs on OpenGL

OSX client has one massive feature windblows peeps are very very jealous of;

Movie Capture

Due to the features of OpenGL and the limitations of Directx, it is a Mac only feature. It is essentially FRAPS built on an OS Driver level and not more software. I can capture at 2560x1600 at 30fps with no problems. (I do have a 6TB raid and it is very very fast) but even a standard iMac should be able to capture HD quality with no problems. After capture it also processes into one of three formats and can be imported into FCP for professional authoring. I can put fights on my 52" HDTV that look as good as it did when it happened, you can read every persons tag etc, no fuzzy or blurry text. Now, when I upload to you tube it looks like crap, mainly because I can't upload a 4gb clip.


Either way, until CCP decides to go native and write in OpenGL for us, we are stuck with Cider and all it bullshit glory
Marcus Barrick
Union of Protectorates
#17 - 2012-07-27 23:26:23 UTC  |  Edited by: Marcus Barrick
Because Mac OS/Linux Use Open GL as the api layer to interface grapics input and sound . Windows uses Direct x for the same api calls. Why can't you write to the grapics card directly because at the time there is no application written to use Direct to Metal Rendering and function calls to bypass the Low Level API layer that the host operating systems use. Its not as simple as writing one driver you would need to change the way windows/linux./mac osx interface with pc hardware as a whole.

Why cant you use a windows driver in Mac os but need to use boot camp in windows to use it? Because there 2 diffrent operating systems. Same reason that mac os software doesn't work Nativity on windows because the os is incapable of understanding it. The way Mac OS interfaces with the device drivers vs the way windows does are so completely different.

Cyder translates windows calls into function calls that mac os understands. Same way wine Translates function calls. A windows dll atm would not work nativly by itself under linux because it does not know how to interface with it. And Microsoft isn't about to make Direct X multi platform.


FYI Direct X and Open GL DO exactingly the same thing They just speak different languages


To the person that replied above me. The wow client also suports Native Open GL Vs Eve is a native Direct X client
Miccet
Fairlight Corp
Rooks and Kings
#18 - 2012-08-01 13:34:29 UTC
The real question should be why EVE doesn't use OpenGL. OpenGL works on both Windows and Mac OS. I think the answer is that OpenGL is somewhat slower to implement new features since it's a standard behind it and not just one company.

The situation with DX and OpenGL is not gonna change. Like someone said, they are now very integral parts of the OS with all the animations and stuff that is going on even with basic tasks (Time machine, Spaces etc all uses this). Like someone said, if CCP continues to develop platform dependent they will always need an emulator to run the game on other (Mac OS X) platforms. IMO they should do it the way Blizzard does it and write games totally platform independent using OpenGL.
CMD Bileena
Torvi Mining and Industrial Inc.
#19 - 2012-08-02 12:26:16 UTC
I totally agree... if CCP moved to OpenGL not only would Mac benifit... but it would also make bringback a proper linux version easy...

Also, as a note, OpenGL is not infact behind the times compared to DirectX, its often actually the first to develop features.... OpenGL had tessellation during the DX9 days...

I have heard however that the DX api is a bit easier to use, and ofc... most gaming programmers are much better at using it compared to OpenGL.

We can all hope though! Valve are moving to OpenGL atm, they've just finished test converting their source engine and L4D2 over to OpenGL to release on Ubuntu... CCP, c'mon, follow suit and make a statement! :D
Adrenalinemax
Lap Dancers
Brothers of Tangra
#20 - 2012-08-02 12:30:54 UTC
It all comes down to $$$$

They just laid off a **** ton of people, now they would have to hire at least a few Mac/OpenGL programmers to support this branch of code

Think of the QA testing required to support 2 branches of code......

Linux would definitely be back in the picture then though I am not sure how many subscribers they lost by dropping linux...
12Next page