The first one is what I do:
struct BufferDesc : public D3D11_BUFFER_DESC
this->Usage = D3D11_USAGE_DEFAULT;
this->CPUAccessFlags = 0;
this->MiscFlags = 0;
this->StructureByteStride = 0;
And the second is I suppose a more traditional encapsulation approach
desc.Usage = D3D11_USAGE_DEFAULT;
desc.CPUAccessFlags = 0;
desc.MiscFlags = 0;
desc.StructureByteStride = 0;
friend class MyRenderer;
I guess I pick the first method because structures like these are glorified parameter blocks for creating actual useful objects. That said, I often collect objects like Render Targets and Shader Resources in structs too because accessor/mutators and protected members seem pointless there too. There's no logic to encapsulate...
So, I guess I'm wondering is my approach bad practice? I picked it up from abstracting Win32 structures for my day job.
The only reason I could think to use approach 2 is if you wanted to completely a encapsulate a thing with a view to supporting dirrerent APIs.