Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.3 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1998 - 1999
  6. //
  7. // File: d3drmviewportarrayobj.cpp
  8. //
  9. //--------------------------------------------------------------------------
  10. // d3drmViewportArrayObj.cpp : Implementation of CDirectApp and DLL registration.
  11. #include "stdafx.h"
  12. #include "Direct.h"
  13. #include "dms.h"
  14. #include "d3drmViewportArrayObj.h"
  15. #include "d3drmViewport2Obj.h"
  16. CONSTRUCTOR(_dxj_Direct3dRMViewportArray, {});
  17. DESTRUCTOR(_dxj_Direct3dRMViewportArray, {});
  18. GETSET_OBJECT(_dxj_Direct3dRMViewportArray);
  19. GET_DIRECT_R(_dxj_Direct3dRMViewportArray, getSize, GetSize, long);
  20. #ifdef DX5
  21. RETURN_NEW_ITEM_CAST_1_R(_dxj_Direct3dRMViewportArray, getElement, GetElement, _dxj_Direct3dRMViewport, long,(DWORD));
  22. #else
  23. STDMETHODIMP C_dxj_Direct3dRMViewportArrayObject::getElement(long index,I_dxj_Direct3dRMViewport2 **vp)
  24. {
  25. HRESULT hr;
  26. LPDIRECT3DRMVIEWPORT pRealVP=NULL;
  27. LPDIRECT3DRMVIEWPORT2 pRealVP2=NULL;
  28. hr=m__dxj_Direct3dRMViewportArray->GetElement((DWORD)index,&pRealVP);
  29. if FAILED(hr) return hr;
  30. hr=pRealVP->QueryInterface(IID_IDirect3DRMViewport2,(void**)&pRealVP2);
  31. pRealVP->Release();
  32. if FAILED(hr) return hr;
  33. INTERNAL_CREATE(_dxj_Direct3dRMViewport2,pRealVP2,vp);
  34. return S_OK;
  35. }
  36. #endif