• Advertisement
Sign in to follow this  

Renderingsystem

This topic is 4305 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Greetings! I'm working on my rendering engine. I want it to load a plug-in that contains the entire renderingsystem, to make the engine API independent. The user just loads the appropriate plug-in. I'm having some trouble figuring out how things like resources and renderable objects will be available to the user though. Is the best solution to just create interface classes for each of the types of resources and renderable objects and then implement them in the renderingsystem plug-in? Or is there some more flexible way of doing it? Any pointers/tips?

Share this post


Link to post
Share on other sites
Advertisement
The book "3D Engine Programming" and also the Fly3D engine discussed in the book "3D Games: Real-Time Rendering and Software Technology, Volume 1" by Watt & Policarpo contains a the details of a plugin based engine. Maybe these 2 are worth a look. I think one would usually supply an interface for the class like you said.

Share this post


Link to post
Share on other sites
As far as I can see, there are 2 main routes to go

1) You provide interfaces only for the lowest level API abstraction, and implement these in your render system. Then you build higher level, API independent functionality on top of this.

2) You make interfaces for the higher level objects (such as meshes), implement them in your render system, and let your render system handle any API dependencies internally. You would probably still exposes lower level interfaces, such as texture, vertex buffers, etc.. but it might not be necessary.


I'd go with method 1.
You'll have a smaller API dependent code base to maintain, and everything else you build on top of that would work on any platform you chose to implement the API abstraction.

Method 2 might give you a slight advantage in implementation detail and customizability. Possibly more room for optimisation as well, but I wouldn't worry about that at this stage. On the other hand, this way requires a complete rewrite for every platform you chose to port your code to. The only valid reason I could see to go with this approach would be if you're implementing for very different platforms, where the lowest levels don't share enough common functionality. This could be the case if you're working on PS2 and PC say.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement