Jump to content
  • Advertisement

Rottbott

Member
  • Content Count

    178
  • Joined

  • Last visited

Community Reputation

145 Neutral

About Rottbott

  • Rank
    Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Only that you have to write entirely separate code for the 360 where all memory is shared. Just something to bear in mind. Edit: If you want to do the transformations on the GPU you could do it like boned animation, give the shader an array of transformation matrices and put the array index into your vertex structure.
  2. Consider using 2 or 3 normal vertex buffers and cycle through them, rather than a single dynamic vertex buffer. That way it would work on the Xbox 360 as well and the locks are still instantaneous.
  3. Rottbott

    The Render Method

    Here's the method I like: In the end even the most complex/unusual entity types will boil down to one or more DrawPrimitive calls with associated set calls for shaders/samplers/renderstates/vertices/indices. I have an Entity.Render function which is implemented differently in each class derived from Entity, but which only goes as far as doing the "boiling down", and in the end registers the Set/Draw parameters with a centralised list managed by the renderer. The final step after traversing the scene hierarchy is to sort the list (by shader/texture and by Z for alpha objects) and then render each object in turn. That allows a simple recursive walk of the scene but still gives the benefits of sorting, and it keeps the 'common-to-all-entity-types' code such as state filtering together in one place. If you manage two lists at once and alternate between them it's also a nice easy way to multithread your rendering since the walking/sorting can happen in parallel with the drawing of the previous frame's list. Edit: This also works really well when you get into multiple passes for things like shadow maps and motion blur by making lists within the lists. Entities can just specify which passes they'd like to register for.
  4. You might consider not using a shadow map that big anyway. If your view distance is at all far, multiple smaller shadow maps would look nicer and save a lot of memory.
  5. Maybe I'm dumb and missed it, but are there Plane building functions like D3DXPlaneFromPoints(), or plans to add them? Fantastic wrapper by the way, thanks for all the hard work.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net 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!