Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Mar 30, 2019. It is now read-only.
/SharpDXPublic archive

Commit95f1a07

Browse files
author
AndrewSt
committed
[Direct3D10] remove Debug.Assert
1 parent2d97c18 commit95f1a07

File tree

2 files changed

+0
-25
lines changed

2 files changed

+0
-25
lines changed

‎Source/SharpDX.Direct3D10/Resource.cs‎

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ public static T FromSwapChain<T>(SwapChain swapChain, int index) where T : Resou
4747
/// <returns>The loaded texture object.</returns>
4848
publicstaticTFromFile<T>(Devicedevice,stringfileName)whereT:Resource
4949
{
50-
System.Diagnostics.Debug.Assert(typeof(T)==typeof(Texture1D)||typeof(T)==typeof(Texture2D)||
51-
typeof(T)==typeof(Texture3D));
52-
5350
IntPtrtemp;
5451
ResultresultOut;
5552
D3DX10.CreateTextureFromFile(device,fileName,null,IntPtr.Zero,outtemp,outresultOut);
@@ -66,9 +63,6 @@ public static T FromFile<T>(Device device, string fileName) where T : Resource
6663
/// <returns>The loaded texture object.</returns>
6764
publicstaticTFromFile<T>(Devicedevice,stringfileName,ImageLoadInformationloadInfo)whereT:Resource
6865
{
69-
System.Diagnostics.Debug.Assert(typeof(T)==typeof(Texture1D)||typeof(T)==typeof(Texture2D)||
70-
typeof(T)==typeof(Texture3D));
71-
7266
IntPtrtemp;
7367
ResultresultOut;
7468
D3DX10.CreateTextureFromFile(device,fileName,loadInfo,IntPtr.Zero,outtemp,outresultOut);
@@ -84,13 +78,8 @@ public static T FromFile<T>(Device device, string fileName, ImageLoadInformation
8478
/// <returns>The loaded texture object.</returns>
8579
publicstaticTFromMemory<T>(Devicedevice,byte[]memory)whereT:Resource
8680
{
87-
System.Diagnostics.Debug.Assert(typeof(T)==typeof(Texture1D)||typeof(T)==typeof(Texture2D)||
88-
typeof(T)==typeof(Texture3D));
89-
9081
unsafe
9182
{
92-
System.Diagnostics.Debug.Assert(memory!=null);
93-
System.Diagnostics.Debug.Assert(memory.Length>0);
9483
IntPtrtemp;
9584
ResultresultOut;
9685
fixed(void*pBuffer=&memory[0])
@@ -110,13 +99,8 @@ public static T FromMemory<T>(Device device, byte[] memory) where T : Resource
11099
/// <returns>The loaded texture object.</returns>
111100
publicstaticTFromMemory<T>(Devicedevice,byte[]memory,ImageLoadInformationloadInfo)whereT:Resource
112101
{
113-
System.Diagnostics.Debug.Assert(typeof(T)==typeof(Texture1D)||typeof(T)==typeof(Texture2D)||
114-
typeof(T)==typeof(Texture3D));
115-
116102
unsafe
117103
{
118-
System.Diagnostics.Debug.Assert(memory!=null);
119-
System.Diagnostics.Debug.Assert(memory.Length>0);
120104
IntPtrtemp;
121105
ResultresultOut;
122106
fixed(void*pBuffer=&memory[0])
@@ -165,9 +149,6 @@ public static T FromStream<T>(Device device, Stream stream, int sizeInBytes, Ima
165149
publicstaticvoidToFile<T>(Ttexture,ImageFileFormatformat,stringfileName)
166150
whereT:Resource
167151
{
168-
System.Diagnostics.Debug.Assert(typeof(T)==typeof(Texture1D)||typeof(T)==typeof(Texture2D)||
169-
typeof(T)==typeof(Texture3D));
170-
171152
D3DX10.SaveTextureToFile(texture,format,fileName);
172153
}
173154

@@ -181,9 +162,6 @@ public static void ToFile<T>(T texture, ImageFileFormat format, string fileName)
181162
publicstaticvoidToStream<T>(Ttexture,ImageFileFormatformat,Streamstream)
182163
whereT:Resource
183164
{
184-
System.Diagnostics.Debug.Assert(typeof(T)==typeof(Texture1D)||typeof(T)==typeof(Texture2D)||
185-
typeof(T)==typeof(Texture3D));
186-
187165
Blobblob;
188166
D3DX10.SaveTextureToMemory(texture,format,outblob,0);
189167

‎Source/SharpDX.Direct3D10/Texture1D.cs‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ public Texture1D(Device device, Texture1DDescription description)
4646
publicTexture1D(Devicedevice,Texture1DDescriptiondescription,DataStreamdata)
4747
:this(device,description,new[]{data})
4848
{
49-
System.Diagnostics.Debug.Assert(data!=null);
5049
}
5150

5251
/// <summary>
@@ -58,8 +57,6 @@ public Texture1D(Device device, Texture1DDescription description, DataStream dat
5857
publicTexture1D(Devicedevice,Texture1DDescriptiondescription,DataStream[]data)
5958
:base(IntPtr.Zero)
6059
{
61-
System.Diagnostics.Debug.Assert(data!=null);
62-
6360
varsubResourceDatas=newDataBox[data.Length];
6461
for(inti=0;i<subResourceDatas.Length;i++)
6562
subResourceDatas[i].DataPointer=data[i].DataPointer;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp