<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 15, 2016 at 4:02 PM, Aaryaman Vasishta <span dir="ltr"><<a href="mailto:jem456.vasishta@gmail.com" target="_blank">jem456.vasishta@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> 
struct d3drm_viewport<br>
 {<br>
     struct d3drm_object obj;<br>
+    IDirect3DRMFrame *camera;<br>
     IDirect3DRMViewport IDirect3DRMViewport_iface;<br>
     IDirect3DRMViewport2 IDirect3DRMViewport2_iface;<br>
+    IDirect3DViewport *d3d_viewport;<br>
+    IDirect3DMaterial *material;<br>
     IDirect3DRM *d3drm;<br>
     D3DVALUE back;<br>
     D3DVALUE front;<br></blockquote><div>I've decided to keep the interface instead of using the struct directly, since it'll be easier to use the interface functions for transformations and other paramaters. Referencing the interface via the object for every function call seems a bit redundant. Also I think refcounts should be handled seamlessly this way.<br><br></div><div>A reference to the background material created internally is also kept here. As Stefan had pointed out, the material is not AddRef'd since its handle is used instead, so it's probably safer to keep the reference to ourselves and release it when the object is destroyed.<br></div><div><br></div><div>Cheers,<br></div><div>Aaryaman<br></div></div><br></div></div>