Re: Designing a renderer

Parveen Kaler <[email protected]> 01 Jul 2003 16:56:34 -0700
Newsgroups gmane.games.devel.design
Message-ID <1057103794.16687.34.camel@localhost>
--=-UqP9ud2W4K9l1+V0sd2m
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Tue, 2003-07-01 at 14:50, Ivan Galic wrote:
> > > function IRenderer::Init(...). The arguments vary with
> > > the OS. On a Windows platform you have to pass the HWND
> > > for the window, on a Linux system that could be totally
> > > different.
>=20
> Yes, so that's why you have to abstract window creation, too. So you'd ha=
ve
> a class for creating a window, and two implementations - one for windows,
> and one for linux. Take a look at OGRE for a good engine design:
>=20
> ogre.sourceforge.net
>=20
> -Ivan


I'm not sure if I'd call OGRE a good engine design.  It does abstract
away a bunch of stuff fairly well.  I'm not sure how algorithms, such as
shadows and different shaders, fit into the whole mix.

My advice would be to:

for (;;)
{
  Design();
  Code();
  Refactor();
}

You're not going to get it right the 1st time.  And you probably won't
get it completely right the 8th time.  Just keep the iterations short
and keep cranking out code.

I'm reading Applied C++ at the moment.
http://www3.addall.com/New/compare.cgi?isbn=3D0321108949

It's a pretty decent read.  They go through designing and coding an
image manipulation program.  So a lot of the issues they cover, you will
run into when designing your renderer.

<rant>
The book does hit a bunch of my pet-peeves though.  Such as the
prefixing of all classes with ap*.  Damnit, just throw everything into
an ap namespace.  That's what namespaces are for.  I know some compilers
don't handle namespaces well, but there are easy work-arounds.
</rant>

My current side-project is designing an STL-like engine.  And using
traits classes to configure the renderer for different APIs and
windowing systems.  Similiar to how std::string is an instantiation of
basic_string<class charT, class traits, class Allocator>.  And have
algorithms for shadows, fog, and shading work like STL algorithms.

I'm not sure how this turned into me pimping the meandering design of my
own engine.  So in conclusion, keep iterating and check out Applied C++
but as per usual, read with a grain of salt.
--=20
Parveen Kaler <[email protected]>

--=-UqP9ud2W4K9l1+V0sd2m
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQA/Ah+x5Hd0OKSt4t4RAtMBAJ4zfPJI7MpafbrX3WmehDoSG2D5AACdFdXa
Jwep20naWCtGmGyNwWQCySk=
=3BTl
-----END PGP SIGNATURE-----

--=-UqP9ud2W4K9l1+V0sd2m--



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
_______________________________________________
Gamedevlists-design mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gamedevlists-design
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_id=556