167 : struct
168 {
170 Helpers.CheckDisposed(this, intPtr);
171 if (data != null && data.Length != 0)
172 {
173 if (isSetting)
174 {
175 int num = 0;
177 if (0 < parent.Textures._maxTextures)
178 {
179 do
180 {
181 if (parent.Textures[num] != this)
182 {
183 num++;
185 continue;
186 }
187 throw GraphicsHelpers.GetExceptionFromResult(2147500036u);
188 }
189 while (num < parent.Textures._maxTextures);
190 }
191 int num2 = 0;
193 if (0 < parent2.VertexTextures._maxTextures)
194 {
195 do
196 {
197 if (parent2.VertexTextures[num2] != this)
198 {
199 num2++;
201 continue;
202 }
203 throw GraphicsHelpers.GetExceptionFromResult(2147500036u);
204 }
205 while (num2 < parent2.VertexTextures._maxTextures);
206 }
207 }
208 IDirect3DVolumeTexture9* ptr =
pComPtr;
210 int num3 = ((delegate* unmanaged[Stdcall, Stdcall]<
IntPtr, uint, _D3DVOLUME_DESC*,
int>)(
int)(*(uint*)(*(
int*)ptr + 68)))((nint)ptr, (uint)level, &d3DVOLUME_DESC);
211 if (num3 < 0)
212 {
213 throw GraphicsHelpers.GetExceptionFromResult((uint)num3);
214 }
215 Helpers.ValidateCopyParameters(data.Length,
startIndex, elementCount);
217 *(int*)(&d3DBOX) = left;
230 uint num9 = num6 * num7 * num8 * num4;
231 if ((int)num5 * elementCount != (int)num9)
232 {
234 }
235 IDirect3DVolumeTexture9* ptr2 =
pComPtr;
237 num3 = ((delegate* unmanaged[Stdcall, Stdcall]<
IntPtr, uint, _D3DLOCKED_BOX*, _D3DBOX*, uint,
int>)(
int)(*(uint*)(*(
int*)ptr2 + 76)))((nint)ptr2, (uint)level, &d3DLOCKED_BOX, &d3DBOX,
options);
238 if (num3 >= 0)
239 {
240 try
241 {
242 CopyData((
void*)(
int)
System.
Runtime.
CompilerServices.
Unsafe.As<_D3DLOCKED_BOX, uint>(ref
System.
Runtime.
CompilerServices.
Unsafe.AddByteOffset(ref d3DLOCKED_BOX, 8)), *(
int*)(&d3DLOCKED_BOX),
System.
Runtime.
CompilerServices.
Unsafe.As<_D3DLOCKED_BOX,
int>(ref
System.
Runtime.
CompilerServices.
Unsafe.AddByteOffset(ref d3DLOCKED_BOX, 4)), data,
startIndex, elementCount, &d3DVOLUME_DESC, num6, num7, num8, isSetting);
243 }
244 finally
245 {
246 if (num3 >= 0)
247 {
249 num3 = ((delegate* unmanaged[Stdcall, Stdcall]<
IntPtr, uint,
int>)(
int)(*(uint*)(*(
int*)ptr2 + 80)))((nint)ptr2, (uint)level);
250 }
251 }
252 if (num3 >= 0)
253 {
254 return;
255 }
256 }
257 throw GraphicsHelpers.GetExceptionFromResult((uint)num3);
258 }
260 }
GraphicsDevice GraphicsDevice
unsafe IDirect3DVolumeTexture9 * pComPtr
static unsafe void GetAndValidateBox(_D3DVOLUME_DESC *pVolume, uint *pdwLockWidth, uint *pdwLockHeight, uint *pdwLockDepth, _D3DBOX *pBox)
static unsafe void GetAndValidateSizes< T >(_D3DVOLUME_DESC *pVolume, uint *pdwFormatSize, uint *pdwElementSize)