Decisions, Decisions. And an Aha!

Published October 13, 2011
Advertisement
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 ;)
Previous Entry Return of the Cage
Next Entry Diversions
0 likes 2 comments

Comments

Gaiiden
sleeping 5 feet from my computer has always been the worst thing during times like these
October 15, 2011 07:29 PM
yckx
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.
October 18, 2011 07:08 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement