DXGL r511 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r510‎ | r511 | r512 >
Date:19:58, 1 September 2014
Author:admin
Status:new
Tags:
Comment:
Combine viewport interfaces.
Modified paths:
  • /ddraw/glDirect3DViewport.cpp (modified) (history)
  • /ddraw/glDirect3DViewport.h (modified) (history)

Diff [purge]

Index: ddraw/glDirect3DViewport.cpp
@@ -82,8 +82,6 @@
8383 newvp->lights[i] = NULL;
8484 newvp->refcount = 1;
8585 newvp->current = false;
86 - newvp->glD3DV2 = NULL;
87 - newvp->glD3DV1 = NULL;
8886 TRACE_EXIT(23, DD_OK);
8987 return DD_OK;
9088 }
@@ -93,7 +91,8 @@
9492 HRESULT ret;
9593 TRACE_ENTER(3,14,This,24,&riid,14,ppvObj);
9694 if(!This) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
97 - if(riid == IID_IUnknown)
 95+ if ((riid == IID_IDirect3DViewport3) || (riid == IID_IDirect3DViewport2) ||
 96+ (riid == IID_IDirect3DViewport) || (riid == IID_IUnknown))
9897 {
9998 glDirect3DViewport3_AddRef(This);
10099 *ppvObj = This;
@@ -101,56 +100,6 @@
102101 TRACE_EXIT(23,D3D_OK);
103102 return D3D_OK;
104103 }
105 - if(riid == IID_IDirect3DViewport3)
106 - {
107 - glDirect3DViewport3_AddRef(This);
108 - *ppvObj = This;
109 - TRACE_VAR("*ppvObj",14,*ppvObj);
110 - TRACE_EXIT(23,D3D_OK);
111 - return D3D_OK;
112 - }
113 - if(riid == IID_IDirect3DViewport2)
114 - {
115 - if(This->glD3DV2)
116 - {
117 - *ppvObj = This->glD3DV2;
118 - glDirect3DViewport2_AddRef(This->glD3DV2);
119 - TRACE_VAR("*ppvObj",14,*ppvObj);
120 - TRACE_EXIT(23,D3D_OK);
121 - return D3D_OK;
122 - }
123 - else
124 - {
125 - ret = glDirect3DViewport2_Create(This, (LPDIRECT3DVIEWPORT2*)ppvObj);
126 - if (ret != DD_OK) TRACE_RET(HRESULT, 23, ret);
127 - glDirect3DViewport3_AddRef(This);
128 - This->glD3DV2 = (glDirect3DViewport2*)*ppvObj;
129 - TRACE_VAR("*ppvObj",14,*ppvObj);
130 - TRACE_EXIT(23,D3D_OK);
131 - return D3D_OK;
132 - }
133 - }
134 - if(riid == IID_IDirect3DViewport)
135 - {
136 - if(This->glD3DV1)
137 - {
138 - *ppvObj = This->glD3DV1;
139 - glDirect3DViewport1_AddRef(This->glD3DV1);
140 - TRACE_VAR("*ppvObj",14,*ppvObj);
141 - TRACE_EXIT(23,D3D_OK);
142 - return D3D_OK;
143 - }
144 - else
145 - {
146 - ret = glDirect3DViewport1_Create(This, (LPDIRECT3DVIEWPORT*)ppvObj);
147 - if (ret != DD_OK) TRACE_RET(HRESULT, 23, ret);
148 - glDirect3DViewport3_AddRef(This);
149 - This->glD3DV1 = (glDirect3DViewport1*)*ppvObj;
150 - TRACE_VAR("*ppvObj",14,*ppvObj);
151 - TRACE_EXIT(23,D3D_OK);
152 - return D3D_OK;
153 - }
154 - }
155104 TRACE_EXIT(23,E_NOINTERFACE);
156105 return E_NOINTERFACE;
157106 }
@@ -476,328 +425,5 @@
477426 TRACE_EXIT(0,0);
478427 }
479428
480 -glDirect3DViewport2Vtbl glDirect3DViewport2_iface =
481 -{
482 - glDirect3DViewport2_QueryInterface,
483 - glDirect3DViewport2_AddRef,
484 - glDirect3DViewport2_Release,
485 - glDirect3DViewport2_Initialize,
486 - glDirect3DViewport2_GetViewport,
487 - glDirect3DViewport2_SetViewport,
488 - glDirect3DViewport2_TransformVertices,
489 - glDirect3DViewport2_LightElements,
490 - glDirect3DViewport2_SetBackground,
491 - glDirect3DViewport2_GetBackground,
492 - glDirect3DViewport2_SetBackgroundDepth,
493 - glDirect3DViewport2_GetBackgroundDepth,
494 - glDirect3DViewport2_Clear,
495 - glDirect3DViewport2_AddLight,
496 - glDirect3DViewport2_DeleteLight,
497 - glDirect3DViewport2_NextLight,
498 - glDirect3DViewport2_GetViewport2,
499 - glDirect3DViewport2_SetViewport2
500 -};
501429
502 -HRESULT glDirect3DViewport2_Create(glDirect3DViewport3 *glD3DV3, LPDIRECT3DVIEWPORT2 *viewport)
503 -{
504 - glDirect3DViewport2 *newvp;
505 - TRACE_ENTER(2, 14, glD3DV3, 14, viewport);
506 - if (!viewport) TRACE_RET(HRESULT, 23, DDERR_INVALIDPARAMS);
507 - newvp = (glDirect3DViewport2*)malloc(sizeof(glDirect3DViewport2));
508 - if (!newvp) TRACE_RET(HRESULT, 23, DDERR_INVALIDPARAMS);
509 - *viewport = (LPDIRECT3DVIEWPORT2)newvp;
510 - newvp->lpVtbl = &glDirect3DViewport2_iface;
511 - newvp->glD3DV3 = glD3DV3;
512 - newvp->refcount = 1;
513 - TRACE_EXIT(23, DD_OK);
514 - return DD_OK;
515 -}
516 -
517 -ULONG WINAPI glDirect3DViewport2_AddRef(glDirect3DViewport2 *This)
518 -{
519 - TRACE_ENTER(1,14,This);
520 - if(!This) TRACE_RET(ULONG,8,0);
521 - This->refcount++;
522 - TRACE_EXIT(8,This->refcount);
523 - return This->refcount;
524 -}
525 -
526 -ULONG WINAPI glDirect3DViewport2_Release(glDirect3DViewport2 *This)
527 -{
528 - TRACE_ENTER(1,14,This);
529 - if(!This) TRACE_RET(ULONG,8,0);
530 - ULONG ret;
531 - This->refcount--;
532 - ret = This->refcount;
533 - if (This->refcount == 0)
534 - {
535 - This->glD3DV3->glD3DV2 = NULL;
536 - glDirect3DViewport3_Release(This->glD3DV3);
537 - free(This);
538 - }
539 - TRACE_EXIT(8,ret);
540 - return ret;
541 -}
542 -
543 -HRESULT WINAPI glDirect3DViewport2_QueryInterface(glDirect3DViewport2 *This, REFIID riid, void** ppvObj)
544 -{
545 - TRACE_ENTER(3,14,This,24,&riid,14,ppvObj);
546 - if(!This) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
547 - if(riid == IID_IUnknown)
548 - {
549 - glDirect3DViewport2_AddRef(This);
550 - *ppvObj = This;
551 - TRACE_VAR("*ppvObj",14,*ppvObj);
552 - TRACE_EXIT(23,D3D_OK);
553 - return D3D_OK;
554 - }
555 - TRACE_RET(HRESULT,23,glDirect3DViewport3_QueryInterface(This->glD3DV3,riid,ppvObj));
556 -}
557 -
558 -HRESULT WINAPI glDirect3DViewport2_AddLight(glDirect3DViewport2 *This, LPDIRECT3DLIGHT lpLight)
559 -{
560 - TRACE_ENTER(2,14,This,14,lpLight);
561 - if(!This) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
562 - TRACE_RET(HRESULT,23,glDirect3DViewport3_AddLight(This->glD3DV3,lpLight));
563 -}
564 -HRESULT WINAPI glDirect3DViewport2_Clear(glDirect3DViewport2 *This, DWORD dwCount, LPD3DRECT lpRects, DWORD dwFlags)
565 -{
566 - TRACE_ENTER(4,14,This,9,dwCount,14,lpRects,9,dwFlags);
567 - if(!This) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
568 - TRACE_RET(HRESULT,23,glDirect3DViewport3_Clear(This->glD3DV3,dwCount,lpRects,dwFlags));
569 -}
570 -HRESULT WINAPI glDirect3DViewport2_DeleteLight(glDirect3DViewport2 *This, LPDIRECT3DLIGHT lpDirect3DLight)
571 -{
572 - TRACE_ENTER(2,14,This,14,lpDirect3DLight);
573 - if(!This) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
574 - TRACE_RET(HRESULT,23,glDirect3DViewport3_DeleteLight(This->glD3DV3,lpDirect3DLight));
575 -}
576 -HRESULT WINAPI glDirect3DViewport2_GetBackground(glDirect3DViewport2 *This, LPD3DMATERIALHANDLE lphMat, LPBOOL lpValid)
577 -{
578 - TRACE_ENTER(3,14,This,14,lphMat,14,lpValid);
579 - if(!This) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
580 - TRACE_RET(HRESULT,23,glDirect3DViewport3_GetBackground(This->glD3DV3,lphMat,lpValid));
581 -}
582 -HRESULT WINAPI glDirect3DViewport2_GetBackgroundDepth(glDirect3DViewport2 *This, LPDIRECTDRAWSURFACE* lplpDDSurface, LPBOOL lpValid)
583 -{
584 - TRACE_ENTER(3,14,This,14,lplpDDSurface,14,lpValid);
585 - if(!This) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
586 - TRACE_RET(HRESULT,23,glDirect3DViewport3_GetBackgroundDepth(This->glD3DV3,lplpDDSurface,lpValid));
587 -}
588 -HRESULT WINAPI glDirect3DViewport2_GetViewport(glDirect3DViewport2 *This, LPD3DVIEWPORT lpData)
589 -{
590 - TRACE_ENTER(2,14,This,14,lpData);
591 - if(!This) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
592 - TRACE_RET(HRESULT,23,glDirect3DViewport3_GetViewport(This->glD3DV3,lpData));
593 -}
594 -HRESULT WINAPI glDirect3DViewport2_GetViewport2(glDirect3DViewport2 *This, LPD3DVIEWPORT2 lpData)
595 -{
596 - TRACE_ENTER(2,14,This,14,lpData);
597 - if(!This) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
598 - TRACE_RET(HRESULT,23,glDirect3DViewport3_GetViewport2(This->glD3DV3,lpData));
599 -}
600 -HRESULT WINAPI glDirect3DViewport2_Initialize(glDirect3DViewport2 *This, LPDIRECT3D lpDirect3D)
601 -{
602 - TRACE_ENTER(2,14,This,14,lpDirect3D);
603 - if(!This) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
604 - TRACE_RET(HRESULT,23,glDirect3DViewport3_Initialize(This->glD3DV3,lpDirect3D));
605 -}
606 -HRESULT WINAPI glDirect3DViewport2_LightElements(glDirect3DViewport2 *This, DWORD dwElementCount, LPD3DLIGHTDATA lpData)
607 -{
608 - TRACE_ENTER(3,14,This,8,dwElementCount,14,lpData);
609 - if(!This) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
610 - TRACE_RET(HRESULT,23,glDirect3DViewport3_LightElements(This->glD3DV3,dwElementCount,lpData));
611 -}
612 -HRESULT WINAPI glDirect3DViewport2_NextLight(glDirect3DViewport2 *This, LPDIRECT3DLIGHT lpDirect3DLight, LPDIRECT3DLIGHT* lplpDirect3DLight, DWORD dwFlags)
613 -{
614 - TRACE_ENTER(4,14,This,14,lpDirect3DLight,14,lplpDirect3DLight,9,dwFlags);
615 - if(!This) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
616 - TRACE_RET(HRESULT,23,glDirect3DViewport3_NextLight(This->glD3DV3,lpDirect3DLight,lplpDirect3DLight,dwFlags));
617 -}
618 -HRESULT WINAPI glDirect3DViewport2_SetBackground(glDirect3DViewport2 *This, D3DMATERIALHANDLE hMat)
619 -{
620 - TRACE_ENTER(2,14,This,9,hMat);
621 - if(!This) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
622 - TRACE_RET(HRESULT,23,glDirect3DViewport3_SetBackground(This->glD3DV3,hMat));
623 -}
624 -HRESULT WINAPI glDirect3DViewport2_SetBackgroundDepth(glDirect3DViewport2 *This, LPDIRECTDRAWSURFACE lpDDSurface)
625 -{
626 - TRACE_ENTER(2,14,This,14,lpDDSurface);
627 - if(!This) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
628 - TRACE_RET(HRESULT,23,glDirect3DViewport3_SetBackgroundDepth(This->glD3DV3,lpDDSurface));
629 -}
630 -HRESULT WINAPI glDirect3DViewport2_SetViewport(glDirect3DViewport2 *This, LPD3DVIEWPORT lpData)
631 -{
632 - TRACE_ENTER(2,14,This,14,lpData);
633 - if(!This) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
634 - TRACE_RET(HRESULT,23,glDirect3DViewport3_SetViewport(This->glD3DV3,lpData));
635 -}
636 -HRESULT WINAPI glDirect3DViewport2_SetViewport2(glDirect3DViewport2 *This, LPD3DVIEWPORT2 lpData)
637 -{
638 - TRACE_ENTER(2,14,This,14,lpData);
639 - if(!This) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
640 - TRACE_RET(HRESULT,23,glDirect3DViewport3_SetViewport2(This->glD3DV3,lpData));
641 -}
642 -HRESULT WINAPI glDirect3DViewport2_TransformVertices(glDirect3DViewport2 *This, DWORD dwVertexCount, LPD3DTRANSFORMDATA lpData, DWORD dwFlags, LPDWORD lpOffscreen)
643 -{
644 - TRACE_ENTER(5,14,This,8,dwVertexCount,14,lpData,9,dwFlags,14,lpOffscreen);
645 - if(!This) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
646 - TRACE_RET(HRESULT,23,glDirect3DViewport3_TransformVertices(This->glD3DV3,dwVertexCount,lpData,dwFlags,lpOffscreen));
647 -}
648 -
649 -
650 -glDirect3DViewport1Vtbl glDirect3DViewport1_iface =
651 -{
652 - glDirect3DViewport1_QueryInterface,
653 - glDirect3DViewport1_AddRef,
654 - glDirect3DViewport1_Release,
655 - glDirect3DViewport1_Initialize,
656 - glDirect3DViewport1_GetViewport,
657 - glDirect3DViewport1_SetViewport,
658 - glDirect3DViewport1_TransformVertices,
659 - glDirect3DViewport1_LightElements,
660 - glDirect3DViewport1_SetBackground,
661 - glDirect3DViewport1_GetBackground,
662 - glDirect3DViewport1_SetBackgroundDepth,
663 - glDirect3DViewport1_GetBackgroundDepth,
664 - glDirect3DViewport1_Clear,
665 - glDirect3DViewport1_AddLight,
666 - glDirect3DViewport1_DeleteLight,
667 - glDirect3DViewport1_NextLight
668 -};
669 -
670 -HRESULT glDirect3DViewport1_Create(glDirect3DViewport3 *glD3DV3, LPDIRECT3DVIEWPORT *viewport)
671 -{
672 - glDirect3DViewport1 *newvp;
673 - TRACE_ENTER(2, 14, glD3DV3, 14, viewport);
674 - if (!viewport) TRACE_RET(HRESULT, 23, DDERR_INVALIDPARAMS);
675 - newvp = (glDirect3DViewport1*)malloc(sizeof(glDirect3DViewport1));
676 - if (!newvp) TRACE_RET(HRESULT, 23, DDERR_INVALIDPARAMS);
677 - *viewport = (LPDIRECT3DVIEWPORT)newvp;
678 - newvp->lpVtbl = &glDirect3DViewport1_iface;
679 - newvp->glD3DV3 = glD3DV3;
680 - newvp->refcount = 1;
681 - TRACE_EXIT(23, DD_OK);
682 - return DD_OK;
683 -}
684 -
685 -ULONG WINAPI glDirect3DViewport1_AddRef(glDirect3DViewport1 *This)
686 -{
687 - TRACE_ENTER(1,14,This);
688 - if(!This) TRACE_RET(ULONG,8,0);
689 - This->refcount++;
690 - TRACE_EXIT(8,This->refcount);
691 - return This->refcount;
692 -}
693 -
694 -ULONG WINAPI glDirect3DViewport1_Release(glDirect3DViewport1 *This)
695 -{
696 - TRACE_ENTER(1,14,This);
697 - if(!This) TRACE_RET(ULONG,8,0);
698 - ULONG ret;
699 - This->refcount--;
700 - ret = This->refcount;
701 - if (This->refcount == 0)
702 - {
703 - This->glD3DV3->glD3DV1 = NULL;
704 - glDirect3DViewport3_Release(This->glD3DV3);
705 - free(This);
706 - }
707 - TRACE_EXIT(8, ret);
708 - return ret;
709 -}
710 -
711 -HRESULT WINAPI glDirect3DViewport1_QueryInterface(glDirect3DViewport1 *This, REFIID riid, void** ppvObj)
712 -{
713 - TRACE_ENTER(3,14,This,24,&riid,14,ppvObj);
714 - if(riid == IID_IUnknown)
715 - {
716 - glDirect3DViewport1_AddRef(This);
717 - *ppvObj = This;
718 - TRACE_VAR("*ppvObj",14,*ppvObj);
719 - TRACE_EXIT(23,D3D_OK);
720 - return D3D_OK;
721 - }
722 - TRACE_RET(HRESULT,23,glDirect3DViewport3_QueryInterface(This->glD3DV3,riid,ppvObj));
723 -}
724 -
725 -HRESULT WINAPI glDirect3DViewport1_AddLight(glDirect3DViewport1 *This, LPDIRECT3DLIGHT lpLight)
726 -{
727 - TRACE_ENTER(2,14,This,14,lpLight);
728 - if(!This) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
729 - TRACE_RET(HRESULT,23,glDirect3DViewport3_AddLight(This->glD3DV3,lpLight));
730 -}
731 -HRESULT WINAPI glDirect3DViewport1_Clear(glDirect3DViewport1 *This, DWORD dwCount, LPD3DRECT lpRects, DWORD dwFlags)
732 -{
733 - TRACE_ENTER(4,14,This,8,dwCount,14,lpRects,9,dwFlags);
734 - if(!This) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
735 - TRACE_RET(HRESULT,23,glDirect3DViewport3_Clear(This->glD3DV3,dwCount,lpRects,dwFlags));
736 -}
737 -HRESULT WINAPI glDirect3DViewport1_DeleteLight(glDirect3DViewport1 *This, LPDIRECT3DLIGHT lpDirect3DLight)
738 -{
739 - TRACE_ENTER(2,14,This,14,lpDirect3DLight);
740 - if(!This) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
741 - TRACE_RET(HRESULT,23,glDirect3DViewport3_DeleteLight(This->glD3DV3,lpDirect3DLight));
742 -}
743 -HRESULT WINAPI glDirect3DViewport1_GetBackground(glDirect3DViewport1 *This, LPD3DMATERIALHANDLE lphMat, LPBOOL lpValid)
744 -{
745 - TRACE_ENTER(3,14,This,14,lphMat,14,lpValid);
746 - if(!This) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
747 - TRACE_RET(HRESULT,23,glDirect3DViewport3_GetBackground(This->glD3DV3,lphMat,lpValid));
748 -}
749 -HRESULT WINAPI glDirect3DViewport1_GetBackgroundDepth(glDirect3DViewport1 *This, LPDIRECTDRAWSURFACE* lplpDDSurface, LPBOOL lpValid)
750 -{
751 - TRACE_ENTER(3,14,This,14,lplpDDSurface,14,lpValid);
752 - if(!This) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
753 - TRACE_RET(HRESULT,23,glDirect3DViewport3_GetBackgroundDepth(This->glD3DV3,lplpDDSurface,lpValid));
754 -}
755 -HRESULT WINAPI glDirect3DViewport1_GetViewport(glDirect3DViewport1 *This, LPD3DVIEWPORT lpData)
756 -{
757 - TRACE_ENTER(2,14,This,14,lpData);
758 - if(!This) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
759 - TRACE_RET(HRESULT,23,glDirect3DViewport3_GetViewport(This->glD3DV3,lpData));
760 -}
761 -HRESULT WINAPI glDirect3DViewport1_Initialize(glDirect3DViewport1 *This, LPDIRECT3D lpDirect3D)
762 -{
763 - TRACE_ENTER(2,14,This,14,lpDirect3D);
764 - if(!This) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
765 - TRACE_RET(HRESULT,23,glDirect3DViewport3_Initialize(This->glD3DV3,lpDirect3D));
766 -}
767 -HRESULT WINAPI glDirect3DViewport1_LightElements(glDirect3DViewport1 *This, DWORD dwElementCount, LPD3DLIGHTDATA lpData)
768 -{
769 - TRACE_ENTER(3,14,This,8,dwElementCount,14,lpData);
770 - if(!This) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
771 - return glDirect3DViewport3_LightElements(This->glD3DV3,dwElementCount,lpData);
772 -}
773 -HRESULT WINAPI glDirect3DViewport1_NextLight(glDirect3DViewport1 *This, LPDIRECT3DLIGHT lpDirect3DLight, LPDIRECT3DLIGHT* lplpDirect3DLight, DWORD dwFlags)
774 -{
775 - TRACE_ENTER(4,14,This,14,lpDirect3DLight,14,lplpDirect3DLight,9,dwFlags);
776 - if(!This) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
777 - TRACE_RET(HRESULT,23,glDirect3DViewport3_NextLight(This->glD3DV3,lpDirect3DLight,lplpDirect3DLight,dwFlags));
778 -}
779 -HRESULT WINAPI glDirect3DViewport1_SetBackground(glDirect3DViewport1 *This, D3DMATERIALHANDLE hMat)
780 -{
781 - TRACE_ENTER(2,14,This,9,hMat);
782 - if(!This) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
783 - TRACE_RET(HRESULT,23,glDirect3DViewport3_SetBackground(This->glD3DV3,hMat));
784 -}
785 -HRESULT WINAPI glDirect3DViewport1_SetBackgroundDepth(glDirect3DViewport1 *This, LPDIRECTDRAWSURFACE lpDDSurface)
786 -{
787 - TRACE_ENTER(2,14,This,14,lpDDSurface);
788 - if(!This) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
789 - TRACE_RET(HRESULT,23,glDirect3DViewport3_SetBackgroundDepth(This->glD3DV3,lpDDSurface));
790 -}
791 -HRESULT WINAPI glDirect3DViewport1_SetViewport(glDirect3DViewport1 *This, LPD3DVIEWPORT lpData)
792 -{
793 - TRACE_ENTER(2,14,This,14,lpData);
794 - if(!This) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
795 - TRACE_RET(HRESULT,23,glDirect3DViewport3_SetViewport(This->glD3DV3,lpData));
796 -}
797 -HRESULT WINAPI glDirect3DViewport1_TransformVertices(glDirect3DViewport1 *This, DWORD dwVertexCount, LPD3DTRANSFORMDATA lpData, DWORD dwFlags, LPDWORD lpOffscreen)
798 -{
799 - TRACE_ENTER(5,14,This,8,dwVertexCount,14,lpData,9,dwFlags,14,lpOffscreen);
800 - if(!This) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
801 - TRACE_RET(HRESULT,23,glDirect3DViewport3_TransformVertices(This->glD3DV3,dwVertexCount,lpData,dwFlags,lpOffscreen));
802 -}
803 -
804430 }
\ No newline at end of file
Index: ddraw/glDirect3DViewport.h
@@ -30,16 +30,11 @@
3131 typedef int glDirectDrawSurface7;
3232 #endif
3333
34 -struct glDirect3DViewport1;
35 -struct glDirect3DViewport2;
36 -
3734 struct glDirect3DViewport3Vtbl;
3835
3936 typedef struct glDirect3DViewport3
4037 {
4138 glDirect3DViewport3Vtbl *lpVtbl;
42 - glDirect3DViewport2 *glD3DV2;
43 - glDirect3DViewport1 *glD3DV1;
4439 ULONG refcount;
4540 glDirect3DLight *lights[8];
4641 glDirect3DDevice7 *device;
@@ -107,107 +102,7 @@
108103 HRESULT WINAPI glDirect3DViewport3_Clear2(glDirect3DViewport3 *This, DWORD dwCount, LPD3DRECT lpRects, DWORD dwFlags, DWORD dwColor, D3DVALUE dvZ, DWORD dwStencil);
109104
110105
111 -struct glDirect3DViewport2Vtbl;
112106
113 -typedef struct glDirect3DViewport2
114 -{
115 - glDirect3DViewport2Vtbl *lpVtbl;
116 - glDirect3DViewport3 *glD3DV3;
117 - int refcount;
118 -};
119 -
120 -typedef struct glDirect3DViewport2Vtbl
121 -{
122 - HRESULT(WINAPI *QueryInterface)(glDirect3DViewport2 *This, REFIID riid, void** ppvObj);
123 - ULONG(WINAPI *AddRef)(glDirect3DViewport2 *This);
124 - ULONG(WINAPI *Release)(glDirect3DViewport2 *This);
125 - HRESULT(WINAPI *Initialize)(glDirect3DViewport2 *This, LPDIRECT3D lpDirect3D);
126 - HRESULT(WINAPI *GetViewport)(glDirect3DViewport2 *This, LPD3DVIEWPORT lpData);
127 - HRESULT(WINAPI *SetViewport)(glDirect3DViewport2 *This, LPD3DVIEWPORT lpData);
128 - HRESULT(WINAPI *TransformVertices)(glDirect3DViewport2 *This, DWORD dwVertexCount, LPD3DTRANSFORMDATA lpData, DWORD dwFlags, LPDWORD lpOffscreen);
129 - HRESULT(WINAPI *LightElements)(glDirect3DViewport2 *This, DWORD dwElementCount, LPD3DLIGHTDATA lpData);
130 - HRESULT(WINAPI *SetBackground)(glDirect3DViewport2 *This, D3DMATERIALHANDLE hMat);
131 - HRESULT(WINAPI *GetBackground)(glDirect3DViewport2 *This, LPD3DMATERIALHANDLE lphMat, LPBOOL lpValid);
132 - HRESULT(WINAPI *SetBackgroundDepth)(glDirect3DViewport2 *This, LPDIRECTDRAWSURFACE lpDDSurface);
133 - HRESULT(WINAPI *GetBackgroundDepth)(glDirect3DViewport2 *This, LPDIRECTDRAWSURFACE* lplpDDSurface, LPBOOL lpValid);
134 - HRESULT(WINAPI *Clear)(glDirect3DViewport2 *This, DWORD dwCount, LPD3DRECT lpRects, DWORD dwFlags);
135 - HRESULT(WINAPI *AddLight)(glDirect3DViewport2 *This, LPDIRECT3DLIGHT lpLight);
136 - HRESULT(WINAPI *DeleteLight)(glDirect3DViewport2 *This, LPDIRECT3DLIGHT lpDirect3DLight);
137 - HRESULT(WINAPI *NextLight)(glDirect3DViewport2 *This, LPDIRECT3DLIGHT lpDirect3DLight, LPDIRECT3DLIGHT* lplpDirect3DLight, DWORD dwFlags);
138 - HRESULT(WINAPI *GetViewport2)(glDirect3DViewport2 *This, LPD3DVIEWPORT2 lpData);
139 - HRESULT(WINAPI *SetViewport2)(glDirect3DViewport2 *This, LPD3DVIEWPORT2 lpData);
140 -};
141 -
142 -HRESULT glDirect3DViewport2_Create(glDirect3DViewport3 *glD3DV3, LPDIRECT3DVIEWPORT2 *viewport);
143 -
144 -HRESULT WINAPI glDirect3DViewport2_QueryInterface(glDirect3DViewport2 *This, REFIID riid, void** ppvObj);
145 -ULONG WINAPI glDirect3DViewport2_AddRef(glDirect3DViewport2 *This);
146 -ULONG WINAPI glDirect3DViewport2_Release(glDirect3DViewport2 *This);
147 -HRESULT WINAPI glDirect3DViewport2_AddLight(glDirect3DViewport2 *This, LPDIRECT3DLIGHT lpLight);
148 -HRESULT WINAPI glDirect3DViewport2_Clear(glDirect3DViewport2 *This, DWORD dwCount, LPD3DRECT lpRects, DWORD dwFlags);
149 -HRESULT WINAPI glDirect3DViewport2_DeleteLight(glDirect3DViewport2 *This, LPDIRECT3DLIGHT lpDirect3DLight);
150 -HRESULT WINAPI glDirect3DViewport2_GetBackground(glDirect3DViewport2 *This, LPD3DMATERIALHANDLE lphMat, LPBOOL lpValid);
151 -HRESULT WINAPI glDirect3DViewport2_GetBackgroundDepth(glDirect3DViewport2 *This, LPDIRECTDRAWSURFACE* lplpDDSurface, LPBOOL lpValid);
152 -HRESULT WINAPI glDirect3DViewport2_GetViewport(glDirect3DViewport2 *This, LPD3DVIEWPORT lpData);
153 -HRESULT WINAPI glDirect3DViewport2_GetViewport2(glDirect3DViewport2 *This, LPD3DVIEWPORT2 lpData);
154 -HRESULT WINAPI glDirect3DViewport2_Initialize(glDirect3DViewport2 *This, LPDIRECT3D lpDirect3D);
155 -HRESULT WINAPI glDirect3DViewport2_LightElements(glDirect3DViewport2 *This, DWORD dwElementCount, LPD3DLIGHTDATA lpData);
156 -HRESULT WINAPI glDirect3DViewport2_NextLight(glDirect3DViewport2 *This, LPDIRECT3DLIGHT lpDirect3DLight, LPDIRECT3DLIGHT* lplpDirect3DLight, DWORD dwFlags);
157 -HRESULT WINAPI glDirect3DViewport2_SetBackground(glDirect3DViewport2 *This, D3DMATERIALHANDLE hMat);
158 -HRESULT WINAPI glDirect3DViewport2_SetBackgroundDepth(glDirect3DViewport2 *This, LPDIRECTDRAWSURFACE lpDDSurface);
159 -HRESULT WINAPI glDirect3DViewport2_SetViewport(glDirect3DViewport2 *This, LPD3DVIEWPORT lpData);
160 -HRESULT WINAPI glDirect3DViewport2_SetViewport2(glDirect3DViewport2 *This, LPD3DVIEWPORT2 lpData);
161 -HRESULT WINAPI glDirect3DViewport2_TransformVertices(glDirect3DViewport2 *This, DWORD dwVertexCount, LPD3DTRANSFORMDATA lpData, DWORD dwFlags, LPDWORD lpOffscreen);
162 -
163 -
164 -struct glDirect3DViewport1Vtbl;
165 -
166 -typedef struct glDirect3DViewport1
167 -{
168 - glDirect3DViewport1Vtbl *lpVtbl;
169 - glDirect3DViewport3 *glD3DV3;
170 - int refcount;
171 -};
172 -
173 -typedef struct glDirect3DViewport1Vtbl
174 -{
175 - HRESULT(WINAPI *QueryInterface)(glDirect3DViewport1 *This, REFIID riid, void** ppvObj);
176 - ULONG(WINAPI *AddRef)(glDirect3DViewport1 *This);
177 - ULONG(WINAPI *Release)(glDirect3DViewport1 *This);
178 - HRESULT(WINAPI *Initialize)(glDirect3DViewport1 *This, LPDIRECT3D lpDirect3D);
179 - HRESULT(WINAPI *GetViewport)(glDirect3DViewport1 *This, LPD3DVIEWPORT lpData);
180 - HRESULT(WINAPI *SetViewport)(glDirect3DViewport1 *This, LPD3DVIEWPORT lpData);
181 - HRESULT(WINAPI *TransformVertices)(glDirect3DViewport1 *This, DWORD dwVertexCount, LPD3DTRANSFORMDATA lpData, DWORD dwFlags, LPDWORD lpOffscreen);
182 - HRESULT(WINAPI *LightElements)(glDirect3DViewport1 *This, DWORD dwElementCount, LPD3DLIGHTDATA lpData);
183 - HRESULT(WINAPI *SetBackground)(glDirect3DViewport1 *This, D3DMATERIALHANDLE hMat);
184 - HRESULT(WINAPI *GetBackground)(glDirect3DViewport1 *This, LPD3DMATERIALHANDLE lphMat, LPBOOL lpValid);
185 - HRESULT(WINAPI *SetBackgroundDepth)(glDirect3DViewport1 *This, LPDIRECTDRAWSURFACE lpDDSurface);
186 - HRESULT(WINAPI *GetBackgroundDepth)(glDirect3DViewport1 *This, LPDIRECTDRAWSURFACE* lplpDDSurface, LPBOOL lpValid);
187 - HRESULT(WINAPI *Clear)(glDirect3DViewport1 *This, DWORD dwCount, LPD3DRECT lpRects, DWORD dwFlags);
188 - HRESULT(WINAPI *AddLight)(glDirect3DViewport1 *This, LPDIRECT3DLIGHT lpLight);
189 - HRESULT(WINAPI *DeleteLight)(glDirect3DViewport1 *This, LPDIRECT3DLIGHT lpDirect3DLight);
190 - HRESULT(WINAPI *NextLight)(glDirect3DViewport1 *This, LPDIRECT3DLIGHT lpDirect3DLight, LPDIRECT3DLIGHT* lplpDirect3DLight, DWORD dwFlags);
191 -};
192 -
193 -HRESULT glDirect3DViewport1_Create(glDirect3DViewport3 *glD3DV3, LPDIRECT3DVIEWPORT *viewport);
194 -
195 -HRESULT WINAPI glDirect3DViewport1_QueryInterface(glDirect3DViewport1 *This, REFIID riid, void** ppvObj);
196 -ULONG WINAPI glDirect3DViewport1_AddRef(glDirect3DViewport1 *This);
197 -ULONG WINAPI glDirect3DViewport1_Release(glDirect3DViewport1 *This);
198 -HRESULT WINAPI glDirect3DViewport1_AddLight(glDirect3DViewport1 *This, LPDIRECT3DLIGHT lpLight);
199 -HRESULT WINAPI glDirect3DViewport1_Clear(glDirect3DViewport1 *This, DWORD dwCount, LPD3DRECT lpRects, DWORD dwFlags);
200 -HRESULT WINAPI glDirect3DViewport1_DeleteLight(glDirect3DViewport1 *This, LPDIRECT3DLIGHT lpDirect3DLight);
201 -HRESULT WINAPI glDirect3DViewport1_GetBackground(glDirect3DViewport1 *This, LPD3DMATERIALHANDLE lphMat, LPBOOL lpValid);
202 -HRESULT WINAPI glDirect3DViewport1_GetBackgroundDepth(glDirect3DViewport1 *This, LPDIRECTDRAWSURFACE* lplpDDSurface, LPBOOL lpValid);
203 -HRESULT WINAPI glDirect3DViewport1_GetViewport(glDirect3DViewport1 *This, LPD3DVIEWPORT lpData);
204 -HRESULT WINAPI glDirect3DViewport1_Initialize(glDirect3DViewport1 *This, LPDIRECT3D lpDirect3D);
205 -HRESULT WINAPI glDirect3DViewport1_LightElements(glDirect3DViewport1 *This, DWORD dwElementCount, LPD3DLIGHTDATA lpData);
206 -HRESULT WINAPI glDirect3DViewport1_NextLight(glDirect3DViewport1 *This, LPDIRECT3DLIGHT lpDirect3DLight, LPDIRECT3DLIGHT* lplpDirect3DLight, DWORD dwFlags);
207 -HRESULT WINAPI glDirect3DViewport1_SetBackground(glDirect3DViewport1 *This, D3DMATERIALHANDLE hMat);
208 -HRESULT WINAPI glDirect3DViewport1_SetBackgroundDepth(glDirect3DViewport1 *This, LPDIRECTDRAWSURFACE lpDDSurface);
209 -HRESULT WINAPI glDirect3DViewport1_SetViewport(glDirect3DViewport1 *This, LPD3DVIEWPORT lpData);
210 -HRESULT WINAPI glDirect3DViewport1_TransformVertices(glDirect3DViewport1 *This, DWORD dwVertexCount, LPD3DTRANSFORMDATA lpData, DWORD dwFlags, LPDWORD lpOffscreen);
211 -
212107 #ifdef __cplusplus
213108 }
214109 #endif