Originally posted by BO$$
View Post
How Valve Made L4D2 Faster On Linux Than Windows
Collapse
X
-
Originally posted by BO$$ View PostNo not really. Implementing some abstract classes won't kill performance. Do you actually think irrlicht and ogre are so inefficient? Any reasonable developer wraps the api in something else. In their case they didn't wrap it correctly enough so they could rewrite the implementation without rewriting the higher level api. That means bad design. And implementing a translator between d3d to opengl really does incurs a performance penalty. More than doing it right the first time with abstract classes...
Comment
-
-
Originally posted by log0 View PostMy guess is that the Source engine wasn't meant to be cross platform. Thus there was no point in wrapping Win API calls.
Exactly...so their options was to do something like they did or rewrite everything from ground up....that last option was not an economical good option .
.....and if they achieved the kind of performance that they seem to got , it really doesn't matter.
Comment
-
-
Originally posted by BO$$ View PostNo not really. Implementing some abstract classes won't kill performance. Do you actually think irrlicht and ogre are so inefficient?
It's a natural response to blame the PC APIs for this.
Edit:
In other words, can you use Ogre/Irrlicht to implement Skyrim, or the latest Assassin's Creed, or Mass Effect 3, or even Race Driver Grid (runs at constant 60FPS on XBOX360 even when there's 20 cars on screen) on an Intel HD3000 CPU? The XBOX can do those on its old hardware.Last edited by RealNC; 10 August 2012, 12:07 PM.
Comment
-
-
Originally posted by gamerk2 View PostUsing an even higher level API incurs a performance penalty when translating to OGL/DX/WhateverGraphicalAPI. For games, where performance matters, this is unacceptable.
Every modern high-end engine has an internal graphics interface. Neither D3D nor OpenGL are suitable for being the direct interface the graphics programmer uses for rendering, as they are both just low level hardware abstraction layers. The highs end engines abstract away shaders and effects systems, render queues, etc.
If you think that an extra layer on vertex buffer creation and the like is a bottleneck, you are wrong. The bottlenecks are in places that are called tens to hundreds of thousands of times per frame. The graphics API is called only a few hundred times, maybe a couple thousand times, if you're doing your job right as a graphics programmer.
Comment
-
-
Originally posted by BO$$ View PostI don't really see what are you trying to prove? you can play those on xbox because you program more to the metal in xbox and don't have to worry so much about a lot of layers that exist on pc. On pc you don't target a specific hardware configuration so that is why for consoles they can optimize better. But don't worry, they still abstract the graphics api especially if they write the engine for both xbox360 and ps3.
So this is why I'm saying valve did a poor job abstracting the api. They shouldn't have gotten to the point where they translate d3d calls to opengl.
Comment
-
-
Originally posted by elanthis View PostYou clearly have no clue what you're talking about. Please don't go around telling people "facts" if you aren't even remotely an expert in the field. Then other people just have to go and clean up the misinformation you spread.
Every modern high-end engine has an internal graphics interface. Neither D3D nor OpenGL are suitable for being the direct interface the graphics programmer uses for rendering, as they are both just low level hardware abstraction layers. The highs end engines abstract away shaders and effects systems, render queues, etc.
If you think that an extra layer on vertex buffer creation and the like is a bottleneck, you are wrong. The bottlenecks are in places that are called tens to hundreds of thousands of times per frame. The graphics API is called only a few hundred times, maybe a couple thousand times, if you're doing your job right as a graphics programmer.
I am getting confused.
Valve claims for years their game engines supports opengl and direct X
Why do they need to translate direct X calls then?
Or is this just simpler then adopting the game to opengl ?
I build some maps for a game, I cant imagine it being that hard.
You wont have to rebuild the levels ?
Comment
-
-
Why has no one suggested smart preprocessor usage to eliminate the abstraction layer completely without harming portability? Why make an abstract class that decides when it's called "what platform am I running on?". That's what a preprocessor is for.
If you want to compile once for all platforms, you're doing it wrong.
Comment
-
-
Originally posted by elg2001 View PostWhy has no one suggested smart preprocessor usage to eliminate the abstraction layer completely without harming portability? Why make an abstract class that decides when it's called "what platform am I running on?". That's what a preprocessor is for.
If you want to compile once for all platforms, you're doing it wrong.
Code:void DrawSomething() { #if defined(WIN32) D3D9Blahblah(); #elif defined(__linux__) glBlahblah(); #elif defined(__APPLE__) glBlahblahAPPLE(); #endif }
Comment
-
Comment