Hi,
On Fri, Jul 15, 2016 at 4:27 PM, Michael Stefaniuc mstefani@redhat.com wrote:
On 07/15/2016 12:45 PM, Aaryaman Vasishta wrote:
On Fri, Jul 15, 2016 at 4:02 PM, Aaryaman Vasishta <jem456.vasishta@gmail.com mailto:jem456.vasishta@gmail.com> wrote:
struct d3drm_viewport { struct d3drm_object obj; + IDirect3DRMFrame *camera; IDirect3DRMViewport IDirect3DRMViewport_iface; IDirect3DRMViewport2 IDirect3DRMViewport2_iface; + IDirect3DViewport *d3d_viewport; + IDirect3DMaterial *material; IDirect3DRM *d3drm; D3DVALUE back; D3DVALUE front;
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
You can do that as long as you can use only methods of those interfaces. As soon as you need to access fields of the object struct directly you need to save the object pointer.
bye michael
Right, I'll keep that in mind once an implementation requires it :)
Cheers, Aaryaman