• Advertisement
  • entries
    59
  • comments
    74
  • views
    44170

Decisions, Decisions. And an Aha!

Sign in to follow this  

448 views

I've thought all day about how to compile all the maze meshes into one static vertex buffer. Right now, each corner and straight section is its own mesh, which gets transformed every frame. That's 1632 needless transformations. The issue is how and where to create an ID3D11Buffer* initialized with the pretransformed verts of all the wall meshes. The Maze and GFXDevice classes know nothing about each other, and I don't want them to. Passing a vector of entities to the Renderer (which owns the GFXDevice), or vice versa, feels kludgy--I don't want to have to call the renderer when I load a new maze before I actually need to draw it.

While typing the above, I thought of doing it in the MeshCache. It makes decent sense--the Cache creates, stores and fills requests for mesh data. It will require some small interface redesign, but it's doable. Why didn't I think of this before? I wish I'd come to this realization before 1am. My coding life is filled with eureka moments immediately after powering down the pc or as I'm turning out the light. Or even moments before I would have fallen asleep had the epiphany not occurred. And I'm still working on resuming a normal sleep schedule; so while I could stay up and implement it (I'm exhausted by my damnable sleep patterns, but not really feeling tired at the moment), I really should take a sedative and go to bed.

There's (almost) always tomorrow ;)
Sign in to follow this  


2 Comments


Recommended Comments

Oh, yeah. My desk is right at the foot of my bed. I shut it down before going to bed, because the glowing LEDs keep me up. The thought of waiting through the boot sequence is the only thing that keeps me in bed when I have such hypnopompic epiphanies.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement