Rename CTexture to CTextureRef to reflect it is only a reference

This commit is contained in:
Flamefire committed 2014-09-13 17:51:55 +02:00
1 parent 3fe8cdf05c
commit 7f8e974fe1
51 files changed
+290 -285

No files matched your search

+29 -19
View File
@@ -52,25 +52,26 @@ namespace Vocaluxe.Base
public static bool VideoEnabled
{
get { return _PlaysPreview ? _PreviewPlayer.VideoEnabled : _SongPlayer.VideoEnabled; }
set {
if(_PlaysPreview)
set
{
if (_PlaysPreview)
_PreviewPlayer.VideoEnabled = value;
else
else
_SongPlayer.VideoEnabled = value;
}
}
public static bool CanSing
{
get
public static bool CanSing
{
get
{
if (_PlaysPreview)
return false;
else if (_BGMusicFiles.Contains(_CurrentPlaylistElement))
return false;
else
if (_BGMusicFiles.Contains(_CurrentPlaylistElement))
return false;
else return true;
}
return true;
}
}
public static bool Disabled
@@ -85,7 +86,8 @@ namespace Vocaluxe.Base
}
}
public static bool RepeatSong {
public static bool RepeatSong
{
get { return _SongPlayer.RepeatSong; }
set { _SongPlayer.RepeatSong = value; }
}
@@ -100,13 +102,20 @@ namespace Vocaluxe.Base
get { return _SongPlayer.SongHasVideo; }
}
public static bool IsPlaying { get { return _PlaysPreview ? _PreviewPlayer.IsPlaying : _SongPlayer.IsPlaying; } }
public static bool IsPlaying
{
get { return _PlaysPreview ? _PreviewPlayer.IsPlaying : _SongPlayer.IsPlaying; }
}
public static bool IsPlayingPreview { get { return _PlaysPreview; } }
public static bool IsPlayingPreview
{
get { return _PlaysPreview; }
}
public static string ArtistAndTitle
{
get {
get
{
if (_PlaysPreview)
return _PreviewPlayer.ArtistAndTitle;
else
@@ -119,7 +128,7 @@ namespace Vocaluxe.Base
get { return _PlaysPreview ? _PreviewPlayer.Length : _SongPlayer.Length; }
}
public static CTexture Cover
public static CTextureRef Cover
{
get { return _PlaysPreview ? _PreviewPlayer.Cover : _SongPlayer.Cover; }
}
@@ -184,12 +193,14 @@ namespace Vocaluxe.Base
if (_PlaysPreview)
_PreviewPlayer.Play();
else if(CConfig.BackgroundMusic == EBackgroundMusicOffOn.TR_CONFIG_OFF)
else if (CConfig.BackgroundMusic == EBackgroundMusicOffOn.TR_CONFIG_OFF)
{
if (_SongPlayer.SongLoaded)
//Resume
_SongPlayer.TogglePause();
else
Next();
}
}
public static void Stop()
@@ -278,7 +289,7 @@ namespace Vocaluxe.Base
public static void Update()
{
if (!IsPlaying && (!_SongPlayer.SongLoaded || !_PreviewPlayer.SongLoaded) )
if (!IsPlaying && (!_SongPlayer.SongLoaded || !_PreviewPlayer.SongLoaded))
return;
if (_PlaysPreview)
@@ -291,7 +302,7 @@ namespace Vocaluxe.Base
}
}
public static CTexture GetVideoTexture()
public static CTextureRef GetVideoTexture()
{
return _PlaysPreview ? _PreviewPlayer.GetVideoTexture() : _SongPlayer.GetVideoTexture();
}
@@ -439,6 +450,5 @@ namespace Vocaluxe.Base
{
return _BGMusicFiles.Contains(element);
}
}
}
+4 -4
View File
@@ -32,10 +32,10 @@ namespace Vocaluxe.Base
static class CCover
{
private static readonly Dictionary<string, CTexture> _Covers = new Dictionary<string, CTexture>();
private static readonly Dictionary<string, CTextureRef> _Covers = new Dictionary<string, CTextureRef>();
private static readonly List<SCoverTheme> _CoverThemes = new List<SCoverTheme>();
public static CTexture NoCover { get; private set; }
public static CTextureRef NoCover { get; private set; }
public static void Init()
{
@@ -81,7 +81,7 @@ namespace Vocaluxe.Base
/// <summary>
/// Returns a STexture for a given cover name. Returns "NoCover" if the cover does not exist.
/// </summary>
public static CTexture Cover(string name)
public static CTextureRef Cover(string name)
{
lock (_Covers)
{
@@ -116,7 +116,7 @@ namespace Vocaluxe.Base
{
foreach (string key in _Covers.Keys)
{
CTexture texture = _Covers[key];
CTextureRef texture = _Covers[key];
CDraw.RemoveTexture(ref texture);
}
_Covers.Clear();
+1 -1
View File
@@ -27,7 +27,7 @@ namespace Vocaluxe.Base
{
private int _MouseMoveDiffMin = CSettings.MouseMoveDiffMinActive;
private CFading _Fading;
private CTexture _Cursor;
private CTextureRef _Cursor;
private Point _LastDiffPos;
private readonly Stopwatch _Movetimer = new Stopwatch();
+2 -2
View File
@@ -93,7 +93,7 @@ namespace Vocaluxe.Base
_HighscoreDB.IncreaseSongCounter(dataBaseSongID);
}
public static bool GetCover(string fileName, ref CTexture tex, int maxSize)
public static bool GetCover(string fileName, ref CTextureRef tex, int maxSize)
{
return _CoverDB.GetCover(fileName, ref tex, maxSize);
}
@@ -103,7 +103,7 @@ namespace Vocaluxe.Base
_CoverDB.CommitCovers();
}
public static bool GetCreditsRessource(string fileName, ref CTexture tex)
public static bool GetCreditsRessource(string fileName, ref CTextureRef tex)
{
return _ResourceDB.GetCreditsRessource(fileName, ref tex);
}
+16 -16
View File
@@ -130,12 +130,12 @@ namespace Vocaluxe.Base
_Draw.ClearScreen();
}
public static CTexture CopyScreen()
public static CTextureRef CopyScreen()
{
return _Draw.CopyScreen();
}
public static void CopyScreen(ref CTexture texture)
public static void CopyScreen(ref CTextureRef texture)
{
_Draw.CopyScreen(ref texture);
}
@@ -145,67 +145,67 @@ namespace Vocaluxe.Base
_Draw.MakeScreenShot();
}
public static CTexture AddTexture(Bitmap bitmap)
public static CTextureRef AddTexture(Bitmap bitmap)
{
return _Draw.AddTexture(bitmap);
}
public static CTexture AddTexture(string texturePath)
public static CTextureRef AddTexture(string texturePath)
{
return _Draw.AddTexture(texturePath);
}
public static CTexture AddTexture(int w, int h, byte[] data)
public static CTextureRef AddTexture(int w, int h, byte[] data)
{
return _Draw.AddTexture(w, h, data);
}
public static CTexture EnqueueTexture(int w, int h, byte[] data)
public static CTextureRef EnqueueTexture(int w, int h, byte[] data)
{
return _Draw.EnqueueTexture(w, h, data);
}
public static bool UpdateTexture(CTexture texture, int w, int h, byte[] data)
public static bool UpdateTexture(CTextureRef texture, int w, int h, byte[] data)
{
return _Draw.UpdateTexture(texture, w, h, data);
}
public static bool UpdateOrAddTexture(ref CTexture texture, int w, int h, byte[] data)
public static bool UpdateOrAddTexture(ref CTextureRef texture, int w, int h, byte[] data)
{
return _Draw.UpdateOrAddTexture(ref texture, w, h, data);
}
public static void RemoveTexture(ref CTexture texture)
public static void RemoveTexture(ref CTextureRef texture)
{
_Draw.RemoveTexture(ref texture);
}
public static void DrawTexture(CTexture texture)
public static void DrawTexture(CTextureRef texture)
{
_Draw.DrawTexture(texture);
}
public static void DrawTexture(CTexture texture, SRectF rect)
public static void DrawTexture(CTextureRef texture, SRectF rect)
{
_Draw.DrawTexture(texture, rect);
}
public static void DrawTexture(CTexture texture, SRectF rect, SColorF color, bool mirrored = false)
public static void DrawTexture(CTextureRef texture, SRectF rect, SColorF color, bool mirrored = false)
{
_Draw.DrawTexture(texture, rect, color, mirrored);
}
public static void DrawTexture(CTexture texture, SRectF rect, SColorF color, SRectF bounds, bool mirrored = false)
public static void DrawTexture(CTextureRef texture, SRectF rect, SColorF color, SRectF bounds, bool mirrored = false)
{
_Draw.DrawTexture(texture, rect, color, bounds, mirrored);
}
public static void DrawTexture(CTexture texture, SRectF rect, SColorF color, float begin, float end)
public static void DrawTexture(CTextureRef texture, SRectF rect, SColorF color, float begin, float end)
{
_Draw.DrawTexture(texture, rect, color, begin, end);
}
public static void DrawTexture(CStatic staticBounds, CTexture texture, EAspect aspect)
public static void DrawTexture(CStatic staticBounds, CTextureRef texture, EAspect aspect)
{
if (texture == null)
return;
@@ -218,7 +218,7 @@ namespace Vocaluxe.Base
texture.Color, new SRectF(bounds.X, bounds.Y, bounds.Width, bounds.Height, 0f));
}
public static void DrawTextureReflection(CTexture texture, SRectF rect, SColorF color, SRectF bounds, float space, float height)
public static void DrawTextureReflection(CTextureRef texture, SRectF rect, SColorF color, SRectF bounds, float space, float height)
{
_Draw.DrawTextureReflection(texture, rect, color, bounds, space, height);
}
+13 -13
View File
@@ -267,12 +267,12 @@ namespace Vocaluxe.Base
return CTheme.GetSkinIndex(partyModeID);
}
public CTexture GetSkinTexture(string textureName, int partyModeID)
public CTextureRef GetSkinTexture(string textureName, int partyModeID)
{
return CTheme.GetSkinTexture(textureName, partyModeID);
}
public CTexture GetSkinVideoTexture(string videoName, int partyModeID)
public CTextureRef GetSkinVideoTexture(string videoName, int partyModeID)
{
return CTheme.GetSkinVideoTexture(videoName, partyModeID);
}
@@ -400,7 +400,7 @@ namespace Vocaluxe.Base
CBackgroundMusic.StopPreview();
}
public CTexture GetVideoTexture()
public CTextureRef GetVideoTexture()
{
return CBackgroundMusic.GetVideoTexture();
}
@@ -408,32 +408,32 @@ namespace Vocaluxe.Base
class CBdraw : IDrawing
{
public void DrawTexture(CTexture texture, SRectF rect)
public void DrawTexture(CTextureRef texture, SRectF rect)
{
CDraw.DrawTexture(texture, rect);
}
public void DrawTexture(CTexture texture, SRectF rect, SColorF color)
public void DrawTexture(CTextureRef texture, SRectF rect, SColorF color)
{
CDraw.DrawTexture(texture, rect, color);
}
public void DrawTexture(CTexture texture, SRectF rect, SColorF color, SRectF bounds, bool mirrored = false)
public void DrawTexture(CTextureRef texture, SRectF rect, SColorF color, SRectF bounds, bool mirrored = false)
{
CDraw.DrawTexture(texture, rect, color, bounds, mirrored);
}
public void DrawTextureReflection(CTexture texture, SRectF rect, SColorF color, SRectF bounds, float reflectionSpace, float reflectionHeight)
public void DrawTextureReflection(CTextureRef texture, SRectF rect, SColorF color, SRectF bounds, float reflectionSpace, float reflectionHeight)
{
CDraw.DrawTextureReflection(texture, rect, color, bounds, reflectionSpace, reflectionHeight);
}
public CTexture AddTexture(string fileName)
public CTextureRef AddTexture(string fileName)
{
return CDraw.AddTexture(fileName);
}
public void RemoveTexture(ref CTexture texture)
public void RemoveTexture(ref CTextureRef texture)
{
CDraw.RemoveTexture(ref texture);
}
@@ -651,7 +651,7 @@ namespace Vocaluxe.Base
return CProfiles.GetPlayerName(profileID, playerNum);
}
public CTexture GetAvatar(int profileID)
public CTextureRef GetAvatar(int profileID)
{
return CProfiles.GetAvatarTextureFromProfile(profileID);
}
@@ -810,7 +810,7 @@ namespace Vocaluxe.Base
return CVideo.Skip(videoStream, startPosition, videoGap);
}
public bool GetFrame(int videoStream, ref CTexture videoTexture, float time, out float videoTime)
public bool GetFrame(int videoStream, ref CTextureRef videoTexture, float time, out float videoTime)
{
return CVideo.GetFrame(videoStream, ref videoTexture, time, out videoTime);
}
@@ -891,7 +891,7 @@ namespace Vocaluxe.Base
class CBcover : ICover
{
public CTexture GetNoCover()
public CTextureRef GetNoCover()
{
return CCover.NoCover;
}
@@ -899,7 +899,7 @@ namespace Vocaluxe.Base
class CBdataBase : IDataBase
{
public bool GetCover(string fileName, ref CTexture texture, int coverSize)
public bool GetCover(string fileName, ref CTextureRef texture, int coverSize)
{
return CDataBase.GetCover(fileName, ref texture, coverSize);
}
+1 -1
View File
@@ -61,7 +61,7 @@ namespace Vocaluxe.Base
get { return _Song != null ? _Song.Finish : 0f; }
}
public CTexture Cover
public CTextureRef Cover
{
get { return _Song != null ? _Song.CoverTextureSmall : CCover.NoCover; }
}
+2 -2
View File
@@ -504,7 +504,7 @@ namespace Vocaluxe.Base
#endregion profile properties
#region avatar texture
public static CTexture GetAvatarTexture(int avatarID)
public static CTextureRef GetAvatarTexture(int avatarID)
{
if (!IsAvatarIDValid(avatarID))
return null;
@@ -512,7 +512,7 @@ namespace Vocaluxe.Base
return _Avatars[avatarID].Texture;
}
public static CTexture GetAvatarTextureFromProfile(int profileID)
public static CTextureRef GetAvatarTextureFromProfile(int profileID)
{
if (!IsProfileIDValid(profileID) || _Profiles[profileID].Avatar == null)
return null;
+3 -3
View File
@@ -44,7 +44,7 @@ namespace Vocaluxe.Base
class CSkinElement
{
public string Value;
public CTexture Texture;
public CTextureRef Texture;
}
class CVideoSkinElement : CSkinElement
@@ -554,7 +554,7 @@ namespace Vocaluxe.Base
return path;
}
public static CTexture GetSkinTexture(string textureName, int partyModeID)
public static CTextureRef GetSkinTexture(string textureName, int partyModeID)
{
int skinIndex = GetSkinIndex(partyModeID);
CSkinElement sk;
@@ -597,7 +597,7 @@ namespace Vocaluxe.Base
return null;
}
public static CTexture GetSkinVideoTexture(string videoName, int partyModeID)
public static CTextureRef GetSkinVideoTexture(string videoName, int partyModeID)
{
CVideoSkinElement sk = GetSkinVideo(videoName, partyModeID);
if (sk == null)
+1 -1
View File
@@ -75,7 +75,7 @@ namespace Vocaluxe.Base
return _VideoDecoder.GetLength(streamID);
}
public static bool GetFrame(int streamID, ref CTexture frame, float time, out float videoTime)
public static bool GetFrame(int streamID, ref CTextureRef frame, float time, out float videoTime)
{
return _VideoDecoder.GetFrame(streamID, ref frame, time, out videoTime);
}
+1 -1
View File
@@ -7,7 +7,7 @@ namespace Vocaluxe.Base
{
class CVideoPlayer
{
private CTexture _VideoTexture;
private CTextureRef _VideoTexture;
private int _VideoStream;
private readonly Stopwatch _VideoTimer = new Stopwatch();
private bool _Finished;
+1 -1
View File
@@ -57,7 +57,7 @@ namespace Vocaluxe.Base
_Webcam = null;
}
public static bool GetFrame(ref CTexture tex)
public static bool GetFrame(ref CTextureRef tex)
{
return _Webcam != null && _Webcam.GetFrame(ref tex);
}
+3 -3
View File
@@ -85,7 +85,7 @@ namespace Vocaluxe.Base.Fonts
public void DrawGlyph(char chr, float x, float y, float z, SColorF color)
{
CTexture texture;
CTextureRef texture;
SRectF rect;
GetOrAddGlyph(chr).GetTextureAndRect(x, y, z, out texture, out rect);
CDraw.DrawTexture(texture, rect, color);
@@ -93,7 +93,7 @@ namespace Vocaluxe.Base.Fonts
public void DrawGlyph(char chr, float x, float y, float z, SColorF color, float begin, float end)
{
CTexture texture;
CTextureRef texture;
SRectF rect;
GetOrAddGlyph(chr).GetTextureAndRect(x, y, z, out texture, out rect);
CDraw.DrawTexture(texture, rect, color, begin, end);
@@ -101,7 +101,7 @@ namespace Vocaluxe.Base.Fonts
public void DrawGlyphReflection(char chr, float x, float y, float z, SColorF color, float rspace, float rheight)
{
CTexture texture;
CTextureRef texture;
SRectF rect;
GetOrAddGlyph(chr).GetTextureAndRect(x, y, z, out texture, out rect);
CDraw.DrawTextureReflection(texture, rect, color, rect, rspace, rheight);
+2 -2
View File
@@ -31,7 +31,7 @@ namespace Vocaluxe.Base.Fonts
{
class CGlyph
{
private CTexture _Texture;
private CTextureRef _Texture;
private readonly SizeF _BoundingBox;
private readonly RectangleF _DrawBounding;
public readonly float MaxHeight;
@@ -147,7 +147,7 @@ namespace Vocaluxe.Base.Fonts
return CFonts.Height / _BoundingBox.Height;
}
public void GetTextureAndRect(float x, float y, float z, out CTexture texture, out SRectF rect)
public void GetTextureAndRect(float x, float y, float z, out CTextureRef texture, out SRectF rect)
{
texture = _Texture;
float factor = _GetFactor();
+1 -1
View File
@@ -63,7 +63,7 @@ namespace Vocaluxe.Lib.Database
}
}
public bool GetCover(string coverPath, ref CTexture tex, int maxSize)
public bool GetCover(string coverPath, ref CTextureRef tex, int maxSize)
{
if (_Connection == null)
return false;
+1 -1
View File
@@ -66,7 +66,7 @@ namespace Vocaluxe.Lib.Database
return true;
}
public bool GetCreditsRessource(string fileName, ref CTexture tex)
public bool GetCreditsRessource(string fileName, ref CTextureRef tex)
{
if (_Connection == null)
return false;
+12 -12
View File
@@ -52,7 +52,7 @@ namespace Vocaluxe.Lib.Draw
private VertexBuffer _VertexBuffer;
private IndexBuffer _IndexBuffer;
private CTexture _BlankTexture;
private CTextureRef _BlankTexture;
private readonly Queue<STexturedColoredVertex> _Vertices = new Queue<STexturedColoredVertex>();
private readonly Queue<Texture> _VerticesTextures = new Queue<Texture>();
@@ -466,9 +466,9 @@ namespace Vocaluxe.Lib.Draw
/// Copies the current frame into a texture
/// <returns>A texture holding the current frame</returns>
/// </summary>
public CTexture CopyScreen()
public CTextureRef CopyScreen()
{
CTexture texture = _GetNewTextureRef(_W, _H);
CTextureRef texture = _GetNewTextureRef(_W, _H);
Surface backbufferSurface = _Device.GetBackBuffer(0, 0);
var tex = new Texture(_Device, texture.W2, texture.H2, 0, Usage.AutoGenerateMipMap, Format.A8R8G8B8, Pool.Managed);
@@ -487,7 +487,7 @@ namespace Vocaluxe.Lib.Draw
/// Copies the current frame into a texture
/// </summary>
/// <param name="texture">The texture in which the frame is copied to</param>
public void CopyScreen(ref CTexture texture)
public void CopyScreen(ref CTextureRef texture)
{
if (!_TextureExists(texture) || texture.DataSize.Width != GetScreenWidth() || texture.DataSize.Height != GetScreenHeight())
{
@@ -566,7 +566,7 @@ namespace Vocaluxe.Lib.Draw
#endregion Basic Draw Methods
#region Textures
protected override Texture _CreateTexture(CTexture texture, byte[] data)
protected override Texture _CreateTexture(CTextureRef texture, byte[] data)
{
//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
@@ -602,7 +602,7 @@ namespace Vocaluxe.Lib.Draw
/// <param name="h"></param>
/// <param name="data">A byte array containing the new texture's data</param>
/// <returns>True if succeeded</returns>
public override bool UpdateTexture(CTexture texture, int w, int h, byte[] data)
public override bool UpdateTexture(CTextureRef texture, int w, int h, byte[] data)
{
if (!_TextureExists(texture))
return false;
@@ -626,7 +626,7 @@ namespace Vocaluxe.Lib.Draw
/// Draws a texture
/// </summary>
/// <param name="texture">The texture to be drawn</param>
public void DrawTexture(CTexture texture)
public void DrawTexture(CTextureRef texture)
{
if (texture == null)
return;
@@ -638,7 +638,7 @@ namespace Vocaluxe.Lib.Draw
/// </summary>
/// <param name="texture">The texture to be drawn</param>
/// <param name="rect">A SRectF struct containing the destination coordinates</param>
public void DrawTexture(CTexture texture, SRectF rect)
public void DrawTexture(CTextureRef texture, SRectF rect)
{
if (texture == null)
return;
@@ -652,7 +652,7 @@ namespace Vocaluxe.Lib.Draw
/// <param name="rect">A SRectF struct containing the destination coordinates</param>
/// <param name="color">A SColorF struct containing a color which the texture will be colored in</param>
/// <param name="mirrored">True if the texture should be mirrored</param>
public void DrawTexture(CTexture texture, SRectF rect, SColorF color, bool mirrored = false)
public void DrawTexture(CTextureRef texture, SRectF rect, SColorF color, bool mirrored = false)
{
if (rect.W < 1 || rect.H < 1)
return;
@@ -698,7 +698,7 @@ namespace Vocaluxe.Lib.Draw
/// <param name="color">A SColorF struct containing a color which the texture will be colored in</param>
/// <param name="bounds">A SRectF struct containing which part of the texture should be drawn</param>
/// <param name="mirrored">True if the texture should be mirrored</param>
public void DrawTexture(CTexture texture, SRectF rect, SColorF color, SRectF bounds, bool mirrored = false)
public void DrawTexture(CTextureRef texture, SRectF rect, SColorF color, SRectF bounds, bool mirrored = false)
{
if (Math.Abs(rect.W) < 1 || Math.Abs(rect.H) < 1 || Math.Abs(bounds.H) < 1 || Math.Abs(bounds.W) < 1 ||
Math.Abs(color.A) < 0.01)
@@ -775,7 +775,7 @@ namespace Vocaluxe.Lib.Draw
/// <param name="color">A SColorF struct containing a color which the texture will be colored in</param>
/// <param name="begin">A Value ranging from 0 to 1 containing the beginning of the texture</param>
/// <param name="end">A Value ranging from 0 to 1 containing the ending of the texture</param>
public void DrawTexture(CTexture texture, SRectF rect, SColorF color, float begin, float end)
public void DrawTexture(CTextureRef texture, SRectF rect, SColorF color, float begin, float end)
{
if (!_TextureExists(texture))
return;
@@ -819,7 +819,7 @@ namespace Vocaluxe.Lib.Draw
/// <param name="bounds">A SRectF struct containing which part of the texture should be drawn</param>
/// <param name="space">The space between the texture and the reflection</param>
/// <param name="height">The height of the reflection</param>
public void DrawTextureReflection(CTexture texture, SRectF rect, SColorF color, SRectF bounds, float space, float height)
public void DrawTextureReflection(CTextureRef texture, SRectF rect, SColorF color, SRectF bounds, float space, float height)
{
if (!_TextureExists(texture))
return;
+22 -22
View File
@@ -15,10 +15,10 @@ namespace Vocaluxe.Lib.Draw
{
struct STextureQueue
{
public readonly CTexture Texture;
public readonly CTextureRef Texture;
public readonly byte[] Data;
public STextureQueue(CTexture texture, byte[] data)
public STextureQueue(CTextureRef texture, byte[] data)
{
Texture = texture;
Data = data;
@@ -141,7 +141,7 @@ namespace Vocaluxe.Lib.Draw
/// <param name="texture"></param>
/// <param name="data"></param>
/// <returns></returns>
protected abstract TTextureType _CreateTexture(CTexture texture, byte[] data);
protected abstract TTextureType _CreateTexture(CTextureRef texture, byte[] data);
/// <summary>
/// Creates the texture specified by the reference and fills it with the given data<br />
@@ -150,14 +150,14 @@ namespace Vocaluxe.Lib.Draw
/// <param name="texture"></param>
/// <param name="data"></param>
/// <returns></returns>
protected virtual TTextureType _CreateTexture(CTexture texture, IntPtr data)
protected virtual TTextureType _CreateTexture(CTextureRef texture, IntPtr data)
{
byte[] dataArray = new byte[4 * texture.DataSize.Width * texture.DataSize.Height];
Marshal.Copy(data, dataArray, 0, dataArray.Length);
return _CreateTexture(texture, dataArray);
}
protected CTexture _GetNewTextureRef(int origWidth, int origHeight, int dataWidth = 0, int dataHeight = 0)
protected CTextureRef _GetNewTextureRef(int origWidth, int origHeight, int dataWidth = 0, int dataHeight = 0)
{
Debug.Assert(origWidth > 0 && origHeight > 0);
Debug.Assert(dataWidth > 0 || dataHeight <= 0);
@@ -168,7 +168,7 @@ namespace Vocaluxe.Lib.Draw
}
Size origSize = new Size(origWidth, origHeight);
Size dataSize = (dataHeight > 0) ? new Size(dataWidth, dataHeight) : origSize;
return new CTexture(id, origSize, dataSize, _CheckForNextPowerOf2(dataSize.Width), _CheckForNextPowerOf2(dataSize.Height));
return new CTextureRef(id, origSize, dataSize, _CheckForNextPowerOf2(dataSize.Width), _CheckForNextPowerOf2(dataSize.Height));
}
/// <summary>
@@ -176,7 +176,7 @@ namespace Vocaluxe.Lib.Draw
/// </summary>
/// <param name="texturePath">The texture's filepath</param>
/// <returns>A STexture object containing the added texture</returns>
public CTexture AddTexture(string texturePath)
public CTextureRef AddTexture(string texturePath)
{
if (!File.Exists(texturePath))
{
@@ -193,7 +193,7 @@ namespace Vocaluxe.Lib.Draw
CLog.LogError("Error loading Texture: " + texturePath);
return null;
}
CTexture s;
CTextureRef s;
try
{
s = AddTexture(bmp, texturePath);
@@ -205,7 +205,7 @@ namespace Vocaluxe.Lib.Draw
return s;
}
public CTexture AddTexture(Bitmap bmp)
public CTextureRef AddTexture(Bitmap bmp)
{
return AddTexture(bmp, "");
}
@@ -216,7 +216,7 @@ namespace Vocaluxe.Lib.Draw
/// <param name="bmp">The Bitmap of which the texure will be created from</param>
/// <param name="texturePath"></param>
/// <returns>A STexture object containing the added texture</returns>
public CTexture AddTexture(Bitmap bmp, string texturePath)
public CTextureRef AddTexture(Bitmap bmp, string texturePath)
{
if (bmp.Height == 0 || bmp.Width == 0)
return null;
@@ -247,7 +247,7 @@ namespace Vocaluxe.Lib.Draw
int w = Math.Min(bmp.Width, maxSize);
int h = Math.Min(bmp.Height, maxSize);
CTexture texture = _GetNewTextureRef(bmp.Width, bmp.Height, w, h);
CTextureRef texture = _GetNewTextureRef(bmp.Width, bmp.Height, w, h);
texture.TexturePath = texturePath;
Bitmap bmp2 = null;
@@ -285,14 +285,14 @@ namespace Vocaluxe.Lib.Draw
return texture;
}
public CTexture AddTexture(int w, int h, byte[] data)
public CTextureRef AddTexture(int w, int h, byte[] data)
{
CTexture texture = _GetNewTextureRef(w, h);
CTextureRef texture = _GetNewTextureRef(w, h);
_AddTexture(texture, data);
return texture;
}
private void _AddTexture(CTexture texture, byte[] data)
private void _AddTexture(CTextureRef texture, byte[] data)
{
TTextureType t = _CreateTexture(texture, data);
lock (_Textures)
@@ -301,7 +301,7 @@ namespace Vocaluxe.Lib.Draw
}
}
private void _AddTexture(CTexture texture, IntPtr data)
private void _AddTexture(CTextureRef texture, IntPtr data)
{
TTextureType t = _CreateTexture(texture, data);
lock (_Textures)
@@ -310,9 +310,9 @@ namespace Vocaluxe.Lib.Draw
}
}
public CTexture EnqueueTexture(int w, int h, byte[] data)
public CTextureRef EnqueueTexture(int w, int h, byte[] data)
{
CTexture texture = _GetNewTextureRef(w, h);
CTextureRef texture = _GetNewTextureRef(w, h);
lock (_Textures)
{
@@ -330,9 +330,9 @@ namespace Vocaluxe.Lib.Draw
/// <param name="h"></param>
/// <param name="data">A byte array containing the new texture's data</param>
/// <returns>True if succeeded</returns>
public abstract bool UpdateTexture(CTexture texture, int w, int h, byte[] data);
public abstract bool UpdateTexture(CTextureRef texture, int w, int h, byte[] data);
public bool UpdateOrAddTexture(ref CTexture texture, int w, int h, byte[] data)
public bool UpdateOrAddTexture(ref CTextureRef texture, int w, int h, byte[] data)
{
if (!UpdateTexture(texture, w, h, data))
{
@@ -347,7 +347,7 @@ namespace Vocaluxe.Lib.Draw
/// </summary>
/// <param name="texture">The texture to check</param>
/// <returns>True if the texture exists</returns>
protected bool _TextureExists(CTexture texture)
protected bool _TextureExists(CTextureRef texture)
{
lock (_Textures)
{
@@ -356,7 +356,7 @@ namespace Vocaluxe.Lib.Draw
}
}
protected TTextureType _GetTexture(CTexture textureRef)
protected TTextureType _GetTexture(CTextureRef textureRef)
{
if (textureRef == null)
return null;
@@ -369,7 +369,7 @@ namespace Vocaluxe.Lib.Draw
/// Removes a texture from the Vram
/// </summary>
/// <param name="texture">The texture to be removed</param>
public void RemoveTexture(ref CTexture texture)
public void RemoveTexture(ref CTextureRef texture)
{
if (texture == null)
return;
+23 -23
View File
@@ -44,7 +44,7 @@ namespace Vocaluxe.Lib.Draw
private bool _TopMost;
private Rectangle _Bounds;
private readonly Dictionary<int, CTexture> _Textures = new Dictionary<int, CTexture>();
private readonly Dictionary<int, CTextureRef> _Textures = new Dictionary<int, CTextureRef>();
private readonly List<Bitmap> _Bitmaps = new List<Bitmap>();
private readonly Color _ClearColor = Color.DarkBlue;
@@ -279,11 +279,11 @@ namespace Vocaluxe.Lib.Draw
_G.Clear(_ClearColor);
}
public CTexture CopyScreen()
public CTextureRef CopyScreen()
{
var bmp = new Bitmap(_Backbuffer);
_Bitmaps.Add(bmp);
CTexture texture = _GetNewTexture(bmp.Width, bmp.Height);
CTextureRef texture = _GetNewTexture(bmp.Width, bmp.Height);
// Add to Texture List
_Textures[texture.ID] = texture;
@@ -291,7 +291,7 @@ namespace Vocaluxe.Lib.Draw
return texture;
}
public void CopyScreen(ref CTexture texture)
public void CopyScreen(ref CTextureRef texture)
{
if (!_TextureExists(texture) || texture.W2 != GetScreenWidth() || texture.H2 != GetScreenHeight())
{
@@ -318,11 +318,11 @@ namespace Vocaluxe.Lib.Draw
public void DrawColorReflection(SColorF color, SRectF rect, float space, float height) {}
public CTexture AddTexture(Bitmap bmp)
public CTextureRef AddTexture(Bitmap bmp)
{
var bmp2 = new Bitmap(bmp);
_Bitmaps.Add(bmp2);
CTexture texture = _GetNewTexture(bmp.Width, bmp.Height);
CTextureRef texture = _GetNewTexture(bmp.Width, bmp.Height);
// Add to Texture List
_Textures[texture.ID] = texture;
@@ -330,23 +330,23 @@ namespace Vocaluxe.Lib.Draw
return texture;
}
private CTexture _GetNewTexture(int w, int h)
private CTextureRef _GetNewTexture(int w, int h)
{
return new CTexture(_Bitmaps.Count - 1, new Size(w, h), new Size(w, h));
return new CTextureRef(_Bitmaps.Count - 1, new Size(w, h), new Size(w, h));
}
public CTexture AddTexture(string texturePath)
public CTextureRef AddTexture(string texturePath)
{
if (File.Exists(texturePath))
{
foreach (CTexture tex in _Textures.Values)
foreach (CTextureRef tex in _Textures.Values)
{
if (tex.TexturePath == texturePath)
return tex;
}
using (var bmp = new Bitmap(texturePath))
{
CTexture texture = AddTexture(bmp);
CTextureRef texture = AddTexture(bmp);
texture.TexturePath = texturePath;
}
}
@@ -354,12 +354,12 @@ namespace Vocaluxe.Lib.Draw
return null;
}
private bool _TextureExists(CTexture texture)
private bool _TextureExists(CTextureRef texture)
{
return texture != null && _Textures.ContainsKey(texture.ID);
}
public void RemoveTexture(ref CTexture texture)
public void RemoveTexture(ref CTextureRef texture)
{
if (_TextureExists(texture))
{
@@ -369,12 +369,12 @@ namespace Vocaluxe.Lib.Draw
texture = null;
}
public CTexture EnqueueTexture(int w, int h, byte[] data)
public CTextureRef EnqueueTexture(int w, int h, byte[] data)
{
return AddTexture(w, h, data);
}
public CTexture AddTexture(int w, int h, byte[] data)
public CTextureRef AddTexture(int w, int h, byte[] data)
{
using (var bmp = new Bitmap(w, h))
{
@@ -385,7 +385,7 @@ namespace Vocaluxe.Lib.Draw
}
}
public bool UpdateTexture(CTexture texture, int w, int h, byte[] data)
public bool UpdateTexture(CTextureRef texture, int w, int h, byte[] data)
{
if (_TextureExists(texture))
{
@@ -398,7 +398,7 @@ namespace Vocaluxe.Lib.Draw
return false;
}
public bool UpdateOrAddTexture(ref CTexture texture, int w, int h, byte[] data)
public bool UpdateOrAddTexture(ref CTextureRef texture, int w, int h, byte[] data)
{
if (!UpdateTexture(texture, w, h, data))
{
@@ -408,25 +408,25 @@ namespace Vocaluxe.Lib.Draw
return true;
}
public void DrawTexture(CTexture texture)
public void DrawTexture(CTextureRef texture)
{
if (texture != null)
DrawTexture(texture, texture.Rect, texture.Color);
}
public void DrawTexture(CTexture texture, SRectF rect)
public void DrawTexture(CTextureRef texture, SRectF rect)
{
if (texture != null)
DrawTexture(texture, rect, texture.Color);
}
public void DrawTexture(CTexture texture, SRectF rect, SColorF color, bool mirrored = false)
public void DrawTexture(CTextureRef texture, SRectF rect, SColorF color, bool mirrored = false)
{
if (texture != null)
DrawTexture(texture, rect, color, rect, mirrored);
}
public void DrawTexture(CTexture texture, SRectF rect, SColorF color, SRectF bounds, bool mirrored = false)
public void DrawTexture(CTextureRef texture, SRectF rect, SColorF color, SRectF bounds, bool mirrored = false)
{
if (!_TextureExists(texture))
return;
@@ -435,9 +435,9 @@ namespace Vocaluxe.Lib.Draw
coloredBitmap.Dispose();
}
public void DrawTexture(CTexture texture, SRectF rect, SColorF color, float begin, float end) {}
public void DrawTexture(CTextureRef texture, SRectF rect, SColorF color, float begin, float end) {}
public void DrawTextureReflection(CTexture texture, SRectF rect, SColorF color, SRectF bounds, float space, float height) {}
public void DrawTextureReflection(CTextureRef texture, SRectF rect, SColorF color, SRectF bounds, float space, float height) {}
public int GetTextureCount()
{
+12 -12
View File
@@ -275,9 +275,9 @@ namespace Vocaluxe.Lib.Draw
GL.Ortho(-CConfig.BorderLeft, CConfig.BorderRight + CSettings.RenderW, CConfig.BorderBottom + CSettings.RenderH, -CConfig.BorderTop, CSettings.ZNear, CSettings.ZFar);
}
public CTexture CopyScreen()
public CTextureRef CopyScreen()
{
CTexture texture = _GetNewTextureRef(_W, _H);
CTextureRef texture = _GetNewTextureRef(_W, _H);
CGLTexture t = new CGLTexture(GL.GenTexture());
GL.BindTexture(TextureTarget.Texture2D, t.Name);
@@ -299,7 +299,7 @@ namespace Vocaluxe.Lib.Draw
return texture;
}
public void CopyScreen(ref CTexture texture)
public void CopyScreen(ref CTextureRef texture)
{
//Check for actual texture sizes as it may be downsized compared to OrigSize
if (!_TextureExists(texture) || texture.DataSize.Width != GetScreenWidth() || texture.DataSize.Height != GetScreenHeight())
@@ -419,7 +419,7 @@ namespace Vocaluxe.Lib.Draw
#region Textures
#region adding
protected override CGLTexture _CreateTexture(CTexture texture, IntPtr data)
protected override CGLTexture _CreateTexture(CTextureRef texture, IntPtr data)
{
CGLTexture t = new CGLTexture(GL.GenTexture());
@@ -439,7 +439,7 @@ namespace Vocaluxe.Lib.Draw
return t;
}
protected override CGLTexture _CreateTexture(CTexture texture, byte[] data)
protected override CGLTexture _CreateTexture(CTextureRef texture, byte[] data)
{
CGLTexture t = new CGLTexture(GL.GenTexture());
@@ -476,7 +476,7 @@ namespace Vocaluxe.Lib.Draw
#endregion adding
#region updating
public override bool UpdateTexture(CTexture texture, int w, int h, byte[] data)
public override bool UpdateTexture(CTextureRef texture, int w, int h, byte[] data)
{
CGLTexture t = _GetTexture(texture);
if (t == null)
@@ -524,21 +524,21 @@ namespace Vocaluxe.Lib.Draw
#endregion updating
#region drawing
public void DrawTexture(CTexture texture)
public void DrawTexture(CTextureRef texture)
{
if (texture == null)
return;
DrawTexture(texture, texture.Rect, texture.Color);
}
public void DrawTexture(CTexture texture, SRectF rect)
public void DrawTexture(CTextureRef texture, SRectF rect)
{
if (texture == null)
return;
DrawTexture(texture, rect, texture.Color);
}
public void DrawTexture(CTexture texture, SRectF rect, SColorF color, bool mirrored = false)
public void DrawTexture(CTextureRef texture, SRectF rect, SColorF color, bool mirrored = false)
{
CGLTexture t = _GetTexture(texture);
if (t == null)
@@ -601,7 +601,7 @@ namespace Vocaluxe.Lib.Draw
GL.BindTexture(TextureTarget.Texture2D, 0);
}
public void DrawTexture(CTexture texture, SRectF rect, SColorF color, SRectF bounds, bool mirrored = false)
public void DrawTexture(CTextureRef texture, SRectF rect, SColorF color, SRectF bounds, bool mirrored = false)
{
CGLTexture t = _GetTexture(texture);
if (t == null)
@@ -696,7 +696,7 @@ namespace Vocaluxe.Lib.Draw
GL.BindTexture(TextureTarget.Texture2D, 0);
}
public void DrawTexture(CTexture texture, SRectF rect, SColorF color, float begin, float end)
public void DrawTexture(CTextureRef texture, SRectF rect, SColorF color, float begin, float end)
{
CGLTexture t = _GetTexture(texture);
if (t == null)
@@ -729,7 +729,7 @@ namespace Vocaluxe.Lib.Draw
GL.BindTexture(TextureTarget.Texture2D, 0);
}
public void DrawTextureReflection(CTexture texture, SRectF rect, SColorF color, SRectF bounds, float space, float height)
public void DrawTextureReflection(CTextureRef texture, SRectF rect, SColorF color, SRectF bounds, float space, float height)
{
CGLTexture t = _GetTexture(texture);
if (t == null)
+15 -15
View File
@@ -33,29 +33,29 @@ namespace Vocaluxe.Lib.Draw
int GetTextureCount();
void ClearScreen();
CTexture CopyScreen();
void CopyScreen(ref CTexture texture);
CTextureRef CopyScreen();
void CopyScreen(ref CTextureRef texture);
void MakeScreenShot();
CTexture AddTexture(string texturePath);
CTexture AddTexture(Bitmap bitmap);
CTexture AddTexture(int w, int h, byte[] data);
CTexture EnqueueTexture(int w, int h, byte[] data);
bool UpdateTexture(CTexture texture, int w, int h, byte[] data);
bool UpdateOrAddTexture(ref CTexture texture, int w, int h, byte[] data);
void RemoveTexture(ref CTexture texture);
CTextureRef AddTexture(string texturePath);
CTextureRef AddTexture(Bitmap bitmap);
CTextureRef AddTexture(int w, int h, byte[] data);
CTextureRef EnqueueTexture(int w, int h, byte[] data);
bool UpdateTexture(CTextureRef texture, int w, int h, byte[] data);
bool UpdateOrAddTexture(ref CTextureRef texture, int w, int h, byte[] data);
void RemoveTexture(ref CTextureRef texture);
// Basic Draw Methods
void DrawLine(int a, int r, int g, int b, int w, int x1, int y1, int x2, int y2);
void DrawColor(SColorF color, SRectF rect);
void DrawColorReflection(SColorF color, SRectF rect, float space, float height);
void DrawTexture(CTexture texture);
void DrawTexture(CTexture texture, SRectF rect);
void DrawTexture(CTexture texture, SRectF rect, SColorF color, bool mirrored = false);
void DrawTexture(CTexture texture, SRectF rect, SColorF color, SRectF bounds, bool mirrored = false);
void DrawTexture(CTexture texture, SRectF rect, SColorF color, float begin, float end);
void DrawTexture(CTextureRef texture);
void DrawTexture(CTextureRef texture, SRectF rect);
void DrawTexture(CTextureRef texture, SRectF rect, SColorF color, bool mirrored = false);
void DrawTexture(CTextureRef texture, SRectF rect, SColorF color, SRectF bounds, bool mirrored = false);
void DrawTexture(CTextureRef texture, SRectF rect, SColorF color, float begin, float end);
void DrawTextureReflection(CTexture texture, SRectF rect, SColorF color, SRectF bounds, float space, float height);
void DrawTextureReflection(CTextureRef texture, SRectF rect, SColorF color, SRectF bounds, float space, float height);
}
}
+1 -1
View File
@@ -102,7 +102,7 @@ namespace Vocaluxe.Lib.Video.Acinerella
Finished = true;
}
public bool GetFrame(ref CTexture frame, float time, out float videoTime)
public bool GetFrame(ref CTextureRef frame, float time, out float videoTime)
{
if (Finished)
{
@@ -193,7 +193,7 @@ namespace Vocaluxe.Lib.Video.Acinerella
/// <param name="time">Maximum start time for frame</param>
/// <param name="finished">Set to whether there are no more frames (stream finished, no loop, future calls will always return false)</param>
/// <returns>True if a new frame was gotten</returns>
public bool GetFrame(ref CTexture frame, ref float time, out bool finished)
public bool GetFrame(ref CTextureRef frame, ref float time, out bool finished)
{
bool result;
if (Math.Abs(_LastShownTime - time) < _FrameDuration && frame != null) //Check 1 frame difference
+1 -1
View File
@@ -69,7 +69,7 @@ namespace Vocaluxe.Lib.Video
return _Decoder.Count;
}
public bool GetFrame(int streamID, ref CTexture frame, float time, out float videoTime)
public bool GetFrame(int streamID, ref CTextureRef frame, float time, out float videoTime)
{
CDecoder decoder;
if (_Decoder.TryGetValue(streamID, out decoder))
+1 -1
View File
@@ -73,7 +73,7 @@ namespace Vocaluxe.Lib.Video
/// </param>
/// <param name="videoTime">The actual position in s of the returned frame. Should be ~ time+VideoGap</param>
/// <returns>True if frame is valid, false: frame and videoTime might be unchanged or invalid</returns>
bool GetFrame(int streamID, ref CTexture frame, float time, out float videoTime);
bool GetFrame(int streamID, ref CTextureRef frame, float time, out float videoTime);
/// <summary>
/// Seeks to given position
+1 -1
View File
@@ -201,7 +201,7 @@ namespace Vocaluxe.Lib.Webcam
}
}
public bool GetFrame(ref CTexture frame)
public bool GetFrame(ref CTextureRef frame)
{
lock (_MutexData)
{
+1 -1
View File
@@ -58,7 +58,7 @@ namespace Vocaluxe.Lib.Webcam
/// </summary>
/// <param name="frame"></param>
/// <returns></returns>
bool GetFrame(ref CTexture frame);
bool GetFrame(ref CTextureRef frame);
/// <summary>
/// Gets the last captured frame as a bitma
+5 -5
View File
@@ -33,11 +33,11 @@ namespace Vocaluxe.Screens
get { return 1; }
}
private CTexture _QRServerAddress;
private CTexture _QRAndroidLink;
private CTexture _QRSymbianLink;
private CTexture _QRWebOSLink;
private CTexture _QRWindowsPhoneLink;
private CTextureRef _QRServerAddress;
private CTextureRef _QRAndroidLink;
private CTextureRef _QRSymbianLink;
private CTextureRef _QRWebOSLink;
private CTextureRef _QRWindowsPhoneLink;
private const string _StaticQRServer = "StaticQRServer";
private const string _StaticQRAndroid = "StaticQRAndroid";
+15 -15
View File
@@ -126,21 +126,21 @@ namespace Vocaluxe.Screens
private List<string[]> _Paragraphs;
private List<CText> _ParagraphTexts;
private CTexture _TexLogo;
private CTexture _TexPerfectNoteStar;
private CTextureRef _TexLogo;
private CTextureRef _TexPerfectNoteStar;
private CTexture _TexRedDot;
private CTexture _TexBlueDot;
private CTextureRef _TexRedDot;
private CTextureRef _TexBlueDot;
private CTexture _TexNameBrunzel;
private CTexture _TexNameDarkice;
private CTexture _TexNameFlokuep;
private CTexture _TexNameFlamefire;
private CTexture _TexNameMesand;
private CTexture _TexNameBohning;
private CTexture _TexNameBabene03;
private CTexture _TexNamePantero;
private CTexture _TexNamePinky007;
private CTextureRef _TexNameBrunzel;
private CTextureRef _TexNameDarkice;
private CTextureRef _TexNameFlokuep;
private CTextureRef _TexNameFlamefire;
private CTextureRef _TexNameMesand;
private CTextureRef _TexNameBohning;
private CTextureRef _TexNameBabene03;
private CTextureRef _TexNamePantero;
private CTextureRef _TexNamePinky007;
public override void Init()
{
@@ -286,12 +286,12 @@ namespace Vocaluxe.Screens
return GetNewParticleEffect(numStars, partColor, rect, _TexPerfectNoteStar, partSize, EParticleType.Star);
}
private void _AddNewCreditName(CTexture texture, int particleOffsetX, int particleOffsetY, bool bigParticles)
private void _AddNewCreditName(CTextureRef texture, int particleOffsetX, int particleOffsetY, bool bigParticles)
{
bool isRight = _CreditNames.Count % 2 == 0;
int partRectSize = bigParticles ? 25 : 20;
int partCount = bigParticles ? 8 : 6;
CTexture texDot = isRight ? _TexRedDot : _TexBlueDot;
CTextureRef texDot = isRight ? _TexRedDot : _TexBlueDot;
CStatic image = GetNewStatic(texture, new SColorF(1, 1, 1, 1), new SRectF(-1, -1, 400, 120, -4));
+1 -1
View File
@@ -55,7 +55,7 @@ namespace Vocaluxe.Screens
{"EqualizerPlayer1", "EqualizerPlayer2", "EqualizerPlayer3", "EqualizerPlayer4", "EqualizerPlayer5", "EqualizerPlayer6"};
private readonly string[] _SelectSlideDuetPlayer = new string[]
{"SelectSlideDuetPlayer1", "SelectSlideDuetPlayer2", "SelectSlideDuetPlayer3", "SelectSlideDuetPlayer4", "SelectSlideDuetPlayer5", "SelectSlideDuetPlayer6"};
private readonly CTexture[] _OriginalPlayerAvatarTextures = new CTexture[CSettings.MaxNumPlayer];
private readonly CTextureRef[] _OriginalPlayerAvatarTextures = new CTextureRef[CSettings.MaxNumPlayer];
private bool _SelectingKeyboardActive;
private bool _SelectingFast;
+1 -1
View File
@@ -49,7 +49,7 @@ namespace Vocaluxe.Screens
private const string _TextWebcamResolution = "TextWebcamResolution";
private SWebcamConfig _Config;
private CTexture _WebcamTexture;
private CTextureRef _WebcamTexture;
private int _DeviceNr;
private int _CapabilityNr;
+1 -1
View File
@@ -64,7 +64,7 @@ namespace Vocaluxe.Screens
private EEditMode _EditMode;
private CTexture _WebcamTexture;
private CTextureRef _WebcamTexture;
private Bitmap _Snapshot;
public override void Init()
+4 -4
View File
@@ -99,9 +99,9 @@ namespace Vocaluxe.Screens
private const float _Volume = 100f;
private int _CurrentVideo = -1;
private EAspect _VideoAspect = EAspect.Crop;
private CTexture _CurrentVideoTexture;
private CTexture _CurrentWebcamFrameTexture;
private CTexture _Background;
private CTextureRef _CurrentVideoTexture;
private CTextureRef _CurrentWebcamFrameTexture;
private CTextureRef _Background;
private float _CurrentTime;
private float _FinishTime;
@@ -450,7 +450,7 @@ namespace Vocaluxe.Screens
{
if (_Active)
{
CTexture background;
CTextureRef background;
var aspect = EAspect.Crop;
if (_CurrentVideo != -1 && CConfig.VideosInSongs == EOffOn.TR_CONFIG_ON && !_Webcam)
{