wined3d: Don't call glCompressedTexImage2DARB without allocatedMemory.

Don't call glCompressedTexImage2DARB if we haven't got allocatedMemory (yet).
Fix a small typo.
This commit is contained in:
H. Verbeet 2006-03-06 18:27:53 +00:00 committed by Alexandre Julliard
parent 414d1ddeb9
commit fd2739b023
1 changed files with 4 additions and 5 deletions

View File

@ -1029,7 +1029,9 @@ HRESULT WINAPI IWineD3DSurfaceImpl_LoadTexture(IWineD3DSurface *iface) {
This->resource.format == WINED3DFMT_DXT3 ||
This->resource.format == WINED3DFMT_DXT4 ||
This->resource.format == WINED3DFMT_DXT5) {
if (GL_SUPPORT(EXT_TEXTURE_COMPRESSION_S3TC)) {
if (!GL_SUPPORT(EXT_TEXTURE_COMPRESSION_S3TC)) {
FIXME("Using DXT1/3/5 without advertized support\n");
} else if (This->resource.allocatedMemory) {
TRACE("Calling glCompressedTexImage2D %x i=%d, intfmt=%x, w=%d, h=%d,0=%d, sz=%d, Mem=%p\n",
This->glDescription.target,
This->glDescription.level,
@ -1050,7 +1052,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_LoadTexture(IWineD3DSurface *iface) {
0,
This->resource.size,
This->resource.allocatedMemory);
checkGLcall("glCommpressedTexTexImage2D");
checkGLcall("glCommpressedTexImage2D");
LEAVE_GL();
@ -1058,9 +1060,6 @@ HRESULT WINAPI IWineD3DSurfaceImpl_LoadTexture(IWineD3DSurface *iface) {
HeapFree(GetProcessHeap(), 0, This->resource.allocatedMemory);
This->resource.allocatedMemory = NULL;
}
} else {
FIXME("Using DXT1/3/5 without advertized support\n");
}
} else {