From 1941e271488d11a0e5dbd92f64870aa5fb489d92 Mon Sep 17 00:00:00 2001 From: castano Date: Tue, 29 Jul 2008 08:43:42 +0000 Subject: [PATCH] Fix DDS10 header initialization. Fix depth initialization. --- src/nvimage/DirectDrawSurface.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/nvimage/DirectDrawSurface.cpp b/src/nvimage/DirectDrawSurface.cpp index 72b5587..e387d58 100644 --- a/src/nvimage/DirectDrawSurface.cpp +++ b/src/nvimage/DirectDrawSurface.cpp @@ -570,7 +570,7 @@ void DDSHeader::setHeight(uint h) void DDSHeader::setDepth(uint d) { this->flags |= DDSD_DEPTH; - this->height = d; + this->depth = d; } void DDSHeader::setMipmapCount(uint count) @@ -599,6 +599,7 @@ void DDSHeader::setMipmapCount(uint count) void DDSHeader::setTexture2D() { this->header10.resourceDimension = D3D10_RESOURCE_DIMENSION_TEXTURE2D; + this->header10.arraySize = 1; } void DDSHeader::setTexture3D() @@ -606,6 +607,7 @@ void DDSHeader::setTexture3D() this->caps.caps2 = DDSCAPS2_VOLUME; this->header10.resourceDimension = D3D10_RESOURCE_DIMENSION_TEXTURE3D; + this->header10.arraySize = 1; } void DDSHeader::setTextureCube() @@ -798,6 +800,7 @@ bool DirectDrawSurface::isSupported() const if (header.hasDX10Header()) { + return false; } else {