Jump to content

  • Log In with Google      Sign In   
  • Create Account


Rendering question


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 jcpayne93   Members   -  Reputation: 109

Like
0Likes
Like

Posted 08 September 2012 - 03:14 AM

First of all I had no Idea where to put this but I put it into DirectX because it was somewhat related to the topic.

As to the actual question... I was wondering how exactly are modern game engines such as Crytech, Unity, etc.... able to fully develop their game then just port it to Windows, Mac, Xbox 360, PS3, and so on. To be somewhat more specific how are they able to use DirectX, OpenGl, and then use it for the console that's opposite of what it's for.

Do they use both languages and then just write an api layer over them so that it makes a call to use whichever language is needed for the port?

That is in a nutshell my question and I hope you were able to understand what I was asking.

Sponsor:

#2 Jason Z   Crossbones+   -  Reputation: 3780

Like
1Likes
Like

Posted 08 September 2012 - 07:45 AM

You more or less already answered the question - the engines just use an abstraction layer to make the actual rendering calls behind an engine specific API. This lets the actual core code and game code use whichever rendering system is selected at the time, without even knowing which rendering API is being used.

I'm sure each engine uses different techniques to implement this strategy, but that is the basic idea.

#3 jcpayne93   Members   -  Reputation: 109

Like
0Likes
Like

Posted 08 September 2012 - 11:19 AM

Ahh I see, that was something I was wondering about and not quite too sure, but it seems like it would be inefficient because it has a lot of overhead sitting around to make calls to the different APIs.

But I suppose its a necessary sacrifice to extend portability to different platforms

#4 MJP   Moderators   -  Reputation: 8812

Like
1Likes
Like

Posted 08 September 2012 - 05:16 PM

There doesn't have to be any overhead at runtime. You already need to compile different versions of your executable for each platform you target, so when you compile them you can just have the engine use the appropriate rendering code path for that platform and ignore everything else.

#5 jcpayne93   Members   -  Reputation: 109

Like
0Likes
Like

Posted 09 September 2012 - 01:39 AM

Alright I get it now, and thanks for taking the time to respond guys.

Edited by jcpayne93, 09 September 2012 - 01:39 AM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS