Changeset 79767 in vbox for trunk/src/VBox
- Timestamp:
- Jul 14, 2019 4:23:10 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/gallium/test/d3d9render.cpp
r76553 r79767 1149 1149 1150 1150 /* 1151 * Use ColorFill to clear a part of the backbuffer. 1152 */ 1153 1154 class D3D9RenderColorFill: public D3D9Render 1155 { 1156 public: 1157 D3D9RenderColorFill() {} 1158 virtual ~D3D9RenderColorFill() {} 1159 virtual HRESULT InitRender(D3D9DeviceProvider *pDP); 1160 virtual HRESULT DoRender(D3D9DeviceProvider *pDP); 1161 }; 1162 1163 HRESULT D3D9RenderColorFill::InitRender(D3D9DeviceProvider *pDP) 1164 { 1165 (void)pDP; 1166 return S_OK; 1167 } 1168 1169 HRESULT D3D9RenderColorFill::DoRender(D3D9DeviceProvider *pDP) 1170 { 1171 HRESULT hr = S_OK; 1172 1173 IDirect3DDevice9 *pDevice = pDP->Device(0); 1174 1175 pDevice->Clear(0, 0, D3DCLEAR_TARGET, 0xff0000ff, 0.0f, 0); 1176 1177 IDirect3DSurface9 *pBackBuffer = NULL; 1178 HTEST(pDevice->GetBackBuffer(0, 0, D3DBACKBUFFER_TYPE_MONO, &pBackBuffer)); 1179 1180 RECT rDst; 1181 rDst.left = 50; 1182 rDst.top = 10; 1183 rDst.right = 250; 1184 rDst.bottom = 250; 1185 1186 HTEST(pDevice->ColorFill(pBackBuffer, &rDst, D3DCOLOR_XRGB(0, 255, 0))); 1187 1188 D3D_RELEASE(pBackBuffer); 1189 1190 HTEST(pDevice->Present(0, 0, 0, 0)); 1191 return S_OK; 1192 } 1193 1194 1195 /* 1151 1196 * "Public" interface. 1152 1197 */ … … 1156 1201 switch (iRenderId) 1157 1202 { 1203 case 8: 1204 return new D3D9RenderColorFill(); 1158 1205 case 7: 1159 1206 return new D3D9RenderShared();
Note:
See TracChangeset
for help on using the changeset viewer.