コード例 #1
0
	void GeometryShaderData::PreDraw(ID3D11Device1& device, ID3D11DeviceContext1& context) {
		ASSERT(mShader);

		context.GSSetShader(mShader, nullptr, 0);

		// Set constant buffers
		ID3D11Buffer* const cBuffers[] = { mCBuffer.mBuffer };
		mCBuffer.CopyDataToBuffer(device);
		context.GSSetConstantBuffers(0, ARRAYSIZE(cBuffers), cBuffers);
	}
コード例 #2
0
	void GeometryShaderData::PostDraw(ID3D11DeviceContext1& context) {
		context.GSSetShader(nullptr, nullptr, 0);
		ID3D11Buffer* const cBuffers[] = { nullptr };
		context.GSSetConstantBuffers(0, ARRAYSIZE(cBuffers), cBuffers);
	}