Index: ddraw/glDirect3D.cpp |
— | — | @@ -195,6 +195,7 @@ |
196 | 196 | };
|
197 | 197 | glDirect3D7::glDirect3D7(glDirectDraw7 *glDD7)
|
198 | 198 | {
|
| 199 | + TRACE_ENTER(2,14,this,14,glDD7);
|
199 | 200 | refcount=1;
|
200 | 201 | this->glDD7 = glDD7;
|
201 | 202 | glDD7->AddRef();
|
— | — | @@ -201,39 +202,49 @@ |
202 | 203 | glD3D3 = NULL;
|
203 | 204 | glD3D2 = NULL;
|
204 | 205 | glD3D1 = NULL;
|
| 206 | + TRACE_EXIT(-1,0);
|
205 | 207 | }
|
206 | 208 |
|
207 | 209 | glDirect3D7::~glDirect3D7()
|
208 | 210 | {
|
| 211 | + TRACE_ENTER(1,14,this);
|
209 | 212 | if(glD3D3) glD3D3->Release();
|
210 | 213 | if(glD3D2) glD3D2->Release();
|
211 | 214 | glDD7->Release();
|
| 215 | + TRACE_EXIT(-1,0);
|
212 | 216 | }
|
213 | 217 |
|
214 | 218 | ULONG WINAPI glDirect3D7::AddRef()
|
215 | 219 | {
|
216 | | - if(!this) return 0;
|
| 220 | + TRACE_ENTER(1,14,this);
|
| 221 | + if(!this) TRACE_RET(8,0);
|
217 | 222 | refcount++;
|
| 223 | + TRACE_EXIT(8,refcount);
|
218 | 224 | return refcount;
|
219 | 225 | }
|
220 | 226 | ULONG WINAPI glDirect3D7::Release()
|
221 | 227 | {
|
222 | | - if(!this) return 0;
|
| 228 | + TRACE_ENTER(1,14,this);
|
| 229 | + if(!this) TRACE_RET(8,0);
|
223 | 230 | ULONG ret;
|
224 | 231 | refcount--;
|
225 | 232 | ret = refcount;
|
226 | 233 | if(refcount == 0) delete this;
|
| 234 | + TRACE_EXIT(8,refcount);
|
227 | 235 | return ret;
|
228 | 236 | }
|
229 | 237 |
|
230 | 238 | HRESULT WINAPI glDirect3D7::QueryInterface(REFIID riid, void** ppvObj)
|
231 | 239 | {
|
232 | | - if(!this) return DDERR_INVALIDOBJECT;
|
233 | | - if(!ppvObj) return DDERR_INVALIDPARAMS;
|
| 240 | + TRACE_ENTER(3,14,this,24,&riid,14,ppvObj);
|
| 241 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 242 | + if(!ppvObj) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
234 | 243 | if(riid == IID_IUnknown)
|
235 | 244 | {
|
236 | 245 | this->AddRef();
|
237 | 246 | *ppvObj = this;
|
| 247 | + TRACE_VAR("*ppvObj",14,*ppvObj);
|
| 248 | + TRACE_EXIT(23,D3D_OK);
|
238 | 249 | return D3D_OK;
|
239 | 250 | }
|
240 | 251 | if(riid == IID_IDirect3D3)
|
— | — | @@ -242,6 +253,8 @@ |
243 | 254 | {
|
244 | 255 | *ppvObj = glD3D3;
|
245 | 256 | glD3D3->AddRef();
|
| 257 | + TRACE_VAR("*ppvObj",14,*ppvObj);
|
| 258 | + TRACE_EXIT(23,D3D_OK);
|
246 | 259 | return D3D_OK;
|
247 | 260 | }
|
248 | 261 | else
|
— | — | @@ -249,6 +262,8 @@ |
250 | 263 | this->AddRef();
|
251 | 264 | *ppvObj = new glDirect3D3(this);
|
252 | 265 | glD3D3 = (glDirect3D3*)*ppvObj;
|
| 266 | + TRACE_VAR("*ppvObj",14,*ppvObj);
|
| 267 | + TRACE_EXIT(23,D3D_OK);
|
253 | 268 | return D3D_OK;
|
254 | 269 | }
|
255 | 270 | }
|
— | — | @@ -258,6 +273,8 @@ |
259 | 274 | {
|
260 | 275 | *ppvObj = glD3D2;
|
261 | 276 | glD3D2->AddRef();
|
| 277 | + TRACE_VAR("*ppvObj",14,*ppvObj);
|
| 278 | + TRACE_EXIT(23,D3D_OK);
|
262 | 279 | return D3D_OK;
|
263 | 280 | }
|
264 | 281 | else
|
— | — | @@ -265,6 +282,8 @@ |
266 | 283 | this->AddRef();
|
267 | 284 | *ppvObj = new glDirect3D2(this);
|
268 | 285 | glD3D2 = (glDirect3D2*)*ppvObj;
|
| 286 | + TRACE_VAR("*ppvObj",14,*ppvObj);
|
| 287 | + TRACE_EXIT(23,D3D_OK);
|
269 | 288 | return D3D_OK;
|
270 | 289 | }
|
271 | 290 | }
|
— | — | @@ -274,6 +293,8 @@ |
275 | 294 | {
|
276 | 295 | *ppvObj = glD3D1;
|
277 | 296 | glD3D1->AddRef();
|
| 297 | + TRACE_VAR("*ppvObj",14,*ppvObj);
|
| 298 | + TRACE_EXIT(23,D3D_OK);
|
278 | 299 | return D3D_OK;
|
279 | 300 | }
|
280 | 301 | else
|
— | — | @@ -281,9 +302,12 @@ |
282 | 303 | this->AddRef();
|
283 | 304 | *ppvObj = new glDirect3D1(this);
|
284 | 305 | glD3D1 = (glDirect3D1*)*ppvObj;
|
| 306 | + TRACE_VAR("*ppvObj",14,*ppvObj);
|
| 307 | + TRACE_EXIT(23,D3D_OK);
|
285 | 308 | return D3D_OK;
|
286 | 309 | }
|
287 | 310 | }
|
| 311 | + TRACE_EXIT(23,E_NOINTERFACE);
|
288 | 312 | return E_NOINTERFACE;
|
289 | 313 | }
|
290 | 314 |
|
— | — | @@ -290,55 +314,72 @@ |
291 | 315 |
|
292 | 316 | HRESULT WINAPI glDirect3D7::CreateDevice(REFCLSID rclsid, LPDIRECTDRAWSURFACE7 lpDDS, LPDIRECT3DDEVICE7 *lplpD3DDevice)
|
293 | 317 | {
|
294 | | - if(!this) return DDERR_INVALIDPARAMS;
|
| 318 | + TRACE_ENTER(4,14,this,24,&rclsid,14,lpDDS,14,lplpD3DDevice);
|
| 319 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
295 | 320 | HRESULT ret;
|
296 | 321 | glDirect3DDevice7 *glD3DDev7 = new glDirect3DDevice7(rclsid,this,(glDirectDrawSurface7*)lpDDS);
|
297 | | - if(!glD3DDev7) return DDERR_OUTOFMEMORY;
|
| 322 | + if(!glD3DDev7) TRACE_RET(23,DDERR_OUTOFMEMORY);
|
298 | 323 | if(FAILED(glD3DDev7->err()))
|
299 | 324 | {
|
300 | 325 | ret = glD3DDev7->err();
|
301 | 326 | delete glD3DDev7;
|
| 327 | + TRACE_EXIT(23,ret);
|
302 | 328 | return ret;
|
303 | 329 | }
|
304 | 330 | *lplpD3DDevice = (LPDIRECT3DDEVICE7) glD3DDev7;
|
| 331 | + TRACE_VAR("*lplpD3DDevice",14,*lplpD3DDevice);
|
| 332 | + TRACE_EXIT(23,D3D_OK);
|
305 | 333 | return D3D_OK;
|
306 | 334 | }
|
307 | 335 | HRESULT WINAPI glDirect3D7::CreateLight(LPDIRECT3DLIGHT* lplpDirect3DLight, IUnknown* pUnkOuter)
|
308 | 336 | {
|
309 | | - if(!this) return DDERR_INVALIDPARAMS;
|
310 | | - if(!lplpDirect3DLight) return DDERR_INVALIDPARAMS;
|
311 | | - if(pUnkOuter) return DDERR_INVALIDPARAMS;
|
| 337 | + TRACE_ENTER(3,14,this,14,lplpDirect3DLight,14,pUnkOuter);
|
| 338 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 339 | + if(!lplpDirect3DLight) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 340 | + if(pUnkOuter) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
312 | 341 | *lplpDirect3DLight = new glDirect3DLight();
|
| 342 | + TRACE_VAR("*lplpDirect3DLight",14,*lplpDirect3DLight);
|
| 343 | + TRACE_EXIT(23,D3D_OK);
|
313 | 344 | return D3D_OK;
|
314 | 345 | }
|
315 | 346 | HRESULT WINAPI glDirect3D7::CreateMaterial(LPDIRECT3DMATERIAL3* lplpDirect3DMaterial, IUnknown* pUnkOuter)
|
316 | 347 | {
|
317 | | - if(!this) return DDERR_INVALIDPARAMS;
|
318 | | - if(!lplpDirect3DMaterial) return D3D_OK;
|
319 | | - if(pUnkOuter) return DDERR_INVALIDPARAMS;
|
| 348 | + TRACE_ENTER(3,14,this,14,lplpDirect3DMaterial,14,pUnkOuter);
|
| 349 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 350 | + if(!lplpDirect3DMaterial) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 351 | + if(pUnkOuter) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
320 | 352 | *lplpDirect3DMaterial = new glDirect3DMaterial3();
|
| 353 | + TRACE_VAR("*lplpDirect3DMaterial",14,*lplpDirect3DMaterial);
|
| 354 | + TRACE_EXIT(23,D3D_OK);
|
321 | 355 | return D3D_OK;
|
322 | 356 | }
|
323 | 357 | HRESULT WINAPI glDirect3D7::CreateVertexBuffer(LPD3DVERTEXBUFFERDESC lpVBDesc, LPDIRECT3DVERTEXBUFFER7* lplpD3DVertexBuffer, DWORD dwFlags)
|
324 | 358 | {
|
325 | | - if(!this) return DDERR_INVALIDPARAMS;
|
326 | | - if(!lplpD3DVertexBuffer) return DDERR_INVALIDPARAMS;
|
327 | | - if(!lpVBDesc) return DDERR_INVALIDPARAMS;
|
| 359 | + TRACE_ENTER(4,14,this,14,lpVBDesc,14,lplpD3DVertexBuffer,9,dwFlags);
|
| 360 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 361 | + if(!lplpD3DVertexBuffer) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 362 | + if(!lpVBDesc) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
328 | 363 | *lplpD3DVertexBuffer = (LPDIRECT3DVERTEXBUFFER7)new glDirect3DVertexBuffer7(this,*lpVBDesc,dwFlags);
|
| 364 | + TRACE_VAR("*lplpD3DVertexBuffer",14,*lplpD3DVertexBuffer);
|
| 365 | + TRACE_EXIT(23,D3D_OK);
|
329 | 366 | return D3D_OK;
|
330 | 367 | }
|
331 | 368 | HRESULT WINAPI glDirect3D7::CreateViewport(LPDIRECT3DVIEWPORT3* lplpD3DViewport, IUnknown* pUnkOuter)
|
332 | 369 | {
|
333 | | - if(!this) return DDERR_INVALIDPARAMS;
|
334 | | - if(!lplpD3DViewport) return DDERR_INVALIDPARAMS;
|
335 | | - if(pUnkOuter) return DDERR_INVALIDPARAMS;
|
| 370 | + TRACE_ENTER(3,14,this,14,lplpD3DViewport,14,pUnkOuter);
|
| 371 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 372 | + if(!lplpD3DViewport) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 373 | + if(pUnkOuter) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
336 | 374 | *lplpD3DViewport = new glDirect3DViewport3();
|
| 375 | + TRACE_VAR("*lplpD3DViewport",14,*lplpD3DViewport);
|
| 376 | + TRACE_EXIT(23,D3D_OK);
|
337 | 377 | return D3D_OK;
|
338 | 378 | }
|
339 | 379 | HRESULT WINAPI glDirect3D7::EnumDevices(LPD3DENUMDEVICESCALLBACK7 lpEnumDevicesCallback, LPVOID lpUserArg)
|
340 | 380 | {
|
341 | | - if(!this) return DDERR_INVALIDPARAMS;
|
342 | | - if(!lpEnumDevicesCallback) return DDERR_INVALIDPARAMS;
|
| 381 | + TRACE_ENTER(3,14,this,14,lpEnumDevicesCallback,14,lpUserArg);
|
| 382 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 383 | + if(!lpEnumDevicesCallback) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
343 | 384 | HRESULT result;
|
344 | 385 | D3DDEVICEDESC7 desc = d3ddesc;
|
345 | 386 | for(int i = 0; i < 3; i++)
|
— | — | @@ -360,25 +401,29 @@ |
361 | 402 | result = lpEnumDevicesCallback(devices[i].name,devices[i].devname,&desc,lpUserArg);
|
362 | 403 | if(result != D3DENUMRET_OK) break;
|
363 | 404 | }
|
| 405 | + TRACE_EXIT(23,D3D_OK);
|
364 | 406 | return D3D_OK;
|
365 | 407 | }
|
366 | 408 |
|
367 | 409 | HRESULT WINAPI glDirect3D7::EnumDevices3(LPD3DENUMDEVICESCALLBACK lpEnumDevicesCallback, LPVOID lpUserArg)
|
368 | 410 | {
|
369 | | - if(!this) return DDERR_INVALIDPARAMS;
|
370 | | - if(!lpEnumDevicesCallback) return DDERR_INVALIDPARAMS;
|
| 411 | + TRACE_ENTER(3,14,this,14,lpEnumDevicesCallback,14,lpUserArg);
|
| 412 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 413 | + if(!lpEnumDevicesCallback) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
371 | 414 | HRESULT result;
|
372 | 415 | D3DDEVICEDESC desc = d3ddesc3;
|
373 | 416 | GUID guid = IID_IDirect3DRGBDevice;
|
374 | 417 | result = lpEnumDevicesCallback(&guid,devices[0].name,devices[0].devname,&desc,&desc,lpUserArg);
|
375 | | - if(result != D3DENUMRET_OK) return D3D_OK;
|
| 418 | + if(result != D3DENUMRET_OK) TRACE_RET(23,D3D_OK);
|
376 | 419 | guid = IID_IDirect3DHALDevice;
|
377 | 420 | result = lpEnumDevicesCallback(&guid,devices[1].name,devices[1].devname,&desc,&desc,lpUserArg);
|
| 421 | + TRACE_EXIT(23,D3D_OK);
|
378 | 422 | return D3D_OK;
|
379 | 423 | }
|
380 | 424 | HRESULT WINAPI glDirect3D7::EnumZBufferFormats(REFCLSID riidDevice, LPD3DENUMPIXELFORMATSCALLBACK lpEnumCallback, LPVOID lpContext)
|
381 | 425 | {
|
382 | | - if(!this) return DDERR_INVALIDPARAMS;
|
| 426 | + TRACE_ENTER(4,14,this,24,&riidDevice,14,lpEnumCallback,14,lpContext);
|
| 427 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
383 | 428 | DDPIXELFORMAT ddpf;
|
384 | 429 | ZeroMemory(&ddpf,sizeof(DDPIXELFORMAT));
|
385 | 430 | ddpf.dwSize = sizeof(DDPIXELFORMAT);
|
— | — | @@ -385,14 +430,14 @@ |
386 | 431 | ddpf.dwFlags = DDPF_ZBUFFER;
|
387 | 432 | ddpf.dwZBufferBitDepth = 16;
|
388 | 433 | ddpf.dwZBitMask = 0xffff;
|
389 | | - if(lpEnumCallback(&ddpf,lpContext) == D3DENUMRET_CANCEL) return D3D_OK;
|
| 434 | + if(lpEnumCallback(&ddpf,lpContext) == D3DENUMRET_CANCEL) TRACE_RET(23,D3D_OK);
|
390 | 435 | ddpf.dwZBufferBitDepth = 24;
|
391 | 436 | ddpf.dwZBitMask = 0xffffff00;
|
392 | | - if(lpEnumCallback(&ddpf,lpContext) == D3DENUMRET_CANCEL) return D3D_OK;
|
| 437 | + if(lpEnumCallback(&ddpf,lpContext) == D3DENUMRET_CANCEL) TRACE_RET(23,D3D_OK);
|
393 | 438 | ddpf.dwZBufferBitDepth = 32;
|
394 | | - if(lpEnumCallback(&ddpf,lpContext) == D3DENUMRET_CANCEL) return D3D_OK;
|
| 439 | + if(lpEnumCallback(&ddpf,lpContext) == D3DENUMRET_CANCEL) TRACE_RET(23,D3D_OK);
|
395 | 440 | ddpf.dwZBitMask = 0xffffffff;
|
396 | | - if(lpEnumCallback(&ddpf,lpContext) == D3DENUMRET_CANCEL) return D3D_OK;
|
| 441 | + if(lpEnumCallback(&ddpf,lpContext) == D3DENUMRET_CANCEL) TRACE_RET(23,D3D_OK);
|
397 | 442 | if(GLEXT_EXT_packed_depth_stencil || GLEXT_NV_packed_depth_stencil)
|
398 | 443 | {
|
399 | 444 | ddpf.dwZBufferBitDepth = 32;
|
— | — | @@ -399,25 +444,29 @@ |
400 | 445 | ddpf.dwStencilBitDepth = 8;
|
401 | 446 | ddpf.dwZBitMask = 0xffffff00;
|
402 | 447 | ddpf.dwStencilBitMask = 0xff;
|
403 | | - if(lpEnumCallback(&ddpf,lpContext) == D3DENUMRET_CANCEL) return D3D_OK;
|
| 448 | + if(lpEnumCallback(&ddpf,lpContext) == D3DENUMRET_CANCEL) TRACE_RET(23,D3D_OK);
|
404 | 449 | ddpf.dwZBitMask = 0x00ffffff;
|
405 | 450 | ddpf.dwStencilBitMask = 0xff000000;
|
406 | | - if(lpEnumCallback(&ddpf,lpContext) == D3DENUMRET_CANCEL) return D3D_OK;
|
| 451 | + if(lpEnumCallback(&ddpf,lpContext) == D3DENUMRET_CANCEL) TRACE_RET(23,D3D_OK);
|
407 | 452 | }
|
| 453 | + TRACE_EXIT(23,D3D_OK);
|
408 | 454 | return D3D_OK;
|
409 | 455 | }
|
410 | 456 | HRESULT WINAPI glDirect3D7::EvictManagedTextures()
|
411 | 457 | {
|
| 458 | + TRACE_ENTER(1,14,this);
|
| 459 | + TRACE_EXIT(23,D3D_OK);
|
412 | 460 | return D3D_OK;
|
413 | 461 | }
|
414 | 462 |
|
415 | 463 | HRESULT WINAPI glDirect3D7::FindDevice(LPD3DFINDDEVICESEARCH lpD3DFDS, LPD3DFINDDEVICERESULT lpD3DFDR)
|
416 | 464 | {
|
417 | | - if(!this) return DDERR_INVALIDPARAMS;
|
418 | | - if(!lpD3DFDS) return DDERR_INVALIDPARAMS;
|
419 | | - if(!lpD3DFDR) return DDERR_INVALIDPARAMS;
|
420 | | - if(lpD3DFDR->dwSize < sizeof(D3DFINDDEVICERESULT)) return DDERR_INVALIDPARAMS;
|
421 | | - if(lpD3DFDS->dwSize < sizeof(D3DFINDDEVICESEARCH)) return DDERR_INVALIDPARAMS;
|
| 465 | + TRACE_ENTER(3,14,this,14,lpD3DFDS,14,lpD3DFDR);
|
| 466 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 467 | + if(!lpD3DFDS) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 468 | + if(!lpD3DFDR) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 469 | + if(lpD3DFDR->dwSize < sizeof(D3DFINDDEVICERESULT)) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 470 | + if(lpD3DFDS->dwSize < sizeof(D3DFINDDEVICESEARCH)) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
422 | 471 | bool found = true;
|
423 | 472 | GUID guid = IID_IDirect3DHALDevice;
|
424 | 473 | if((lpD3DFDS->dwFlags & D3DFDS_LINES) || (lpD3DFDS->dwFlags & D3DFDS_TRIANGLES))
|
— | — | @@ -492,10 +541,11 @@ |
493 | 542 | }
|
494 | 543 | else if(!lpD3DFDS->bHardware) guid = IID_IDirect3DRGBDevice;
|
495 | 544 | }
|
496 | | - if(!found) return DDERR_NOTFOUND;
|
| 545 | + if(!found) TRACE_RET(23,DDERR_NOTFOUND);
|
497 | 546 | if(guid == IID_IDirect3DRGBDevice) lpD3DFDR->ddSwDesc = d3ddesc3;
|
498 | 547 | else lpD3DFDR->ddHwDesc = d3ddesc3;
|
499 | 548 | lpD3DFDR->guid = guid;
|
| 549 | + TRACE_EXIT(23,D3D_OK);
|
500 | 550 | return D3D_OK;
|
501 | 551 | }
|
502 | 552 |
|
— | — | @@ -503,74 +553,92 @@ |
504 | 554 | // IDirect3D3 wrapper
|
505 | 555 | glDirect3D3::glDirect3D3(glDirect3D7 *glD3D7)
|
506 | 556 | {
|
| 557 | + TRACE_ENTER(2,14,this,14,glD3D7);
|
507 | 558 | this->glD3D7 = glD3D7;
|
508 | 559 | refcount = 1;
|
| 560 | + TRACE_EXIT(-1,0);
|
509 | 561 | }
|
510 | 562 |
|
511 | 563 | glDirect3D3::~glDirect3D3()
|
512 | 564 | {
|
| 565 | + TRACE_ENTER(1,14,this);
|
513 | 566 | glD3D7->Release();
|
514 | 567 | glD3D7->glD3D3 = NULL;
|
| 568 | + TRACE_EXIT(-1,0);
|
515 | 569 | }
|
516 | 570 |
|
517 | 571 | HRESULT WINAPI glDirect3D3::QueryInterface(REFIID riid, void** ppvObj)
|
518 | 572 | {
|
519 | | - if(!this) return DDERR_INVALIDPARAMS;
|
| 573 | + TRACE_ENTER(3,14,this,24,&riid,14,ppvObj);
|
| 574 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
520 | 575 | if(riid == IID_IUnknown)
|
521 | 576 | {
|
522 | 577 | this->AddRef();
|
523 | 578 | *ppvObj = this;
|
| 579 | + TRACE_VAR("*ppvObj",14,*ppvObj);
|
| 580 | + TRACE_EXIT(23,DD_OK);
|
524 | 581 | return DD_OK;
|
525 | 582 | }
|
526 | | - return glD3D7->QueryInterface(riid,ppvObj);
|
| 583 | + TRACE_RET(23,glD3D7->QueryInterface(riid,ppvObj));
|
527 | 584 | }
|
528 | 585 |
|
529 | 586 | ULONG WINAPI glDirect3D3::AddRef()
|
530 | 587 | {
|
531 | | - if(!this) return 0;
|
| 588 | + TRACE_ENTER(1,14,this);
|
| 589 | + if(!this) TRACE_RET(8,0);
|
532 | 590 | refcount++;
|
| 591 | + TRACE_EXIT(8,refcount);
|
533 | 592 | return refcount;
|
534 | 593 | }
|
535 | 594 |
|
536 | 595 | ULONG WINAPI glDirect3D3::Release()
|
537 | 596 | {
|
538 | | - if(!this) return 0;
|
| 597 | + TRACE_ENTER(1,14,this);
|
| 598 | + if(!this) TRACE_RET(8,0);
|
539 | 599 | ULONG ret;
|
540 | 600 | refcount--;
|
541 | 601 | ret = refcount;
|
542 | 602 | if(refcount == 0) delete this;
|
| 603 | + TRACE_EXIT(8,ret);
|
543 | 604 | return ret;
|
544 | 605 | }
|
545 | 606 |
|
546 | 607 | HRESULT WINAPI glDirect3D3::CreateDevice(REFCLSID rclsid, LPDIRECTDRAWSURFACE4 lpDDS, LPDIRECT3DDEVICE3 *lplpD3DDevice, LPUNKNOWN pUnkOuter)
|
547 | 608 | {
|
548 | | - if(!this) return DDERR_INVALIDPARAMS;
|
549 | | - if(pUnkOuter) return DDERR_INVALIDPARAMS;
|
| 609 | + TRACE_ENTER(5,14,this,24,&rclsid,14,lpDDS,14,lplpD3DDevice,14,pUnkOuter);
|
| 610 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 611 | + if(pUnkOuter) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
550 | 612 | LPDIRECT3DDEVICE7 lpD3DDev7;
|
551 | 613 | HRESULT err = glD3D7->CreateDevice(rclsid,((glDirectDrawSurface4*)lpDDS)->GetDDS7(),&lpD3DDev7);
|
552 | 614 | if(err == D3D_OK)
|
553 | 615 | {
|
554 | | - lpD3DDev7->QueryInterface(IID_IDirect3DDevice3,(LPVOID*) lplpD3DDevice);
|
| 616 | + lpD3DDev7->QueryInterface(IID_IDirect3DDevice3,(LPVOID*)lplpD3DDevice);
|
555 | 617 | lpD3DDev7->Release();
|
| 618 | + TRACE_VAR("*lplpD3DDevice",14,*lplpD3DDevice);
|
| 619 | + TRACE_EXIT(23,D3D_OK);
|
556 | 620 | return D3D_OK;
|
557 | 621 | }
|
| 622 | + TRACE_EXIT(23,err);
|
558 | 623 | return err;
|
559 | 624 | }
|
560 | 625 |
|
561 | 626 | HRESULT WINAPI glDirect3D3::CreateLight(LPDIRECT3DLIGHT* lplpDirect3DLight, IUnknown* pUnkOuter)
|
562 | 627 | {
|
563 | | - if(!this) return DDERR_INVALIDPARAMS;
|
564 | | - return glD3D7->CreateLight(lplpDirect3DLight,pUnkOuter);
|
| 628 | + TRACE_ENTER(3,14,this,14,lplpDirect3DLight,14,pUnkOuter);
|
| 629 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 630 | + TRACE_RET(23,glD3D7->CreateLight(lplpDirect3DLight,pUnkOuter));
|
565 | 631 | }
|
566 | 632 | HRESULT WINAPI glDirect3D3::CreateMaterial(LPDIRECT3DMATERIAL3* lplpDirect3DMaterial, IUnknown* pUnkOuter)
|
567 | 633 | {
|
568 | | - if(!this) return DDERR_INVALIDPARAMS;
|
569 | | - return glD3D7->CreateMaterial(lplpDirect3DMaterial,pUnkOuter);
|
| 634 | + TRACE_ENTER(3,14,this,14,lplpDirect3DMaterial,14,pUnkOuter);
|
| 635 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 636 | + TRACE_RET(23,glD3D7->CreateMaterial(lplpDirect3DMaterial,pUnkOuter));
|
570 | 637 | }
|
571 | 638 | HRESULT WINAPI glDirect3D3::CreateVertexBuffer(LPD3DVERTEXBUFFERDESC lpVBDesc, LPDIRECT3DVERTEXBUFFER* lplpD3DVertexBuffer, DWORD dwFlags, LPUNKNOWN pUnkOuter)
|
572 | 639 | {
|
573 | | - if(!this) return DDERR_INVALIDPARAMS;
|
574 | | - if(pUnkOuter) return DDERR_INVALIDPARAMS;
|
| 640 | + TRACE_ENTER(5,14,this,14,lpVBDesc,14,lplpD3DVertexBuffer,9,dwFlags,14,pUnkOuter);
|
| 641 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 642 | + if(pUnkOuter) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
575 | 643 | LPDIRECT3DVERTEXBUFFER7 lpD3DVB7;
|
576 | 644 | HRESULT err = glD3D7->CreateVertexBuffer(lpVBDesc,&lpD3DVB7,dwFlags);
|
577 | 645 | if(err == D3D_OK)
|
— | — | @@ -577,83 +645,104 @@ |
578 | 646 | {
|
579 | 647 | lpD3DVB7->QueryInterface(IID_IDirect3DVertexBuffer,(LPVOID*)lplpD3DVertexBuffer);
|
580 | 648 | lpD3DVB7->Release();
|
| 649 | + TRACE_VAR("*lplpD3DVertexBuffer",14,*lplpD3DVertexBuffer);
|
| 650 | + TRACE_EXIT(23,D3D_OK);
|
581 | 651 | return D3D_OK;
|
582 | 652 | }
|
| 653 | + TRACE_EXIT(23,err);
|
583 | 654 | return err;
|
584 | 655 | }
|
585 | 656 | HRESULT WINAPI glDirect3D3::CreateViewport(LPDIRECT3DVIEWPORT3* lplpD3DViewport, IUnknown* pUnkOuter)
|
586 | 657 | {
|
587 | | - if(!this) return DDERR_INVALIDPARAMS;
|
588 | | - return glD3D7->CreateViewport(lplpD3DViewport,pUnkOuter);
|
| 658 | + TRACE_ENTER(3,14,this,14,lplpD3DViewport,14,pUnkOuter);
|
| 659 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 660 | + TRACE_RET(23,glD3D7->CreateViewport(lplpD3DViewport,pUnkOuter));
|
589 | 661 | }
|
590 | 662 |
|
591 | 663 | HRESULT WINAPI glDirect3D3::EnumDevices(LPD3DENUMDEVICESCALLBACK lpEnumDevicesCallback, LPVOID lpUserArg)
|
592 | 664 | {
|
593 | | - if(!this) return DDERR_INVALIDPARAMS;
|
594 | | - return glD3D7->EnumDevices3(lpEnumDevicesCallback,lpUserArg);
|
| 665 | + TRACE_ENTER(3,14,this,14,lpEnumDevicesCallback,14,lpUserArg);
|
| 666 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 667 | + TRACE_RET(23,glD3D7->EnumDevices3(lpEnumDevicesCallback,lpUserArg));
|
595 | 668 | }
|
596 | 669 |
|
597 | 670 | HRESULT WINAPI glDirect3D3::EnumZBufferFormats(REFCLSID riidDevice, LPD3DENUMPIXELFORMATSCALLBACK lpEnumCallback, LPVOID lpContext)
|
598 | 671 | {
|
599 | | - if(!this) return DDERR_INVALIDPARAMS;
|
600 | | - return glD3D7->EnumZBufferFormats(riidDevice,lpEnumCallback,lpContext);
|
| 672 | + TRACE_ENTER(4,14,this,24,&riidDevice,14,lpEnumCallback,14,lpContext);
|
| 673 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 674 | + TRACE_RET(23,glD3D7->EnumZBufferFormats(riidDevice,lpEnumCallback,lpContext));
|
601 | 675 | }
|
602 | 676 | HRESULT WINAPI glDirect3D3::EvictManagedTextures()
|
603 | 677 | {
|
604 | | - if(!this) return DDERR_INVALIDPARAMS;
|
605 | | - return glD3D7->EvictManagedTextures();
|
| 678 | + TRACE_ENTER(1,14,this);
|
| 679 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 680 | + TRACE_RET(23,glD3D7->EvictManagedTextures());
|
606 | 681 | }
|
607 | 682 | HRESULT WINAPI glDirect3D3::FindDevice(LPD3DFINDDEVICESEARCH lpD3DFDS, LPD3DFINDDEVICERESULT lpD3DFDR)
|
608 | 683 | {
|
609 | | - if(!this) return DDERR_INVALIDPARAMS;
|
610 | | - return glD3D7->FindDevice(lpD3DFDS,lpD3DFDR);
|
| 684 | + TRACE_ENTER(3,14,this,14,lpD3DFDS,14,lpD3DFDR);
|
| 685 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 686 | + TRACE_RET(23,glD3D7->FindDevice(lpD3DFDS,lpD3DFDR));
|
611 | 687 | }
|
612 | 688 |
|
613 | 689 |
|
614 | 690 | glDirect3D2::glDirect3D2(glDirect3D7 *glD3D7)
|
615 | 691 | {
|
| 692 | + TRACE_ENTER(2,14,this,14,glD3D7);
|
616 | 693 | this->glD3D7 = glD3D7;
|
617 | 694 | refcount = 1;
|
| 695 | + TRACE_EXIT(-1,0);
|
618 | 696 | }
|
619 | 697 |
|
620 | 698 | glDirect3D2::~glDirect3D2()
|
621 | 699 | {
|
| 700 | + TRACE_ENTER(1,14,this);
|
622 | 701 | glD3D7->Release();
|
623 | 702 | glD3D7->glD3D2 = NULL;
|
| 703 | + TRACE_EXIT(-1,0);
|
624 | 704 | }
|
625 | 705 |
|
626 | 706 | HRESULT WINAPI glDirect3D2::QueryInterface(REFIID riid, void** ppvObj)
|
627 | 707 | {
|
628 | | - if(!this) return DDERR_INVALIDPARAMS;
|
| 708 | + TRACE_ENTER(3,14,this,24,&riid,14,ppvObj);
|
| 709 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
629 | 710 | if(riid == IID_IUnknown)
|
630 | 711 | {
|
631 | 712 | this->AddRef();
|
632 | 713 | *ppvObj = this;
|
| 714 | + TRACE_VAR("*ppvObj",14,*ppvObj);
|
| 715 | + TRACE_ENTER(23,DD_OK);
|
633 | 716 | return DD_OK;
|
634 | 717 | }
|
635 | | - return glD3D7->QueryInterface(riid,ppvObj);
|
| 718 | + TRACE_RET(23,glD3D7->QueryInterface(riid,ppvObj));
|
636 | 719 | }
|
637 | 720 |
|
638 | 721 | ULONG WINAPI glDirect3D2::AddRef()
|
639 | 722 | {
|
640 | | - if(!this) return 0;
|
| 723 | + TRACE_ENTER(1,14,this);
|
| 724 | + if(!this) TRACE_RET(8,0);
|
641 | 725 | refcount++;
|
| 726 | + TRACE_EXIT(8,refcount);
|
642 | 727 | return refcount;
|
643 | 728 | }
|
644 | 729 |
|
645 | 730 | ULONG WINAPI glDirect3D2::Release()
|
646 | 731 | {
|
647 | | - if(!this) return 0;
|
| 732 | + TRACE_ENTER(1,14,this);
|
| 733 | + if(!this) TRACE_RET(8,0);
|
648 | 734 | ULONG ret;
|
649 | 735 | refcount--;
|
650 | 736 | ret = refcount;
|
651 | 737 | if(refcount == 0) delete this;
|
| 738 | + TRACE_EXIT(8,ret);
|
652 | 739 | return ret;
|
653 | 740 | }
|
654 | 741 |
|
655 | 742 | HRESULT WINAPI glDirect3D2::CreateDevice(REFCLSID rclsid, LPDIRECTDRAWSURFACE lpDDS, LPDIRECT3DDEVICE2 *lplpD3DDevice)
|
656 | 743 | {
|
657 | | - if(!this) return DDERR_INVALIDPARAMS;
|
| 744 | + TRACE_ENTER(4,14,this,24,&rclsid,14,lpDDS,14,lplpD3DDevice);
|
| 745 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 746 | + if(!lplpD3DDevice) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
658 | 747 | LPDIRECT3DDEVICE7 lpD3DDev7;
|
659 | 748 | HRESULT err = glD3D7->CreateDevice(rclsid,((glDirectDrawSurface1*)lpDDS)->GetDDS7(),&lpD3DDev7);
|
660 | 749 | if(err == D3D_OK)
|
— | — | @@ -660,138 +749,171 @@ |
661 | 750 | {
|
662 | 751 | lpD3DDev7->QueryInterface(IID_IDirect3DDevice2,(LPVOID*)lplpD3DDevice);
|
663 | 752 | lpD3DDev7->Release();
|
| 753 | + TRACE_VAR("*lplpD3DDevice",14,*lplpD3DDevice);
|
| 754 | + TRACE_EXIT(23,D3D_OK);
|
664 | 755 | return D3D_OK;
|
665 | 756 | }
|
| 757 | + TRACE_EXIT(23,err);
|
666 | 758 | return err;
|
667 | 759 | }
|
668 | 760 |
|
669 | 761 | HRESULT WINAPI glDirect3D2::CreateLight(LPDIRECT3DLIGHT* lplpDirect3DLight, IUnknown* pUnkOuter)
|
670 | 762 | {
|
671 | | - if(!this) return DDERR_INVALIDPARAMS;
|
672 | | - return glD3D7->CreateLight(lplpDirect3DLight,pUnkOuter);
|
| 763 | + TRACE_ENTER(3,14,this,14,lplpDirect3DLight,14,pUnkOuter);
|
| 764 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 765 | + TRACE_RET(23,glD3D7->CreateLight(lplpDirect3DLight,pUnkOuter));
|
673 | 766 | }
|
674 | 767 |
|
675 | 768 | HRESULT WINAPI glDirect3D2::CreateMaterial(LPDIRECT3DMATERIAL2* lplpDirect3DMaterial2, IUnknown* pUnkOuter)
|
676 | 769 | {
|
677 | | - if(!this) return DDERR_INVALIDPARAMS;
|
678 | | - if(!lplpDirect3DMaterial2) return DDERR_INVALIDPARAMS;
|
| 770 | + TRACE_ENTER(3,14,this,14,lplpDirect3DMaterial2,14,pUnkOuter);
|
| 771 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 772 | + if(!lplpDirect3DMaterial2) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
679 | 773 | glDirect3DMaterial3 *glD3DM3;
|
680 | 774 | HRESULT error = glD3D7->CreateMaterial((LPDIRECT3DMATERIAL3*)&glD3DM3,pUnkOuter);
|
681 | | - if(FAILED(error)) return error;
|
| 775 | + if(FAILED(error)) TRACE_RET(23,error);
|
682 | 776 | glD3DM3->QueryInterface(IID_IDirect3DMaterial2,(void**)lplpDirect3DMaterial2);
|
683 | 777 | glD3DM3->Release();
|
| 778 | + TRACE_VAR("*lplpDirect3DMaterial2",14,*lplpDirect3DMaterial2);
|
| 779 | + TRACE_EXIT(23,D3D_OK);
|
684 | 780 | return D3D_OK;
|
685 | 781 | }
|
686 | 782 |
|
687 | 783 | HRESULT WINAPI glDirect3D2::CreateViewport(LPDIRECT3DVIEWPORT2* lplpD3DViewport2, IUnknown* pUnkOuter)
|
688 | 784 | {
|
689 | | - if(!this) return DDERR_INVALIDPARAMS;
|
690 | | - if(!lplpD3DViewport2) return DDERR_INVALIDPARAMS;
|
| 785 | + TRACE_ENTER(3,14,this,14,lplpD3DViewport2,14,pUnkOuter);
|
| 786 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 787 | + if(!lplpD3DViewport2) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
691 | 788 | glDirect3DMaterial3 *glD3DV3;
|
692 | 789 | HRESULT error = glD3D7->CreateViewport((LPDIRECT3DVIEWPORT3*)&glD3DV3,pUnkOuter);
|
693 | | - if(FAILED(error)) return error;
|
| 790 | + if(FAILED(error)) TRACE_RET(23,error);
|
694 | 791 | glD3DV3->QueryInterface(IID_IDirect3DViewport2,(void**)lplpD3DViewport2);
|
695 | 792 | glD3DV3->Release();
|
| 793 | + TRACE_VAR("*lplpD3DViewport2",14,*lplpD3DViewport2);
|
| 794 | + TRACE_EXIT(23,D3D_OK);
|
696 | 795 | return D3D_OK;
|
697 | 796 | }
|
698 | 797 |
|
699 | 798 | HRESULT WINAPI glDirect3D2::EnumDevices(LPD3DENUMDEVICESCALLBACK lpEnumDevicesCallback, LPVOID lpUserArg)
|
700 | 799 | {
|
701 | | - if(!this) return DDERR_INVALIDPARAMS;
|
702 | | - return glD3D7->EnumDevices3(lpEnumDevicesCallback,lpUserArg);
|
| 800 | + TRACE_ENTER(3,14,this,14,lpEnumDevicesCallback,14,lpUserArg);
|
| 801 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 802 | + TRACE_RET(23,glD3D7->EnumDevices3(lpEnumDevicesCallback,lpUserArg));
|
703 | 803 | }
|
704 | 804 |
|
705 | 805 | HRESULT WINAPI glDirect3D2::FindDevice(LPD3DFINDDEVICESEARCH lpD3DFDS, LPD3DFINDDEVICERESULT lpD3DFDR)
|
706 | 806 | {
|
707 | | - if(!this) return DDERR_INVALIDPARAMS;
|
708 | | - return glD3D7->FindDevice(lpD3DFDS,lpD3DFDR);
|
| 807 | + TRACE_ENTER(3,14,this,14,lpD3DFDS,14,lpD3DFDR);
|
| 808 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 809 | + TRACE_RET(23,glD3D7->FindDevice(lpD3DFDS,lpD3DFDR));
|
709 | 810 | }
|
710 | 811 |
|
711 | 812 | glDirect3D1::glDirect3D1(glDirect3D7 *glD3D7)
|
712 | 813 | {
|
| 814 | + TRACE_ENTER(2,14,this,14,glD3D7);
|
713 | 815 | this->glD3D7 = glD3D7;
|
714 | 816 | refcount = 1;
|
| 817 | + TRACE_EXIT(-1,0);
|
715 | 818 | }
|
716 | 819 |
|
717 | 820 | glDirect3D1::~glDirect3D1()
|
718 | 821 | {
|
| 822 | + TRACE_ENTER(1,14,this);
|
719 | 823 | glD3D7->Release();
|
720 | 824 | glD3D7->glD3D1 = NULL;
|
| 825 | + TRACE_EXIT(-1,0);
|
721 | 826 | }
|
722 | 827 |
|
723 | 828 | HRESULT WINAPI glDirect3D1::QueryInterface(REFIID riid, void** ppvObj)
|
724 | 829 | {
|
725 | | - if(!this) return DDERR_INVALIDPARAMS;
|
| 830 | + TRACE_ENTER(3,14,this,24,&riid,14,ppvObj);
|
| 831 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
726 | 832 | if(riid == IID_IUnknown)
|
727 | 833 | {
|
728 | 834 | this->AddRef();
|
729 | 835 | *ppvObj = this;
|
| 836 | + TRACE_VAR("*ppvObj",14,*ppvObj);
|
| 837 | + TRACE_EXIT(23,DD_OK);
|
730 | 838 | return DD_OK;
|
731 | 839 | }
|
732 | | - return glD3D7->QueryInterface(riid,ppvObj);
|
| 840 | + TRACE_RET(23,glD3D7->QueryInterface(riid,ppvObj));
|
733 | 841 | }
|
734 | 842 |
|
735 | 843 | ULONG WINAPI glDirect3D1::AddRef()
|
736 | 844 | {
|
737 | | - if(!this) return 0;
|
| 845 | + TRACE_ENTER(1,14,this);
|
| 846 | + if(!this) TRACE_RET(8,0);
|
738 | 847 | refcount++;
|
| 848 | + TRACE_EXIT(8,refcount);
|
739 | 849 | return refcount;
|
740 | 850 | }
|
741 | 851 |
|
742 | 852 | ULONG WINAPI glDirect3D1::Release()
|
743 | 853 | {
|
744 | | - if(!this) return 0;
|
| 854 | + TRACE_ENTER(1,14,this);
|
| 855 | + if(!this) TRACE_RET(8,0);
|
745 | 856 | ULONG ret;
|
746 | 857 | refcount--;
|
747 | 858 | ret = refcount;
|
748 | 859 | if(refcount == 0) delete this;
|
| 860 | + TRACE_EXIT(8,ret);
|
749 | 861 | return ret;
|
750 | 862 | }
|
751 | 863 |
|
752 | 864 | HRESULT WINAPI glDirect3D1::CreateLight(LPDIRECT3DLIGHT* lplpDirect3DLight, IUnknown* pUnkOuter)
|
753 | 865 | {
|
754 | | - if(!this) return DDERR_INVALIDPARAMS;
|
755 | | - return glD3D7->CreateLight(lplpDirect3DLight,pUnkOuter);
|
| 866 | + TRACE_ENTER(3,14,this,14,pUnkOuter);
|
| 867 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 868 | + TRACE_RET(23,glD3D7->CreateLight(lplpDirect3DLight,pUnkOuter));
|
756 | 869 | }
|
757 | 870 |
|
758 | 871 | HRESULT WINAPI glDirect3D1::CreateMaterial(LPDIRECT3DMATERIAL* lplpDirect3DMaterial, IUnknown* pUnkOuter)
|
759 | 872 | {
|
760 | | - if(!this) return DDERR_INVALIDPARAMS;
|
761 | | - if(!lplpDirect3DMaterial) return DDERR_INVALIDPARAMS;
|
| 873 | + TRACE_ENTER(3,14,this,14,lplpDirect3DMaterial,14,pUnkOuter);
|
| 874 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 875 | + if(!lplpDirect3DMaterial) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
762 | 876 | glDirect3DMaterial3 *glD3DM3;
|
763 | 877 | HRESULT error = glD3D7->CreateMaterial((LPDIRECT3DMATERIAL3*)&glD3DM3,pUnkOuter);
|
764 | | - if(FAILED(error)) return error;
|
| 878 | + if(FAILED(error)) TRACE_RET(23,error);
|
765 | 879 | glD3DM3->QueryInterface(IID_IDirect3DMaterial,(void**)lplpDirect3DMaterial);
|
766 | 880 | glD3DM3->Release();
|
| 881 | + TRACE_VAR("*lplpDirect3DMaterial",14,*lplpDirect3DMaterial);
|
| 882 | + TRACE_EXIT(23,D3D_OK);
|
767 | 883 | return D3D_OK;
|
768 | 884 | }
|
769 | 885 |
|
770 | 886 | HRESULT WINAPI glDirect3D1::CreateViewport(LPDIRECT3DVIEWPORT* lplpD3DViewport, IUnknown* pUnkOuter)
|
771 | 887 | {
|
772 | | - if(!this) return DDERR_INVALIDPARAMS;
|
773 | | - if(!lplpD3DViewport) return DDERR_INVALIDPARAMS;
|
| 888 | + TRACE_ENTER(3,14,this,14,lplpD3DViewport,14,pUnkOuter);
|
| 889 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 890 | + if(!lplpD3DViewport) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
774 | 891 | glDirect3DMaterial3 *glD3DV3;
|
775 | 892 | HRESULT error = glD3D7->CreateViewport((LPDIRECT3DVIEWPORT3*)&glD3DV3,pUnkOuter);
|
776 | | - if(FAILED(error)) return error;
|
| 893 | + if(FAILED(error)) TRACE_RET(23,error);
|
777 | 894 | glD3DV3->QueryInterface(IID_IDirect3DViewport,(void**)lplpD3DViewport);
|
778 | 895 | glD3DV3->Release();
|
| 896 | + TRACE_VAR("*lplpD3DViewport",14,*lplpD3DViewport);
|
| 897 | + TRACE_EXIT(23,D3D_OK);
|
779 | 898 | return D3D_OK;
|
780 | 899 | }
|
781 | 900 |
|
782 | 901 | HRESULT WINAPI glDirect3D1::EnumDevices(LPD3DENUMDEVICESCALLBACK lpEnumDevicesCallback, LPVOID lpUserArg)
|
783 | 902 | {
|
784 | | - if(!this) return DDERR_INVALIDPARAMS;
|
785 | | - return glD3D7->EnumDevices3(lpEnumDevicesCallback,lpUserArg);
|
| 903 | + TRACE_ENTER(3,14,this,14,lpEnumDevicesCallback,14,lpUserArg);
|
| 904 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 905 | + TRACE_RET(23,glD3D7->EnumDevices3(lpEnumDevicesCallback,lpUserArg));
|
786 | 906 | }
|
787 | 907 |
|
788 | 908 | HRESULT WINAPI glDirect3D1::FindDevice(LPD3DFINDDEVICESEARCH lpD3DFDS, LPD3DFINDDEVICERESULT lpD3DFDR)
|
789 | 909 | {
|
790 | | - if(!this) return DDERR_INVALIDPARAMS;
|
791 | | - return glD3D7->FindDevice(lpD3DFDS,lpD3DFDR);
|
| 910 | + TRACE_ENTER(3,14,this,14,lpD3DFDS,14,lpD3DFDR);
|
| 911 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 912 | + TRACE_RET(23,glD3D7->FindDevice(lpD3DFDS,lpD3DFDR));
|
792 | 913 | }
|
793 | 914 |
|
794 | 915 | HRESULT WINAPI glDirect3D1::Initialize(REFIID lpREFIID)
|
795 | 916 | {
|
796 | | - if(!this) return DDERR_INVALIDPARAMS;
|
797 | | - return DDERR_ALREADYINITIALIZED;
|
| 917 | + TRACE_ENTER(2,14,this,24,&lpREFIID);
|
| 918 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 919 | + TRACE_RET(23,DDERR_ALREADYINITIALIZED);
|
798 | 920 | }
|