Fixed D3D

This commit is contained in:
Flamefire committed 2013-05-20 19:10:49 +02:00
1 parent 11398dbb2f
commit 9704a1aeb0
2 files changed
+8 -5

No files matched your search

+4 -1
View File
@@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Express 2012 for Windows Desktop
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Vocaluxe", "Vocaluxe\Vocaluxe.csproj", "{2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}"
ProjectSection(ProjectDependencies) = postProject
{6F3E1874-F28A-40E9-AFBD-31934D593678} = {6F3E1874-F28A-40E9-AFBD-31934D593678}
@@ -128,4 +128,7 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(Performance) = preSolution
HasPerformanceSessions = true
EndGlobalSection
EndGlobal
+4 -4
View File
@@ -850,6 +850,8 @@ namespace Vocaluxe.Lib.Draw
w = _CheckForNextPowerOf2(w);
h = _CheckForNextPowerOf2(h);
CTexture texture = new CTexture(bmp.Width, bmp.Height, w, h, true);
Bitmap bmp2 = null;
byte[] data;
try
@@ -880,7 +882,6 @@ namespace Vocaluxe.Lib.Draw
bmp2.Dispose();
}
CTexture texture = new CTexture(bmp.Width, bmp.Height, w, h, true);
return _AddTexture(texture, w, data);
}
@@ -906,9 +907,8 @@ namespace Vocaluxe.Lib.Draw
{
//Create a new texture in the managed pool, which does not need to be recreated on a lost device
//because a copy of the texture is hold in the Ram
Texture t;
using (t = new Texture(_Device, textureW, textureH, 0, Usage.AutoGenerateMipMap, Format.A8R8G8B8, Pool.Managed))
_WriteDataToTexture(t, w, data);
Texture t = new Texture(_Device, textureW, textureH, 0, Usage.AutoGenerateMipMap, Format.A8R8G8B8, Pool.Managed);
_WriteDataToTexture(t, w, data);
return t;
}