| Index: ddraw/TextureManager.c |
| — | — | @@ -505,13 +505,18 @@ |
| 506 | 506 | do
|
| 507 | 507 | {
|
| 508 | 508 | ClearError();
|
| 509 | | - if (This->ext->GLEXT_EXT_direct_state_access) This->ext->glTextureImage2DEXT(texture->id, GL_TEXTURE_2D, level, texture->internalformats[0],
|
| 510 | | - width, height, 0, texture->format, texture->type, data);
|
| | 509 | + if (This->ext->GLEXT_EXT_direct_state_access)
|
| | 510 | + {
|
| | 511 | + This->ext->glTextureSubImage2DEXT(texture->id, GL_TEXTURE_2D, level, 0, 0, width, height, texture->format, texture->type, data);
|
| | 512 | + //This->ext->glTextureImage2DEXT(texture->id, GL_TEXTURE_2D, level, texture->internalformats[0],
|
| | 513 | + // width, height, 0, texture->format, texture->type, data);
|
| | 514 | + }
|
| 511 | 515 | else
|
| 512 | 516 | {
|
| 513 | 517 | TextureManager_SetActiveTexture(This, 0);
|
| 514 | 518 | TextureManager_SetTexture(This, 0, texture);
|
| 515 | | - glTexImage2D(GL_TEXTURE_2D, level, texture->internalformats[0], width, height, 0, texture->format, texture->type, data);
|
| | 519 | + glTexSubImage2D(GL_TEXTURE_2D, level, 0, 0, width, height, texture->format, texture->type, data);
|
| | 520 | + //glTexImage2D(GL_TEXTURE_2D, level, texture->internalformats[0], width, height, 0, texture->format, texture->type, data);
|
| 516 | 521 | }
|
| 517 | 522 | error = glGetError();
|
| 518 | 523 | if (error != GL_NO_ERROR)
|
| — | — | @@ -529,13 +534,18 @@ |
| 530 | 535 | }
|
| 531 | 536 | else
|
| 532 | 537 | {
|
| 533 | | - if (This->ext->GLEXT_EXT_direct_state_access) This->ext->glTextureImage2DEXT(texture->id, GL_TEXTURE_2D, level, texture->internalformats[0],
|
| 534 | | - width, height, 0, texture->format, texture->type, data);
|
| | 538 | + if (This->ext->GLEXT_EXT_direct_state_access)
|
| | 539 | + {
|
| | 540 | + This->ext->glTextureSubImage2DEXT(texture->id, GL_TEXTURE_2D, level, 0, 0, width, height, texture->format, texture->type, data);
|
| | 541 | + //This->ext->glTextureImage2DEXT(texture->id, GL_TEXTURE_2D, level, texture->internalformats[0],
|
| | 542 | + //width, height, 0, texture->format, texture->type, data);
|
| | 543 | + }
|
| 535 | 544 | else
|
| 536 | 545 | {
|
| 537 | 546 | TextureManager_SetActiveTexture(This, 0);
|
| 538 | 547 | TextureManager_SetTexture(This, 0, texture);
|
| 539 | | - glTexImage2D(GL_TEXTURE_2D, level, texture->internalformats[0], width, height, 0, texture->format, texture->type, data);
|
| | 548 | + glTexSubImage2D(GL_TEXTURE_2D, level, 0, 0, width, height, texture->format, texture->type, data);
|
| | 549 | + //glTexImage2D(GL_TEXTURE_2D, level, texture->internalformats[0], width, height, 0, texture->format, texture->type, data);
|
| 540 | 550 | }
|
| 541 | 551 | }
|
| 542 | 552 | }
|
| Index: ddraw/glDirect3DExecuteBuffer.cpp |
| — | — | @@ -21,6 +21,7 @@ |
| 22 | 22 | glDirect3DExecuteBuffer::glDirect3DExecuteBuffer(LPD3DEXECUTEBUFFERDESC lpDesc)
|
| 23 | 23 | {
|
| 24 | 24 | TRACE_ENTER(2,14,this,14,lpDesc);
|
| | 25 | + refcount = 1;
|
| 25 | 26 | locked = false;
|
| 26 | 27 | inuse = false;
|
| 27 | 28 | data = NULL;
|
| Index: ddraw/glDirectDrawSurface.cpp |
| — | — | @@ -510,7 +510,7 @@ |
| 511 | 511 | tmpd3d->CreateDevice(riid,this,(LPDIRECT3DDEVICE7*)&tmpdev);
|
| 512 | 512 | if(!tmpdev)
|
| 513 | 513 | {
|
| 514 | | - tmpdev->Release();
|
| | 514 | + tmpd3d->Release();
|
| 515 | 515 | TRACE_EXIT(23,E_NOINTERFACE);
|
| 516 | 516 | return E_NOINTERFACE;
|
| 517 | 517 | }
|