Advertisement Jump to content


This topic is now archived and is closed to further replies.


Renderer *Behavior*

This topic is 5841 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

I''m in the process of creating a renderer for my engine, and i was wondering what behaviors or traits a renderer would have. These traits or behaviors wouldn''t be in a renderer class, but would be given as template arguments to another game object, lets say a mesh: CMesh Monster blah blah Some things i''ve though up: an API trait - does it use OpenGL or D3D? a style behavior - line, point, fill (maybe non-photorealistic?) a texture mode behavior - anisotropic, bilinear, nearest point Thanks for the input, i''m a little stuck. I''ve been scribbling these for days in study hall :D

Share this post

Link to post
Share on other sites
I don''t consider template arguments as a good solution for this.
The reason is, that you cannot change template parameters at run-time which would create a pretty rigid model for your renderer.

OGL and D3D both use states to modify the rendering behavior, so your 3d object classes should do it in a similar way.

To complete your behavior list,take a look at the available options for the APIs.

BTW. an API trait isn''t useful at all, since only one API can be used at a time and the renderer core has to be different for each API.
An abstract renderer base-class however, is a nice idea.

You could also add fancy things like shaders, lighting model,
shadow casting method, transparency, ...

Share this post

Link to post
Share on other sites
Guest Anonymous Poster
The APIs would be derived from a common interface that i have written. I''m just expiramenting here thanks for the suggestions though

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!