Counter Strike : Global Offensive Source Code
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.

36 lines
924 B

  1. #include "stdafx.h"
  2. #include "sqplusWin32.h"
  3. #include "DXSquirrel_Binds.h"
  4. _MEMBER_FUNCTION_IMPL(BaseMesh,constructor)
  5. {
  6. StackHandler sa(v);
  7. return sa.ThrowError(_T("BaseMesh cannot be constructed directly"));
  8. }
  9. _MEMBER_FUNCTION_IMPL(BaseMesh,DrawSubset)
  10. {
  11. StackHandler sa(v);
  12. _CHECK_SELF(ID3DXBaseMesh,BaseMesh)
  13. self->DrawSubset(sa.GetInt(2));
  14. return 0;
  15. }
  16. _BEGIN_CLASS(BaseMesh)
  17. _MEMBER_FUNCTION(BaseMesh,constructor,NULL,NULL)
  18. _MEMBER_FUNCTION(BaseMesh,DrawSubset,2,_T("xn"))
  19. _END_CLASS(BaseMesh)
  20. _MEMBER_FUNCTION_IMPL(Mesh,constructor)
  21. {
  22. _CHECK_INST_PARAM(dev,2,IDirect3DDevice9,Device);
  23. ID3DXMesh *pMesh;
  24. if( FAILED(D3DXCreateTeapot(dev,&pMesh,NULL))) {
  25. MessageBox(NULL, _T("Could not create the mesh"), _T("Meshes.exe"), MB_OK);
  26. return E_FAIL;
  27. }
  28. return construct_RefCounted(pMesh);
  29. }
  30. _BEGIN_CLASS(Mesh)
  31. _MEMBER_FUNCTION(Mesh,constructor,2,_T("xx"))
  32. _END_CLASS_INHERITANCE(Mesh,BaseMesh)