Jump to content

  • Log In with Google      Sign In   
  • Create Account

Tessellator

Member Since 03 Oct 2000
Offline Last Active Today, 12:38 PM

Posts I've Made

In Topic: Engine design v0.3, classes and systems. thoughts?

17 August 2016 - 06:29 AM

Separating out classes based on API like D3dSkybox and D3dLight is something I'd avoid. For example what does D3dLight have that CLight doesn't? It's a structure that has a position+/orientation, colour, type etc. In terms of interfacing with D3D, all you'll be doing is setting some constants or other buffer type - that can be abstracted efficiently at a much lower level. Abstracting buffers and entire blobs of data (buffer + state) makes porting to other platforms much easier too (and fits well with modern rendering APIs).

T


In Topic: Vertex Data Structures

07 June 2016 - 07:32 AM

Most of the time I use reasonably opaque vertex data as Dingleberry suggests. Any time I need to do operations on the mesh though, I tend to split it up into several streams of data e.g. Positions and UVs and tangents etc. Alternatively, I also have functions that take an e.g. Vec3* to operate on positions and a stride value that defines the size between each vertex. So to increment between each vertex you can do ((char*)pPositions) += stride.

In Topic: use ID or Pointers

06 June 2016 - 07:03 AM

I use handles for pretty much every resource that needs a direct link - I have different ways of managing them, but most of them are 32bit and store an index to an array of resources along with 8 bits or so reserved for a "magic" ID so I can track resource lifetime (i.e. if the resource is alive or freed). I think this might have been the first thing I read about it years ago: http://scottbilas.com/publications/gem-resmgr/. It's evolved since then but the premise is the same.

 

I tend to use hashes when serialising if one thing needs to look-up another. I've started to use a unique string index that's created at build time along with a dictionary (i.e. list) of all strings used. That can be used for compares + easy string lookup for tools and debugging, and saves having to keep the hash + string pointer around. However, it requires some additional management that i'm not sure is worth the pay-off yet.

 

T


In Topic: Terrain Rendering

25 May 2016 - 08:36 AM

I'm trying out something similar to this currently: http://casual-effects.blogspot.co.uk/2014/04/fast-terrain-rendering-with-continuous.html

It's nice and easy to setup but haven't finished the implementation of materials etc so can't say how good it'll be. Initial perf seems plenty fast enough.

 

T


In Topic: D3D11CreateDevice freeze

04 May 2016 - 02:22 AM

If you pass in the debug flag when creating the device do you get any warning/error messages?

 

I remember I had a bug where running the debugger with a D3D9 game (years ago!). Not closing down correctly would occasionally leave the device in an unhappy state, causing it to fail during subsequent creation calls. I've not seen anything like that since though.

 

T


PARTNERS