Thread: [Agate-svn-commit] SF.net SVN: agate:[887] trunk
Status: Alpha
Brought to you by:
kanato
|
From: <ka...@us...> - 2009-04-19 18:08:19
|
Revision: 887
http://agate.svn.sourceforge.net/agate/?rev=887&view=rev
Author: kanato
Date: 2009-04-19 18:08:08 +0000 (Sun, 19 Apr 2009)
Log Message:
-----------
Add ability to adjust space above and below font glyphs.
Modified Paths:
--------------
trunk/AgateLib/BitmapFont/BitmapFontOptions.cs
trunk/Drivers/AgateLib.WinForms/BitmapFontUtil.cs
trunk/Tools/FontCreator/CreateFont.Designer.cs
trunk/Tools/FontCreator/CreateFont.cs
trunk/Tools/FontCreator/EditGlyphs.Designer.cs
trunk/Tools/FontCreator/FontCreator.cs
trunk/Tools/FontCreator/frmFontCreator.cs
Modified: trunk/AgateLib/BitmapFont/BitmapFontOptions.cs
===================================================================
--- trunk/AgateLib/BitmapFont/BitmapFontOptions.cs 2009-04-19 02:14:32 UTC (rev 886)
+++ trunk/AgateLib/BitmapFont/BitmapFontOptions.cs 2009-04-19 18:08:08 UTC (rev 887)
@@ -275,6 +275,15 @@
set { mCreateBorder = value; }
}
+ /// <summary>
+ /// Indicates how much to increase the top margin of letters. Can be negative.
+ /// </summary>
+ public int TopMarginAdjust { get; set; }
+
+ /// <summary>
+ /// Indicates how much to increase the bottom margin of letters. Can be negative.
+ /// </summary>
+ public int BottomMarginAdjust { get; set; }
}
}
Modified: trunk/Drivers/AgateLib.WinForms/BitmapFontUtil.cs
===================================================================
--- trunk/Drivers/AgateLib.WinForms/BitmapFontUtil.cs 2009-04-19 02:14:32 UTC (rev 886)
+++ trunk/Drivers/AgateLib.WinForms/BitmapFontUtil.cs 2009-04-19 18:08:08 UTC (rev 887)
@@ -213,6 +213,7 @@
sourceSize.Width += 2;
sourceSize.Height += 2;
}
+ sourceSize.Height += options.BottomMarginAdjust + options.TopMarginAdjust;
int thisWidth = sourceSize.Width + bitmapPadding;
@@ -271,14 +272,17 @@
height = 0;
}
+ int drawX = x;
+ int drawY = y + options.TopMarginAdjust;
+
if (options.CreateBorder)
{
- rend.DrawText(borderG, i.ToString(), new Point(x, y + 1), borderColor);
- rend.DrawText(borderG, i.ToString(), new Point(x + 2, y + 1), borderColor);
- rend.DrawText(borderG, i.ToString(), new Point(x + 1, y), borderColor);
- rend.DrawText(borderG, i.ToString(), new Point(x + 1, y + 2), borderColor);
+ rend.DrawText(borderG, i.ToString(), new Point(drawX , drawY + 1), borderColor);
+ rend.DrawText(borderG, i.ToString(), new Point(drawX + 2, drawY + 1), borderColor);
+ rend.DrawText(borderG, i.ToString(), new Point(drawX + 1, drawY), borderColor);
+ rend.DrawText(borderG, i.ToString(), new Point(drawX + 1, drawY + 2), borderColor);
- rend.DrawText(g, i.ToString(), new Point(x + 1, y + 1), System.Drawing.Color.White);
+ rend.DrawText(g, i.ToString(), new Point(drawX + 1, drawY + 1), System.Drawing.Color.White);
if (font.SizeInPoints >= 14.0)
glyphs[i].LeftOverhang = 1;
@@ -287,7 +291,7 @@
}
else
{
- rend.DrawText(g, i.ToString(), new Point(x, y), System.Drawing.Color.White);
+ rend.DrawText(g, i.ToString(), new Point(drawX, drawY), System.Drawing.Color.White);
}
glyphs[i].SourceRect = new Rectangle(
Modified: trunk/Tools/FontCreator/CreateFont.Designer.cs
===================================================================
--- trunk/Tools/FontCreator/CreateFont.Designer.cs 2009-04-19 02:14:32 UTC (rev 886)
+++ trunk/Tools/FontCreator/CreateFont.Designer.cs 2009-04-19 18:08:08 UTC (rev 887)
@@ -28,417 +28,483 @@
/// </summary>
private void InitializeComponent()
{
- this.label1 = new System.Windows.Forms.Label();
- this.label2 = new System.Windows.Forms.Label();
- this.cboFamily = new System.Windows.Forms.ComboBox();
- this.nudSize = new System.Windows.Forms.NumericUpDown();
- this.label3 = new System.Windows.Forms.Label();
- this.chkBold = new System.Windows.Forms.CheckBox();
- this.chkItalic = new System.Windows.Forms.CheckBox();
- this.chkUnderline = new System.Windows.Forms.CheckBox();
- this.chkStrikeout = new System.Windows.Forms.CheckBox();
- this.txtSampleText = new System.Windows.Forms.TextBox();
- this.splitContainer1 = new System.Windows.Forms.SplitContainer();
- this.renderTarget = new AgateLib.WinForms.AgateRenderTarget();
- this.zoomRenderTarget = new AgateLib.WinForms.AgateRenderTarget();
- this.groupBox1 = new System.Windows.Forms.GroupBox();
- this.nudOpacity = new System.Windows.Forms.NumericUpDown();
- this.label6 = new System.Windows.Forms.Label();
- this.chkBorder = new System.Windows.Forms.CheckBox();
- this.btnBorderColor = new System.Windows.Forms.Button();
- this.cboEdges = new System.Windows.Forms.ComboBox();
- this.label4 = new System.Windows.Forms.Label();
- this.chkTextRenderer = new System.Windows.Forms.CheckBox();
- this.nudScale = new System.Windows.Forms.NumericUpDown();
- this.colorDialog = new System.Windows.Forms.ColorDialog();
- this.groupBox2 = new System.Windows.Forms.GroupBox();
- this.label8 = new System.Windows.Forms.Label();
- this.cboBg = new System.Windows.Forms.ComboBox();
- this.btnDisplayColor = new System.Windows.Forms.Button();
- this.label5 = new System.Windows.Forms.Label();
- this.label7 = new System.Windows.Forms.Label();
- ((System.ComponentModel.ISupportInitialize)(this.nudSize)).BeginInit();
- this.splitContainer1.Panel1.SuspendLayout();
- this.splitContainer1.Panel2.SuspendLayout();
- this.splitContainer1.SuspendLayout();
- this.groupBox1.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.nudOpacity)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.nudScale)).BeginInit();
- this.groupBox2.SuspendLayout();
- this.SuspendLayout();
- //
- // label1
- //
- this.label1.AutoSize = true;
- this.label1.Location = new System.Drawing.Point(8, 22);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(66, 13);
- this.label1.TabIndex = 0;
- this.label1.Text = "Sample Text";
- //
- // label2
- //
- this.label2.AutoSize = true;
- this.label2.Location = new System.Drawing.Point(13, 30);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(60, 13);
- this.label2.TabIndex = 1;
- this.label2.Text = "Font Family";
- //
- // cboFamily
- //
- this.cboFamily.DropDownHeight = 210;
- this.cboFamily.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.cboFamily.DropDownWidth = 300;
- this.cboFamily.FormattingEnabled = true;
- this.cboFamily.IntegralHeight = false;
- this.cboFamily.Location = new System.Drawing.Point(79, 27);
- this.cboFamily.Name = "cboFamily";
- this.cboFamily.Size = new System.Drawing.Size(145, 21);
- this.cboFamily.TabIndex = 3;
- this.cboFamily.SelectedIndexChanged += new System.EventHandler(this.cboFamily_SelectedIndexChanged);
- //
- // nudSize
- //
- this.nudSize.DecimalPlaces = 1;
- this.nudSize.Location = new System.Drawing.Point(79, 54);
- this.nudSize.Maximum = new decimal(new int[] {
+ this.label1 = new System.Windows.Forms.Label();
+ this.label2 = new System.Windows.Forms.Label();
+ this.cboFamily = new System.Windows.Forms.ComboBox();
+ this.nudSize = new System.Windows.Forms.NumericUpDown();
+ this.label3 = new System.Windows.Forms.Label();
+ this.chkBold = new System.Windows.Forms.CheckBox();
+ this.chkItalic = new System.Windows.Forms.CheckBox();
+ this.chkUnderline = new System.Windows.Forms.CheckBox();
+ this.chkStrikeout = new System.Windows.Forms.CheckBox();
+ this.txtSampleText = new System.Windows.Forms.TextBox();
+ this.splitContainer1 = new System.Windows.Forms.SplitContainer();
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.nudOpacity = new System.Windows.Forms.NumericUpDown();
+ this.label6 = new System.Windows.Forms.Label();
+ this.chkBorder = new System.Windows.Forms.CheckBox();
+ this.btnBorderColor = new System.Windows.Forms.Button();
+ this.cboEdges = new System.Windows.Forms.ComboBox();
+ this.label4 = new System.Windows.Forms.Label();
+ this.chkTextRenderer = new System.Windows.Forms.CheckBox();
+ this.nudScale = new System.Windows.Forms.NumericUpDown();
+ this.colorDialog = new System.Windows.Forms.ColorDialog();
+ this.groupBox2 = new System.Windows.Forms.GroupBox();
+ this.label8 = new System.Windows.Forms.Label();
+ this.cboBg = new System.Windows.Forms.ComboBox();
+ this.btnDisplayColor = new System.Windows.Forms.Button();
+ this.label5 = new System.Windows.Forms.Label();
+ this.label7 = new System.Windows.Forms.Label();
+ this.label9 = new System.Windows.Forms.Label();
+ this.nudTopMargin = new System.Windows.Forms.NumericUpDown();
+ this.renderTarget = new AgateLib.WinForms.AgateRenderTarget();
+ this.zoomRenderTarget = new AgateLib.WinForms.AgateRenderTarget();
+ this.nudBottomMargin = new System.Windows.Forms.NumericUpDown();
+ this.label10 = new System.Windows.Forms.Label();
+ ((System.ComponentModel.ISupportInitialize)(this.nudSize)).BeginInit();
+ this.splitContainer1.Panel1.SuspendLayout();
+ this.splitContainer1.Panel2.SuspendLayout();
+ this.splitContainer1.SuspendLayout();
+ this.groupBox1.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.nudOpacity)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.nudScale)).BeginInit();
+ this.groupBox2.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.nudTopMargin)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.nudBottomMargin)).BeginInit();
+ this.SuspendLayout();
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(8, 22);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(66, 13);
+ this.label1.TabIndex = 0;
+ this.label1.Text = "Sample Text";
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.Location = new System.Drawing.Point(13, 25);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(60, 13);
+ this.label2.TabIndex = 1;
+ this.label2.Text = "Font Family";
+ //
+ // cboFamily
+ //
+ this.cboFamily.DropDownHeight = 210;
+ this.cboFamily.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.cboFamily.DropDownWidth = 300;
+ this.cboFamily.FormattingEnabled = true;
+ this.cboFamily.IntegralHeight = false;
+ this.cboFamily.Location = new System.Drawing.Point(79, 22);
+ this.cboFamily.Name = "cboFamily";
+ this.cboFamily.Size = new System.Drawing.Size(145, 21);
+ this.cboFamily.TabIndex = 3;
+ this.cboFamily.SelectedIndexChanged += new System.EventHandler(this.cboFamily_SelectedIndexChanged);
+ //
+ // nudSize
+ //
+ this.nudSize.DecimalPlaces = 1;
+ this.nudSize.Location = new System.Drawing.Point(79, 49);
+ this.nudSize.Maximum = new decimal(new int[] {
200,
0,
0,
0});
- this.nudSize.Minimum = new decimal(new int[] {
+ this.nudSize.Minimum = new decimal(new int[] {
1,
0,
0,
0});
- this.nudSize.Name = "nudSize";
- this.nudSize.Size = new System.Drawing.Size(59, 20);
- this.nudSize.TabIndex = 4;
- this.nudSize.Value = new decimal(new int[] {
+ this.nudSize.Name = "nudSize";
+ this.nudSize.Size = new System.Drawing.Size(59, 20);
+ this.nudSize.TabIndex = 4;
+ this.nudSize.Value = new decimal(new int[] {
140,
0,
0,
65536});
- this.nudSize.ValueChanged += new System.EventHandler(this.nudSize_ValueChanged);
- //
- // label3
- //
- this.label3.AutoSize = true;
- this.label3.Location = new System.Drawing.Point(22, 56);
- this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(51, 13);
- this.label3.TabIndex = 5;
- this.label3.Text = "Font Size";
- //
- // chkBold
- //
- this.chkBold.AutoSize = true;
- this.chkBold.Location = new System.Drawing.Point(48, 80);
- this.chkBold.Name = "chkBold";
- this.chkBold.Size = new System.Drawing.Size(47, 17);
- this.chkBold.TabIndex = 6;
- this.chkBold.Text = "Bold";
- this.chkBold.UseVisualStyleBackColor = true;
- this.chkBold.CheckedChanged += new System.EventHandler(this.chkBold_CheckedChanged);
- //
- // chkItalic
- //
- this.chkItalic.AutoSize = true;
- this.chkItalic.Location = new System.Drawing.Point(48, 103);
- this.chkItalic.Name = "chkItalic";
- this.chkItalic.Size = new System.Drawing.Size(48, 17);
- this.chkItalic.TabIndex = 7;
- this.chkItalic.Text = "Italic";
- this.chkItalic.UseVisualStyleBackColor = true;
- this.chkItalic.CheckedChanged += new System.EventHandler(this.chkItalic_CheckedChanged);
- //
- // chkUnderline
- //
- this.chkUnderline.AutoSize = true;
- this.chkUnderline.Location = new System.Drawing.Point(113, 80);
- this.chkUnderline.Name = "chkUnderline";
- this.chkUnderline.Size = new System.Drawing.Size(71, 17);
- this.chkUnderline.TabIndex = 8;
- this.chkUnderline.Text = "Underline";
- this.chkUnderline.UseVisualStyleBackColor = true;
- this.chkUnderline.CheckedChanged += new System.EventHandler(this.chkUnderline_CheckedChanged);
- //
- // chkStrikeout
- //
- this.chkStrikeout.AutoSize = true;
- this.chkStrikeout.Location = new System.Drawing.Point(113, 103);
- this.chkStrikeout.Name = "chkStrikeout";
- this.chkStrikeout.Size = new System.Drawing.Size(68, 17);
- this.chkStrikeout.TabIndex = 9;
- this.chkStrikeout.Text = "Strikeout";
- this.chkStrikeout.UseVisualStyleBackColor = true;
- this.chkStrikeout.CheckedChanged += new System.EventHandler(this.chkStrikeout_CheckedChanged);
- //
- // txtSampleText
- //
- this.txtSampleText.Location = new System.Drawing.Point(80, 19);
- this.txtSampleText.Multiline = true;
- this.txtSampleText.Name = "txtSampleText";
- this.txtSampleText.ScrollBars = System.Windows.Forms.ScrollBars.Both;
- this.txtSampleText.Size = new System.Drawing.Size(216, 69);
- this.txtSampleText.TabIndex = 10;
- this.txtSampleText.Text = "abcdefghijklmnopqrstuvwxyz\r\nABCDEFGHIJKLMNOPQRSTUVWXYZ\r\n01234567890\r\n!@#$%^&*(),<" +
- ".>/?;:\'\"-_=+\\|";
- this.txtSampleText.TextChanged += new System.EventHandler(this.txtSampleText_TextChanged);
- //
- // splitContainer1
- //
- this.splitContainer1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.splitContainer1.Location = new System.Drawing.Point(3, 225);
- this.splitContainer1.Name = "splitContainer1";
- //
- // splitContainer1.Panel1
- //
- this.splitContainer1.Panel1.Controls.Add(this.renderTarget);
- //
- // splitContainer1.Panel2
- //
- this.splitContainer1.Panel2.Controls.Add(this.zoomRenderTarget);
- this.splitContainer1.Size = new System.Drawing.Size(570, 131);
- this.splitContainer1.SplitterDistance = 211;
- this.splitContainer1.SplitterWidth = 8;
- this.splitContainer1.TabIndex = 11;
- //
- // renderTarget
- //
- this.renderTarget.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
- this.renderTarget.Dock = System.Windows.Forms.DockStyle.Fill;
- this.renderTarget.Location = new System.Drawing.Point(0, 0);
- this.renderTarget.Name = "renderTarget";
- this.renderTarget.Size = new System.Drawing.Size(211, 131);
- this.renderTarget.TabIndex = 0;
- this.renderTarget.Resize += new System.EventHandler(this.renderTarget_Resize);
- //
- // zoomRenderTarget
- //
- this.zoomRenderTarget.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
- this.zoomRenderTarget.Dock = System.Windows.Forms.DockStyle.Fill;
- this.zoomRenderTarget.Location = new System.Drawing.Point(0, 0);
- this.zoomRenderTarget.Name = "zoomRenderTarget";
- this.zoomRenderTarget.Size = new System.Drawing.Size(351, 131);
- this.zoomRenderTarget.TabIndex = 1;
- this.zoomRenderTarget.Resize += new System.EventHandler(this.renderTarget_Resize);
- //
- // groupBox1
- //
- this.groupBox1.Controls.Add(this.nudOpacity);
- this.groupBox1.Controls.Add(this.label6);
- this.groupBox1.Controls.Add(this.chkBorder);
- this.groupBox1.Controls.Add(this.btnBorderColor);
- this.groupBox1.Controls.Add(this.cboEdges);
- this.groupBox1.Controls.Add(this.label4);
- this.groupBox1.Controls.Add(this.chkTextRenderer);
- this.groupBox1.Controls.Add(this.label2);
- this.groupBox1.Controls.Add(this.cboFamily);
- this.groupBox1.Controls.Add(this.nudSize);
- this.groupBox1.Controls.Add(this.chkStrikeout);
- this.groupBox1.Controls.Add(this.chkItalic);
- this.groupBox1.Controls.Add(this.label3);
- this.groupBox1.Controls.Add(this.chkUnderline);
- this.groupBox1.Controls.Add(this.chkBold);
- this.groupBox1.Location = new System.Drawing.Point(3, 3);
- this.groupBox1.Name = "groupBox1";
- this.groupBox1.Size = new System.Drawing.Size(235, 216);
- this.groupBox1.TabIndex = 12;
- this.groupBox1.TabStop = false;
- this.groupBox1.Text = "Font Creation Options";
- //
- // nudOpacity
- //
- this.nudOpacity.Location = new System.Drawing.Point(150, 189);
- this.nudOpacity.Maximum = new decimal(new int[] {
+ this.nudSize.ValueChanged += new System.EventHandler(this.nudSize_ValueChanged);
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Location = new System.Drawing.Point(22, 51);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(51, 13);
+ this.label3.TabIndex = 5;
+ this.label3.Text = "Font Size";
+ //
+ // chkBold
+ //
+ this.chkBold.AutoSize = true;
+ this.chkBold.Location = new System.Drawing.Point(48, 75);
+ this.chkBold.Name = "chkBold";
+ this.chkBold.Size = new System.Drawing.Size(47, 17);
+ this.chkBold.TabIndex = 6;
+ this.chkBold.Text = "Bold";
+ this.chkBold.UseVisualStyleBackColor = true;
+ this.chkBold.CheckedChanged += new System.EventHandler(this.chkBold_CheckedChanged);
+ //
+ // chkItalic
+ //
+ this.chkItalic.AutoSize = true;
+ this.chkItalic.Location = new System.Drawing.Point(190, 75);
+ this.chkItalic.Name = "chkItalic";
+ this.chkItalic.Size = new System.Drawing.Size(48, 17);
+ this.chkItalic.TabIndex = 7;
+ this.chkItalic.Text = "Italic";
+ this.chkItalic.UseVisualStyleBackColor = true;
+ this.chkItalic.CheckedChanged += new System.EventHandler(this.chkItalic_CheckedChanged);
+ //
+ // chkUnderline
+ //
+ this.chkUnderline.AutoSize = true;
+ this.chkUnderline.Location = new System.Drawing.Point(113, 75);
+ this.chkUnderline.Name = "chkUnderline";
+ this.chkUnderline.Size = new System.Drawing.Size(71, 17);
+ this.chkUnderline.TabIndex = 8;
+ this.chkUnderline.Text = "Underline";
+ this.chkUnderline.UseVisualStyleBackColor = true;
+ this.chkUnderline.CheckedChanged += new System.EventHandler(this.chkUnderline_CheckedChanged);
+ //
+ // chkStrikeout
+ //
+ this.chkStrikeout.AutoSize = true;
+ this.chkStrikeout.Location = new System.Drawing.Point(170, 51);
+ this.chkStrikeout.Name = "chkStrikeout";
+ this.chkStrikeout.Size = new System.Drawing.Size(68, 17);
+ this.chkStrikeout.TabIndex = 9;
+ this.chkStrikeout.Text = "Strikeout";
+ this.chkStrikeout.UseVisualStyleBackColor = true;
+ this.chkStrikeout.CheckedChanged += new System.EventHandler(this.chkStrikeout_CheckedChanged);
+ //
+ // txtSampleText
+ //
+ this.txtSampleText.Location = new System.Drawing.Point(80, 19);
+ this.txtSampleText.Multiline = true;
+ this.txtSampleText.Name = "txtSampleText";
+ this.txtSampleText.ScrollBars = System.Windows.Forms.ScrollBars.Both;
+ this.txtSampleText.Size = new System.Drawing.Size(186, 69);
+ this.txtSampleText.TabIndex = 10;
+ this.txtSampleText.Text = "abcdefghijklmnopqrstuvwxyz\r\nABCDEFGHIJKLMNOPQRSTUVWXYZ\r\n01234567890\r\n!@#$%^&*(),<" +
+ ".>/?;:\'\"-_=+\\|";
+ this.txtSampleText.TextChanged += new System.EventHandler(this.txtSampleText_TextChanged);
+ //
+ // splitContainer1
+ //
+ this.splitContainer1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.splitContainer1.Location = new System.Drawing.Point(3, 225);
+ this.splitContainer1.Name = "splitContainer1";
+ //
+ // splitContainer1.Panel1
+ //
+ this.splitContainer1.Panel1.Controls.Add(this.renderTarget);
+ //
+ // splitContainer1.Panel2
+ //
+ this.splitContainer1.Panel2.Controls.Add(this.zoomRenderTarget);
+ this.splitContainer1.Size = new System.Drawing.Size(564, 170);
+ this.splitContainer1.SplitterDistance = 208;
+ this.splitContainer1.SplitterWidth = 8;
+ this.splitContainer1.TabIndex = 11;
+ //
+ // groupBox1
+ //
+ this.groupBox1.Controls.Add(this.label10);
+ this.groupBox1.Controls.Add(this.nudBottomMargin);
+ this.groupBox1.Controls.Add(this.nudTopMargin);
+ this.groupBox1.Controls.Add(this.label9);
+ this.groupBox1.Controls.Add(this.nudOpacity);
+ this.groupBox1.Controls.Add(this.label6);
+ this.groupBox1.Controls.Add(this.chkBorder);
+ this.groupBox1.Controls.Add(this.btnBorderColor);
+ this.groupBox1.Controls.Add(this.cboEdges);
+ this.groupBox1.Controls.Add(this.label4);
+ this.groupBox1.Controls.Add(this.chkTextRenderer);
+ this.groupBox1.Controls.Add(this.label2);
+ this.groupBox1.Controls.Add(this.cboFamily);
+ this.groupBox1.Controls.Add(this.nudSize);
+ this.groupBox1.Controls.Add(this.chkStrikeout);
+ this.groupBox1.Controls.Add(this.chkItalic);
+ this.groupBox1.Controls.Add(this.label3);
+ this.groupBox1.Controls.Add(this.chkUnderline);
+ this.groupBox1.Controls.Add(this.chkBold);
+ this.groupBox1.Location = new System.Drawing.Point(3, 3);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Size = new System.Drawing.Size(265, 216);
+ this.groupBox1.TabIndex = 12;
+ this.groupBox1.TabStop = false;
+ this.groupBox1.Text = "Font Creation Options";
+ //
+ // nudOpacity
+ //
+ this.nudOpacity.Location = new System.Drawing.Point(150, 139);
+ this.nudOpacity.Maximum = new decimal(new int[] {
255,
0,
0,
0});
- this.nudOpacity.Name = "nudOpacity";
- this.nudOpacity.Size = new System.Drawing.Size(54, 20);
- this.nudOpacity.TabIndex = 17;
- this.nudOpacity.Value = new decimal(new int[] {
+ this.nudOpacity.Name = "nudOpacity";
+ this.nudOpacity.Size = new System.Drawing.Size(54, 20);
+ this.nudOpacity.TabIndex = 17;
+ this.nudOpacity.Value = new decimal(new int[] {
128,
0,
0,
0});
- this.nudOpacity.ValueChanged += new System.EventHandler(this.nudOpacity_ValueChanged);
- //
- // label6
- //
- this.label6.AutoSize = true;
- this.label6.Location = new System.Drawing.Point(147, 173);
- this.label6.Name = "label6";
- this.label6.Size = new System.Drawing.Size(80, 13);
- this.label6.TabIndex = 16;
- this.label6.Text = "Border Opacity:";
- //
- // chkBorder
- //
- this.chkBorder.AutoSize = true;
- this.chkBorder.Location = new System.Drawing.Point(9, 180);
- this.chkBorder.Name = "chkBorder";
- this.chkBorder.Size = new System.Drawing.Size(91, 17);
- this.chkBorder.TabIndex = 15;
- this.chkBorder.Text = "Create Border";
- this.chkBorder.UseVisualStyleBackColor = true;
- this.chkBorder.CheckedChanged += new System.EventHandler(this.chkBorder_CheckedChanged);
- //
- // btnBorderColor
- //
- this.btnBorderColor.BackColor = System.Drawing.Color.Black;
- this.btnBorderColor.Location = new System.Drawing.Point(106, 176);
- this.btnBorderColor.Name = "btnBorderColor";
- this.btnBorderColor.Size = new System.Drawing.Size(32, 23);
- this.btnBorderColor.TabIndex = 14;
- this.btnBorderColor.UseVisualStyleBackColor = false;
- this.btnBorderColor.Click += new System.EventHandler(this.btnBorderColor_Click);
- //
- // cboEdges
- //
- this.cboEdges.DropDownHeight = 210;
- this.cboEdges.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.cboEdges.DropDownWidth = 300;
- this.cboEdges.FormattingEnabled = true;
- this.cboEdges.IntegralHeight = false;
- this.cboEdges.Location = new System.Drawing.Point(79, 149);
- this.cboEdges.Name = "cboEdges";
- this.cboEdges.Size = new System.Drawing.Size(145, 21);
- this.cboEdges.TabIndex = 12;
- this.cboEdges.SelectedIndexChanged += new System.EventHandler(this.cboEdges_SelectedIndexChanged);
- //
- // label4
- //
- this.label4.AutoSize = true;
- this.label4.Location = new System.Drawing.Point(6, 152);
- this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(67, 13);
- this.label4.TabIndex = 11;
- this.label4.Text = "Glyph Edges";
- //
- // chkTextRenderer
- //
- this.chkTextRenderer.AutoSize = true;
- this.chkTextRenderer.Checked = true;
- this.chkTextRenderer.CheckState = System.Windows.Forms.CheckState.Checked;
- this.chkTextRenderer.Location = new System.Drawing.Point(9, 126);
- this.chkTextRenderer.Name = "chkTextRenderer";
- this.chkTextRenderer.Size = new System.Drawing.Size(207, 17);
- this.chkTextRenderer.TabIndex = 10;
- this.chkTextRenderer.Text = "Use TextRenderer instead of Graphics";
- this.chkTextRenderer.UseVisualStyleBackColor = true;
- this.chkTextRenderer.CheckedChanged += new System.EventHandler(this.chkTextRenderer_CheckedChanged);
- //
- // nudScale
- //
- this.nudScale.DecimalPlaces = 1;
- this.nudScale.Location = new System.Drawing.Point(80, 123);
- this.nudScale.Maximum = new decimal(new int[] {
+ this.nudOpacity.ValueChanged += new System.EventHandler(this.nudOpacity_ValueChanged);
+ //
+ // label6
+ //
+ this.label6.AutoSize = true;
+ this.label6.Location = new System.Drawing.Point(147, 123);
+ this.label6.Name = "label6";
+ this.label6.Size = new System.Drawing.Size(80, 13);
+ this.label6.TabIndex = 16;
+ this.label6.Text = "Border Opacity:";
+ //
+ // chkBorder
+ //
+ this.chkBorder.AutoSize = true;
+ this.chkBorder.Location = new System.Drawing.Point(12, 130);
+ this.chkBorder.Name = "chkBorder";
+ this.chkBorder.Size = new System.Drawing.Size(91, 17);
+ this.chkBorder.TabIndex = 15;
+ this.chkBorder.Text = "Create Border";
+ this.chkBorder.UseVisualStyleBackColor = true;
+ this.chkBorder.CheckedChanged += new System.EventHandler(this.chkBorder_CheckedChanged);
+ //
+ // btnBorderColor
+ //
+ this.btnBorderColor.BackColor = System.Drawing.Color.Black;
+ this.btnBorderColor.Location = new System.Drawing.Point(106, 126);
+ this.btnBorderColor.Name = "btnBorderColor";
+ this.btnBorderColor.Size = new System.Drawing.Size(32, 23);
+ this.btnBorderColor.TabIndex = 14;
+ this.btnBorderColor.UseVisualStyleBackColor = false;
+ this.btnBorderColor.Click += new System.EventHandler(this.btnBorderColor_Click);
+ //
+ // cboEdges
+ //
+ this.cboEdges.DropDownHeight = 210;
+ this.cboEdges.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.cboEdges.DropDownWidth = 300;
+ this.cboEdges.FormattingEnabled = true;
+ this.cboEdges.IntegralHeight = false;
+ this.cboEdges.Location = new System.Drawi...
[truncated message content] |
|
From: <ka...@us...> - 2009-04-25 21:46:43
|
Revision: 917
http://agate.svn.sourceforge.net/agate/?rev=917&view=rev
Author: kanato
Date: 2009-04-25 21:46:26 +0000 (Sat, 25 Apr 2009)
Log Message:
-----------
Integrate font branch for new text layout engine.
Modified Paths:
--------------
trunk/AgateLib/BitmapFont/BitmapFontImpl.cs
trunk/AgateLib/DisplayLib/Cache/FontStateCache.cs
trunk/AgateLib/DisplayLib/Cache/SurfaceStateCache.cs
trunk/AgateLib/DisplayLib/FontSurface.cs
trunk/AgateLib/DisplayLib/ISurface.cs
trunk/AgateLib/DisplayLib/OriginAlignment.cs
trunk/AgateLib/DisplayLib/Surface.cs
trunk/AgateLib/Drivers/IDesktopDriver.cs
trunk/AgateLib/Drivers/NullInputImpl.cs
trunk/AgateLib/Geometry/Rectangle.cs
trunk/AgateLib/ImplementationBase/FontSurfaceImpl.cs
trunk/AgateLib/ImplementationBase/SurfaceImpl.cs
trunk/AgateLib/Sprites/IFrameList.cs
trunk/AgateLib/Sprites/Sprite.cs
trunk/AgateLib/Sprites/SpriteFrame.cs
trunk/Drivers/AgateDrawing/Drawing_FontSurface.cs
trunk/Drivers/AgateDrawing/Drawing_Surface.cs
trunk/Drivers/AgateMDX/MDX1_FontSurface.cs
trunk/Drivers/AgateMDX/MDX1_Surface.cs
trunk/Drivers/AgateOTK/GL_Surface.cs
Added Paths:
-----------
trunk/AgateLib/DisplayLib/Cache/
trunk/AgateLib/DisplayLib/FontState.cs
trunk/AgateLib/DisplayLib/SurfaceState.cs
trunk/AgateLib/DisplayLib/TextLayout.cs
trunk/Tests/Fonts/TextLayout.cs
Property Changed:
----------------
trunk/
trunk/AgateLib/
trunk/AgateLib/AgateFileProvider.cs
trunk/AgateLib/AgateSetup.cs
trunk/AgateLib/AudioLib/
trunk/AgateLib/AudioLib/Audio.cs
trunk/AgateLib/BitmapFont/FontMetrics.cs
trunk/AgateLib/BitmapFont/GlyphMetrics.cs
trunk/AgateLib/Core.cs
trunk/AgateLib/DisplayLib/
trunk/AgateLib/DisplayLib/Display.cs
trunk/AgateLib/DisplayLib/StringTransformer.cs
trunk/AgateLib/Drivers/AgateDriverReporter.cs
trunk/AgateLib/Drivers/IDesktopDriver.cs
trunk/AgateLib/ImplementationBase/
trunk/AgateLib/ImplementationBase/AudioImpl.cs
trunk/AgateLib/InputLib/
trunk/AgateLib/Resources/AgateResourceCollection.cs
trunk/AgateLib/Resources/AgateResourceLoader.cs
trunk/AgateLib/Resources/BitmapFontResource.cs
trunk/AgateLib/Sprites/Sprite.cs
trunk/AgateLib/Sprites/SpriteFrame.cs
trunk/AgateLib/Timing.cs
trunk/AgateLib/Utility/Platform.cs
trunk/Build/monodevelop.sh
trunk/Drivers/
trunk/Drivers/AgateDrawing/Drawing_Reporter.cs
trunk/Drivers/AgateLib.WinForms/
trunk/Drivers/AgateSDL/
trunk/Drivers/AgateSDL/Audio/SDL_Audio.cs
trunk/Drivers/AgateSDL/Audio/SDL_Music.cs
trunk/Drivers/AgateSDL/Audio/SDL_SoundBuffer.cs
trunk/Drivers/AgateSDL/Audio/SDL_SoundBufferSession.cs
trunk/Drivers/AgateSDL/Input/SDL_Input.cs
trunk/Drivers/AgateSDL/Reporter.cs
trunk/Examples/BallBuster.Net/OpenTK.dll.config
trunk/Tools/FontCreator/CreateFont.Designer.cs
trunk/Tools/FontCreator/CreateFont.cs
trunk/Tools/FontCreator/CreateFont.resx
trunk/Tools/FontCreator/EditGlyphs.Designer.cs
trunk/Tools/FontCreator/EditGlyphs.cs
trunk/Tools/FontCreator/EditGlyphs.resx
trunk/Tools/FontCreator/SaveFont.Designer.cs
trunk/Tools/FontCreator/SaveFont.cs
trunk/Tools/FontCreator/SaveFont.resx
trunk/Tools/FontCreator/frmFontCreator.Designer.cs
trunk/Tools/FontCreator/frmFontCreator.cs
trunk/Tools/FontCreator/frmFontCreator.resx
trunk/Tools/PackedSpriteCreator/SpriteEditor.Designer.cs
trunk/Tools/PackedSpriteCreator/SpriteEditor.cs
trunk/Tools/PackedSpriteCreator/SpriteEditor.resx
trunk/Tools/PackedSpriteCreator/SpritePacker.cs
Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate-3d:659
/branches/build:424-517
/branches/merge-tests:806-810
/branches/registrar:595-599
/branches/sprites:463-513
+ /branches/agate-3d:659
/branches/build:424-517
/branches/font:778-916
/branches/merge-tests:806-810
/branches/registrar:595-599
/branches/sprites:463-513
Property changes on: trunk/AgateLib
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate-3d/AgateLib:659
/branches/build/AgateLib:447-517
/branches/merge-tests/AgateLib:806-810
/branches/registrar/AgateLib:595-599
/branches/sprites/AgateLib:463-513
+ /branches/agate-3d/AgateLib:659
/branches/build/AgateLib:447-517
/branches/font/AgateLib:778-916
/branches/merge-tests/AgateLib:806-810
/branches/registrar/AgateLib:595-599
/branches/sprites/AgateLib:463-513
Property changes on: trunk/AgateLib/AgateFileProvider.cs
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/build/AgateLib/Utility/AgateFileProvider.cs:447-517
/branches/merge-tests/AgateLib/AgateFileProvider.cs:806-810
/branches/registrar/AgateLib/Utility/AgateFileProvider.cs:595-599
/branches/sprites/AgateLib/Utility/AgateFileProvider.cs:463-513
+ /branches/build/AgateLib/Utility/AgateFileProvider.cs:447-517
/branches/font/AgateLib/AgateFileProvider.cs:778-916
/branches/merge-tests/AgateLib/AgateFileProvider.cs:806-810
/branches/registrar/AgateLib/Utility/AgateFileProvider.cs:595-599
/branches/sprites/AgateLib/Utility/AgateFileProvider.cs:463-513
Property changes on: trunk/AgateLib/AgateSetup.cs
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate-3d/AgateLib/AgateSetup.cs:659
/branches/build/AgateLib/AgateSetup.cs:501-517
/branches/merge-tests/AgateLib/AgateSetup.cs:806-810
/branches/registrar/AgateLib/AgateSetup.cs:595-599
/branches/sprites/AgateLib/AgateSetup.cs:463-513
+ /branches/agate-3d/AgateLib/AgateSetup.cs:659
/branches/build/AgateLib/AgateSetup.cs:501-517
/branches/font/AgateLib/AgateSetup.cs:778-916
/branches/merge-tests/AgateLib/AgateSetup.cs:806-810
/branches/registrar/AgateLib/AgateSetup.cs:595-599
/branches/sprites/AgateLib/AgateSetup.cs:463-513
Property changes on: trunk/AgateLib/AudioLib
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate-3d/AgateLib/AudioLib:659
/branches/merge-tests/AgateLib/AudioLib:806-810
/branches/registrar/AgateLib/AudioLib:595-599
/branches/sprites/AgateLib/AudioLib:463-513
+ /branches/agate-3d/AgateLib/AudioLib:659
/branches/font/AgateLib/AudioLib:778-916
/branches/merge-tests/AgateLib/AudioLib:806-810
/branches/registrar/AgateLib/AudioLib:595-599
/branches/sprites/AgateLib/AudioLib:463-513
Property changes on: trunk/AgateLib/AudioLib/Audio.cs
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate-3d/AgateLib/AudioLib/Audio.cs:659
/branches/build/AgateLib/AudioLib/Audio.cs:501-517
/branches/merge-tests/AgateLib/AudioLib/Audio.cs:806-810
/branches/registrar/AgateLib/AudioLib/Audio.cs:595-599
/branches/sprites/AgateLib/AudioLib/Audio.cs:463-513
+ /branches/agate-3d/AgateLib/AudioLib/Audio.cs:659
/branches/build/AgateLib/AudioLib/Audio.cs:501-517
/branches/font/AgateLib/AudioLib/Audio.cs:778-916
/branches/merge-tests/AgateLib/AudioLib/Audio.cs:806-810
/branches/registrar/AgateLib/AudioLib/Audio.cs:595-599
/branches/sprites/AgateLib/AudioLib/Audio.cs:463-513
Modified: trunk/AgateLib/BitmapFont/BitmapFontImpl.cs
===================================================================
--- trunk/AgateLib/BitmapFont/BitmapFontImpl.cs 2009-04-25 19:58:56 UTC (rev 916)
+++ trunk/AgateLib/BitmapFont/BitmapFontImpl.cs 2009-04-25 21:46:26 UTC (rev 917)
@@ -20,10 +20,12 @@
using System.Collections.Generic;
using System.Text;
using System.Xml;
+
using AgateLib.DisplayLib;
using AgateLib.Geometry;
using AgateLib.ImplementationBase;
using AgateLib.Resources;
+using AgateLib.DisplayLib.Cache;
namespace AgateLib.BitmapFont
{
@@ -36,12 +38,46 @@
public class BitmapFontImpl : FontSurfaceImpl
{
Surface mSurface;
-
FontMetrics mFontMetrics;
int mCharHeight;
double mAverageCharWidth;
+ #region --- Cache Class ---
+
+ class BitmapFontCache : FontStateCache
+ {
+ public bool NeedsRefresh = true;
+ public RectangleF[] SrcRects;
+ public RectangleF[] DestRects;
+ public int DisplayTextLength;
+
+ protected internal override FontStateCache Clone()
+ {
+ BitmapFontCache cache = new BitmapFontCache();
+
+ cache.SrcRects = (RectangleF[])SrcRects.Clone();
+ cache.DestRects = (RectangleF[])DestRects.Clone();
+
+ return cache;
+ }
+
+ protected internal override void OnTextChanged(FontState fontState)
+ {
+ NeedsRefresh = true;
+ }
+ protected internal override void OnDisplayAlignmentChanged(FontState fontState)
+ {
+ NeedsRefresh = true;
+ }
+ protected internal override void OnLocationChanged(FontState fontState)
+ {
+ NeedsRefresh = true;
+ }
+ }
+
+ #endregion
+
/// <summary>
/// Constructs a BitmapFontImpl, assuming the characters in the given file
/// are all the same size, and are in their ASCII order.
@@ -81,15 +117,6 @@
}
/// <summary>
- /// Gets or sets the interpolation hint for the underlying surface.
- /// </summary>
- public InterpolationMode InterpolationHint
- {
- get { return mSurface.InterpolationHint; }
- set { mSurface.InterpolationHint = value; }
- }
-
- /// <summary>
/// Disposes of the object.
/// </summary>
public override void Dispose()
@@ -152,37 +179,18 @@
mAverageCharWidth = total / (double)count;
}
- /// <summary>
- /// Overrides the base Color method to catch color changes to set them on the surface.
- /// </summary>
- public override Color Color
+ public override Size StringDisplaySize(FontState state, string text)
{
- get
- {
- return base.Color;
- }
- set
- {
- base.Color = value;
-
- mSurface.Color = value;
- }
- }
- /// <summary>
- /// Measures the width of the text.
- /// </summary>
- /// <param name="text"></param>
- /// <returns></returns>
- public override int StringDisplayWidth(string text)
- {
if (string.IsNullOrEmpty(text))
- return 0;
+ return Size.Empty;
+ int CRcount = 0;
+ int i = 0;
double highestLineWidth = 0;
+ // measure width
string[] lines = text.Split('\n');
-
- for (int i = 0; i < lines.Length; i++)
+ for (i = 0; i < lines.Length; i++)
{
string line = lines[i];
double lineWidth = 0;
@@ -194,24 +202,10 @@
if (lineWidth > highestLineWidth)
highestLineWidth = lineWidth;
-
}
- return (int)Math.Ceiling(highestLineWidth * ScaleWidth);
- }
- /// <summary>
- /// Measures the height of the text
- /// </summary>
- /// <param name="text"></param>
- /// <returns></returns>
- public override int StringDisplayHeight(string text)
- {
- if (string.IsNullOrEmpty(text))
- return 0;
-
- int CRcount = 0;
- int i = 0;
-
+ // measure height
+ i = 0;
do
{
i = text.IndexOf('\n', i + 1);
@@ -226,17 +220,9 @@
if (text[text.Length - 1] == '\n')
CRcount--;
- return (int)(mCharHeight * (CRcount + 1) * ScaleHeight);
+ return new Size((int)Math.Ceiling(highestLineWidth * state.ScaleWidth),
+ (int)(mCharHeight * (CRcount + 1) * state.ScaleHeight));
}
- /// <summary>
- /// Measures the size of the text.
- /// </summary>
- /// <param name="text"></param>
- /// <returns></returns>
- public override Size StringDisplaySize(string text)
- {
- return new Size(StringDisplayWidth(text), StringDisplayHeight(text));
- }
/// <summary>
/// Returns the height of characters in the font.
@@ -246,7 +232,8 @@
get { return mCharHeight; }
}
- private void GetRects(string text, RectangleF[] srcRects, RectangleF[] destRects, out int rectCount)
+ private void GetRects(RectangleF[] srcRects, RectangleF[] destRects, out int rectCount,
+ string text, double ScaleHeight, double ScaleWidth)
{
double destX = 0;
double destY = 0;
@@ -271,7 +258,7 @@
case '\n':
destX = 0;
- destY += height * this.ScaleHeight;
+ destY += height * ScaleHeight;
break;
default:
@@ -295,89 +282,71 @@
}
}
- RectangleF[] cacheSrcRects;
- RectangleF[] cacheDestRects;
-
- /// <summary>
- /// Draws the text to the screen.
- /// </summary>
- /// <param name="destX"></param>
- /// <param name="destY"></param>
- /// <param name="text"></param>
- public override void DrawText(int destX, int destY, string text)
+ private static BitmapFontCache GetCache(FontState state)
{
- if (string.IsNullOrEmpty(text))
- return;
+ BitmapFontCache cache = state.Cache as BitmapFontCache;
- if (cacheSrcRects == null || text.Length > cacheSrcRects.Length)
+ if (cache == null)
{
- cacheSrcRects = new RectangleF[text.Length];
- cacheDestRects = new RectangleF[text.Length];
+ cache = new BitmapFontCache();
+ state.Cache = cache;
}
- RectangleF[] srcRects = cacheSrcRects;
- RectangleF[] destRects = cacheDestRects;
-
- DrawTextImpl(destX, destY, text, srcRects, destRects);
- }
-
- private void DrawTextImpl(int destX, int destY, string text,
- RectangleF[] srcRects, RectangleF[] destRects)
- {
- // this variable counts the number of rectangles actually used to display text.
- // It may be less then text.Length because carriage return characters
- // don't need any rects.
- int displayTextLength;
- GetRects(text, srcRects, destRects, out displayTextLength);
-
- if (DisplayAlignment != OriginAlignment.TopLeft)
+ if (cache.SrcRects == null ||
+ cache.SrcRects.Length < state.Text.Length)
{
- Point value = Origin.Calc(DisplayAlignment, StringDisplaySize(text));
-
- destX -= value.X;
- destY -= value.Y;
+ cache.SrcRects = new RectangleF[state.Text.Length];
+ cache.DestRects = new RectangleF[state.Text.Length];
}
- for (int i = 0; i < displayTextLength; i++)
- {
- destRects[i].X += destX;
- destRects[i].Y += destY;
- }
-
- mSurface.DrawRects(srcRects, destRects, 0, displayTextLength);
+ return cache;
}
/// <summary>
/// Draws the text to the screen.
/// </summary>
- /// <param name="destX"></param>
- /// <param name="destY"></param>
- /// <param name="text"></param>
- public override void DrawText(double destX, double destY, string text)
+ /// <param name="state"></param>
+ public override void DrawText(FontState state)
{
- DrawText((int)destX, (int)destY, text);
- }
+ BitmapFontCache cache = GetCache(state);
- /// <summary>
- /// Draws the text to the screen.
- /// </summary>
- /// <param name="destPt"></param>
- /// <param name="text"></param>
- public override void DrawText(Point destPt, string text)
- {
- DrawText(destPt.X, destPt.Y, text);
+ RefreshCache(state, cache);
+
+ mSurface.Color = state.Color;
+ mSurface.DrawRects(cache.SrcRects, cache.DestRects, 0, cache.DisplayTextLength);
}
- /// <summary>
- /// Draws the text to the screen.
- /// </summary>
- /// <param name="destPt"></param>
- /// <param name="text"></param>
- public override void DrawText(PointF destPt, string text)
+ private void RefreshCache(FontState state, BitmapFontCache cache)
{
- DrawText(destPt.X, destPt.Y, text);
- }
+ if (cache.NeedsRefresh)
+ {
+ // this variable counts the number of rectangles actually used to display text.
+ // It may be less then text.Length because carriage return characters
+ // don't need any rects.
+ GetRects(cache.SrcRects, cache.DestRects, out cache.DisplayTextLength,
+ state.Text, state.ScaleHeight, state.ScaleWidth);
+
+ PointF dest = state.Location;
+
+ if (state.DisplayAlignment != OriginAlignment.TopLeft)
+ {
+ Point value = Origin.Calc(state.DisplayAlignment,
+ StringDisplaySize(state, state.Text));
+
+ dest.X -= value.X;
+ dest.Y -= value.Y;
+ }
+
+ for (int i = 0; i < cache.DisplayTextLength; i++)
+ {
+ cache.DestRects[i].X += dest.X;
+ cache.DestRects[i].Y += dest.Y;
+ }
+
+ cache.NeedsRefresh = false;
+ }
+ }
}
/// <summary>
Property changes on: trunk/AgateLib/BitmapFont/FontMetrics.cs
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate-3d/AgateLib/BitmapFont/FontMetrics.cs:659
/branches/merge-tests/AgateLib/BitmapFont/FontMetrics.cs:806-810
+ /branches/agate-3d/AgateLib/BitmapFont/FontMetrics.cs:659
/branches/font/AgateLib/BitmapFont/FontMetrics.cs:778-916
/branches/merge-tests/AgateLib/BitmapFont/FontMetrics.cs:806-810
Property changes on: trunk/AgateLib/BitmapFont/GlyphMetrics.cs
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate-3d/AgateLib/BitmapFont/GlyphMetrics.cs:659
/branches/build/AgateLib/Resources/GlyphMetrics.cs:447-517
/branches/merge-tests/AgateLib/BitmapFont/GlyphMetrics.cs:806-810
/branches/registrar/AgateLib/Resources/GlyphMetrics.cs:595-599
/branches/sprites/AgateLib/Resources/GlyphMetrics.cs:463-513
+ /branches/agate-3d/AgateLib/BitmapFont/GlyphMetrics.cs:659
/branches/build/AgateLib/Resources/GlyphMetrics.cs:447-517
/branches/font/AgateLib/BitmapFont/GlyphMetrics.cs:778-916
/branches/merge-tests/AgateLib/BitmapFont/GlyphMetrics.cs:806-810
/branches/registrar/AgateLib/Resources/GlyphMetrics.cs:595-599
/branches/sprites/AgateLib/Resources/GlyphMetrics.cs:463-513
Property changes on: trunk/AgateLib/Core.cs
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate-3d/AgateLib/Core.cs:659
/branches/build/AgateLib/Core.cs:501-517
/branches/merge-tests/AgateLib/Core.cs:806-810
/branches/registrar/AgateLib/Core.cs:595-599
/branches/sprites/AgateLib/Core.cs:463-513
+ /branches/agate-3d/AgateLib/Core.cs:659
/branches/build/AgateLib/Core.cs:501-517
/branches/font/AgateLib/Core.cs:778-916
/branches/merge-tests/AgateLib/Core.cs:806-810
/branches/registrar/AgateLib/Core.cs:595-599
/branches/sprites/AgateLib/Core.cs:463-513
Property changes on: trunk/AgateLib/DisplayLib
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate-3d/AgateLib/DisplayLib:659
/branches/merge-tests/AgateLib/DisplayLib:806-810
/branches/registrar/AgateLib/DisplayLib:595-599
/branches/sprites/AgateLib/DisplayLib:463-513
+ /branches/agate-3d/AgateLib/DisplayLib:659
/branches/font/AgateLib/DisplayLib:778-916
/branches/merge-tests/AgateLib/DisplayLib:806-810
/branches/registrar/AgateLib/DisplayLib:595-599
/branches/sprites/AgateLib/DisplayLib:463-513
Property changes on: trunk/AgateLib/DisplayLib/Display.cs
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate-3d/AgateLib/DisplayLib/Display.cs:659
/branches/build/AgateLib/DisplayLib/Display.cs:501-517
/branches/merge-tests/AgateLib/DisplayLib/Display.cs:806-810
/branches/registrar/AgateLib/DisplayLib/Display.cs:595-599
/branches/sprites/AgateLib/DisplayLib/Display.cs:463-513
+ /branches/agate-3d/AgateLib/DisplayLib/Display.cs:659
/branches/build/AgateLib/DisplayLib/Display.cs:501-517
/branches/font/AgateLib/DisplayLib/Display.cs:778-916
/branches/merge-tests/AgateLib/DisplayLib/Display.cs:806-810
/branches/registrar/AgateLib/DisplayLib/Display.cs:595-599
/branches/sprites/AgateLib/DisplayLib/Display.cs:463-513
Added: trunk/AgateLib/DisplayLib/FontState.cs
===================================================================
--- trunk/AgateLib/DisplayLib/FontState.cs (rev 0)
+++ trunk/AgateLib/DisplayLib/FontState.cs 2009-04-25 21:46:26 UTC (rev 917)
@@ -0,0 +1,181 @@
+// The contents of this file are subject to the Mozilla Public License
+// Version 1.1 (the "License"); you may not use this file except in
+// compliance with the License. You may obtain a copy of the License at
+// http://www.mozilla.org/MPL/
+//
+// Software distributed under the License is distributed on an "AS IS"
+// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+// License for the specific language governing rights and limitations
+// under the License.
+//
+// The Original Code is AgateLib.
+//
+// The Initial Developer of the Original Code is Erik Ylvisaker.
+// Portions created by Erik Ylvisaker are Copyright (C) 2006-2009.
+// All Rights Reserved.
+//
+// Contributor(s): Erik Ylvisaker
+//
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using AgateLib.Geometry;
+using AgateLib.DisplayLib.Cache;
+
+namespace AgateLib.DisplayLib
+{
+ public class FontState : ICloneable
+ {
+ private OriginAlignment mAlignment = OriginAlignment.TopLeft;
+ private Color mColor = Color.White;
+ private double mScaleWidth = 1.0;
+ private double mScaleHeight = 1.0;
+ private PointF mLocation;
+ private string mText;
+ private FontStateCache mCache;
+
+ /// <summary>
+ /// Gets or sets the text that is displayed when drawn.
+ /// </summary>
+ public string Text
+ {
+ get { return mText; }
+ set
+ {
+ mText = value;
+
+ if (Cache != null)
+ Cache.OnTextChanged(this);
+ }
+ }
+ /// <summary>
+ /// Gets or sets the location where text is drawn.
+ /// </summary>
+ public PointF Location
+ {
+ get { return mLocation; }
+ set
+ {
+ mLocation = value;
+
+ if (Cache != null)
+ Cache.OnLocationChanged(this);
+ }
+ }
+ /// <summary>
+ /// Sets how to interpret the point given to DrawText methods.
+ /// </summary>
+ public OriginAlignment DisplayAlignment
+ {
+ get { return mAlignment; }
+ set
+ {
+ mAlignment = value;
+
+ if (Cache != null)
+ Cache.OnDisplayAlignmentChanged(this);
+ }
+ }
+ /// <summary>
+ /// Sets the color of the text to be drawn.
+ /// </summary>
+ public Color Color
+ {
+ get { return mColor; }
+ set
+ {
+ mColor = value;
+
+ if (Cache != null)
+ Cache.OnColorChanged(this);
+ }
+ }
+ /// <summary>
+ /// Sets the alpha value of the text to be drawn.
+ /// </summary>
+ public double Alpha
+ {
+ get { return mColor.A / 255.0; }
+ set
+ {
+ if (value < 0) value = 0;
+ if (value > 1.0) value = 1.0;
+
+ mColor = Color.FromArgb((int)(value * 255), mColor);
+
+ if (Cache != null)
+ Cache.OnColorChanged(this);
+ }
+ }
+ /// <summary>
+ /// Gets or sets the amount the width is scaled when the text is drawn.
+ /// 1.0 is no scaling.
+ /// </summary>
+ public double ScaleWidth
+ {
+ get { return mScaleWidth; }
+ set
+ {
+ mScaleWidth = value;
+
+ if (Cache != null)
+ Cache.OnScaleChanged(this);
+ }
+ }
+ /// <summary>
+ /// Gets or sets the amount the height is scaled when the text is drawn.
+ /// 1.0 is no scaling.
+ /// </summary>
+ public double ScaleHeight
+ {
+ get { return mScaleHeight; }
+ set
+ {
+ mScaleHeight = value;
+
+ if (Cache != null)
+ Cache.OnScaleChanged(this);
+ }
+ }
+ /// <summary>
+ /// This value is used by the implementation to optimize rendering this state object.
+ /// Do not set this value unless you know what you are doing, or writing an implementation
+ /// of FontSurfaceImpl.
+ /// </summary>
+ public FontStateCache Cache
+ {
+ get { return mCache; }
+ set { mCache = value; }
+ }
+
+ #region --- ICloneable Members ---
+
+ public FontState Clone()
+ {
+ FontState retval = new FontState();
+
+ retval.mAlignment = mAlignment;
+ retval.mColor = mColor;
+ retval.mScaleWidth = mScaleWidth;
+ retval.mScaleHeight = mScaleHeight;
+ retval.mLocation = mLocation;
+ retval.mText = mText;
+
+ if (mCache != null)
+ {
+ retval.mCache = mCache.Clone();
+ }
+
+ return retval;
+ }
+
+ object ICloneable.Clone()
+ {
+ return Clone();
+ }
+
+ #endregion
+ }
+
+}
\ No newline at end of file
Modified: trunk/AgateLib/DisplayLib/FontSurface.cs
===================================================================
--- trunk/AgateLib/DisplayLib/FontSurface.cs 2009-04-25 19:58:56 UTC (rev 916)
+++ trunk/AgateLib/DisplayLib/FontSurface.cs 2009-04-25 21:46:26 UTC (rev 917)
@@ -18,8 +18,9 @@
//
using System;
using System.Collections.Generic;
+using System.Linq;
using System.Text;
-
+using System.Text.RegularExpressions;
using AgateLib.BitmapFont;
using AgateLib.Geometry;
using AgateLib.ImplementationBase;
@@ -67,6 +68,7 @@
{
internal FontSurfaceImpl impl;
private StringTransformer mTransformer = StringTransformer.None;
+ FontState mState = new FontState();
/// <summary>
/// Creates a FontSurface object from the given fontFamily.
@@ -189,67 +191,80 @@
}
/// <summary>
- /// Sets the interpretation of the draw point used.
+ /// Gets or sets the state of the font object.
/// </summary>
+ public FontState State
+ {
+ get { return mState; }
+ set
+ {
+ if (value == null)
+ throw new ArgumentNullException("Cannot set state to a null value. If you wish to reset the state, set it to a new FontState object.");
+
+ mState = value;
+ }
+ }
+ /// <summary>
+ /// Sets how to interpret the point given to DrawText methods.
+ /// </summary>
public OriginAlignment DisplayAlignment
{
- get { return impl.DisplayAlignment; }
- set { impl.DisplayAlignment = value; }
+ get { return mState.DisplayAlignment; }
+ set { mState.DisplayAlignment = value; }
}
/// <summary>
- /// Sets the color of the font.
+ /// Sets the color of the text to be drawn.
/// </summary>
public Color Color
{
- get { return impl.Color; }
- set { impl.Color = value; }
+ get { return mState.Color; }
+ set { mState.Color = value; }
}
/// <summary>
- /// Sets the transparency of the font.
- /// 0.0 is fully transparent
- /// 1.0 is completely opaque.
+ /// Sets the alpha value of the text to be drawn.
/// </summary>
public double Alpha
{
- get { return impl.Alpha; }
- set { impl.Alpha = value; }
+ get { return mState.Alpha; }
+ set { mState.Alpha = value; }
}
-
/// <summary>
- /// Sets the scale of the font.
+ /// Gets or sets the amount the width is scaled when the text is drawn.
+ /// 1.0 is no scaling.
/// </summary>
- /// <param name="x"></param>
- /// <param name="y"></param>
- public void SetScale(double x, double y)
+ public double ScaleWidth
{
- impl.SetScale(x, y);
+ get { return mState.ScaleWidth; }
+ set { mState.ScaleWidth = value; }
}
/// <summary>
- /// Gets the scale of the font.
+ /// Gets or sets the amount the height is scaled when the text is drawn.
+ /// 1.0 is no scaling.
/// </summary>
- /// <param name="x"></param>
- /// <param name="y"></param>
- public void GetScale(out double x, out double y)
+ public double ScaleHeight
{
- impl.GetScale(out x, out y);
+ get { return mState.ScaleHeight; }
+ set { mState.ScaleHeight = value; }
}
/// <summary>
- /// Gets or sets the amount the width is scaled when the text is drawn.
- /// 1.0 is no scaling.
+ /// Sets ScaleWidth and ScaleHeight.
/// </summary>
- public double ScaleWidth
+ /// <param name="x"></param>
+ /// <param name="y"></param>
+ public void SetScale(double x, double y)
{
- get { return impl.ScaleWidth; }
- set { impl.ScaleWidth = value; }
+ ScaleWidth = x;
+ ScaleHeight = y;
}
/// <summary>
- /// Gets or sets the amount the height is scaled when the text is drawn.
- /// 1.0 is no scaling.
+ /// Gets ScaleWidth and ScaleHeight.
/// </summary>
- public double ScaleHeight
+ /// <param name="x"></param>
+ /// <param name="y"></param>
+ public void GetScale(out double x, out double y)
{
- get { return impl.ScaleHeight; }
- set { impl.ScaleHeight = value; }
+ x = ScaleWidth;
+ y = ScaleHeight;
}
/// <summary>
@@ -257,19 +272,38 @@
/// </summary>
/// <param name="text"></param>
/// <returns></returns>
- public int StringDisplayWidth(string text) { return impl.StringDisplayWidth(text); }
+ public int StringDisplayWidth(string text)
+ {
+ return StringDisplaySize(text).Width;
+ }
/// <summary>
/// Measures the display height of the specified string.
/// </summary>
/// <param name="text"></param>
/// <returns></returns>
- public int StringDisplayHeight(string text) { return impl.StringDisplayHeight(text); }
+ public int StringDisplayHeight(string text)
+ {
+ return StringDisplaySize(text).Height;
+ }
/// <summary>
/// Measures the display size of the specified string.
/// </summary>
/// <param name="text"></param>
/// <returns></returns>
- public Size StringDisplaySize(string text) { return impl.StringDisplaySize(text); }
+ public Size StringDisplaySize(string text)
+ {
+ return impl.StringDisplaySize(mState, text);
+ }
+ /// <summary>
+ /// Measures the display size of the specified string, using the specified state information.
+ /// </summary>
+ /// <param name="state"></param>
+ /// <param name="text"></param>
+ /// <returns></returns>
+ public Size StringDisplaySize(FontState state, string text)
+ {
+ return impl.StringDisplaySize(state, text);
+ }
/// <summary>
/// Gets the height in pixels of a single line of text.
@@ -279,25 +313,20 @@
get { return impl.FontHeight; }
}
+ public TextImageLayout TextImageLayout { get; set; }
+
/// <summary>
/// Draws the specified string at the specified location.
/// </summary>
/// <param name="destX"></param>
/// <param name="destY"></param>
/// <param name="text"></param>
- public void DrawText(int destX, int destY, string text)
- {
- impl.DrawText(destX, destY, mTransformer.Transform(text));
- }
- /// <summary>
- /// Draws the specified string at the specified location.
- /// </summary>
- /// <param name="destX"></param>
- /// <param name="destY"></param>
- /// <param name="text"></param>
public void DrawText(double destX, double destY, string text)
{
- impl.DrawText(destX, destY, mTransformer.Transform(text));
+ mState.Location = new PointF((float)destX, (float)destY);
+ mState.Text = mTransformer.Transform(text);
+
+ DrawText(mState);
}
/// <summary>
/// Draws the specified string at the specified location.
@@ -306,7 +335,10 @@
/// <param name="text"></param>
public void DrawText(Point destPt, string text)
{
- impl.DrawText...
[truncated message content] |
|
From: <ka...@us...> - 2009-08-31 05:13:17
|
Revision: 1035
http://agate.svn.sourceforge.net/agate/?rev=1035&view=rev
Author: kanato
Date: 2009-08-31 05:13:07 +0000 (Mon, 31 Aug 2009)
Log Message:
-----------
Merge 3D branch into trunk.
Modified Paths:
--------------
trunk/AgateLib/AgateApplication.cs
trunk/AgateLib/AgateException.cs
trunk/AgateLib/AgateSetup.cs
trunk/AgateLib/AppInitParameters.cs
trunk/AgateLib/DisplayLib/Display.cs
trunk/AgateLib/DisplayLib/Light.cs
trunk/AgateLib/DisplayLib/LightManager.cs
trunk/AgateLib/DisplayLib/PixelBuffer.cs
trunk/AgateLib/DisplayLib/Surface.cs
trunk/AgateLib/Drivers/AgateDriverInfo.cs
trunk/AgateLib/Drivers/IDesktopDriver.cs
trunk/AgateLib/Drivers/IUserSetSystems.cs
trunk/AgateLib/Drivers/Registrar.cs
trunk/AgateLib/Drivers/TypeID.cs
trunk/AgateLib/Geometry/Color.cs
trunk/AgateLib/Geometry/Rectangle.cs
trunk/AgateLib/Geometry/RectangleF.cs
trunk/AgateLib/Geometry/Vector3.cs
trunk/AgateLib/ImplementationBase/DisplayImpl.cs
trunk/AgateLib/ImplementationBase/IDisplayCaps.cs
trunk/AgateLib/ImplementationBase/SurfaceImpl.cs
trunk/AgateLib/InputLib/Mouse.cs
trunk/AgateLib/Resources/AgateResourceCollection.cs
trunk/AgateLib/Resources/AgateResourceException.cs
trunk/AgateLib/Resources/AgateResourceLoader.cs
trunk/Build/AgateLib-Windows.xml
trunk/Build/monodevelop.sh
trunk/Drivers/AgateDrawing/Drawing_Display.cs
trunk/Drivers/AgateLib.WinForms/Icons.Designer.cs
trunk/Drivers/AgateLib.WinForms/SetSystemsForm.Designer.cs
trunk/Drivers/AgateLib.WinForms/SetSystemsForm.cs
trunk/Drivers/AgateMDX/D3DDevice.cs
trunk/Drivers/AgateMDX/DrawBuffer.cs
trunk/Drivers/AgateMDX/MDX1_Display.cs
trunk/Drivers/AgateMDX/MDX1_Surface.cs
trunk/Drivers/AgateOTK/GL_Display.cs
trunk/Drivers/AgateOTK/GL_DisplayControl.cs
trunk/Drivers/AgateOTK/GL_GameWindow.cs
trunk/Drivers/AgateOTK/GL_Surface.cs
trunk/Drivers/AgateOTK/OpenTK.Utilities.dll
trunk/Drivers/AgateOTK/OpenTK.dll
trunk/Drivers/AgateOTK/OpenTK.xml
trunk/Drivers/AgateOTK/Otk_Reporter.cs
trunk/Drivers/AgateSDL/Reporter.cs
trunk/Tests/AudioTests/AudioPlayer/AudioPlayer.cs
trunk/Tests/CoreTests/Performance/Performance.cs
trunk/Tests/DisplayTests/BasicDrawing/BasicDrawing.cs
trunk/Tests/DisplayTests/BasicDrawing/DrawingTester.Designer.cs
trunk/Tests/DisplayTests/BasicDrawing/DrawingTester.cs
trunk/Tests/DisplayTests/PixelBufferTest/PixelBufferTest.cs
trunk/Tests/DisplayTests/SpriteTester/frmSpriteTester.cs
trunk/Tests/DisplayTests/TileTester/TileTester.cs
trunk/Tests/DisplayTests/TileTester/frmTileTester.Designer.cs
trunk/Tests/DisplayTests/TileTester/frmTileTester.cs
trunk/Tests/Fonts/Fonts.cs
trunk/Tests/Launcher.cs
trunk/Tests/frmLauncher.cs
Added Paths:
-----------
trunk/AgateLib/DisplayLib/DisplayCapsInfo.cs
trunk/AgateLib/DisplayLib/IndexBuffer.cs
trunk/AgateLib/DisplayLib/PrimitiveType.cs
trunk/AgateLib/DisplayLib/RenderStateAdapter.cs
trunk/AgateLib/DisplayLib/Shaders/
trunk/AgateLib/DisplayLib/Shaders/AgateShaderCompileError.cs
trunk/AgateLib/DisplayLib/Shaders/Effect.cs
trunk/AgateLib/DisplayLib/Shaders/ShaderCompiler.cs
trunk/AgateLib/DisplayLib/Shaders/ShaderLanguage.cs
trunk/AgateLib/DisplayLib/Shaders/ShaderProgram.cs
trunk/AgateLib/DisplayLib/Shaders/Technique.cs
trunk/AgateLib/DisplayLib/Shaders/UniformState.cs
trunk/AgateLib/DisplayLib/VertexBuffer.cs
trunk/AgateLib/Geometry/Builders/
trunk/AgateLib/Geometry/Builders/Cube.cs
trunk/AgateLib/Geometry/Builders/Terrain.cs
trunk/AgateLib/Geometry/Matrix4x4.cs
trunk/AgateLib/Geometry/Vector4.cs
trunk/AgateLib/Geometry/VertexTypes/
trunk/AgateLib/Geometry/VertexTypes/PositionColor.cs
trunk/AgateLib/Geometry/VertexTypes/PositionTextureColor.cs
trunk/AgateLib/Geometry/VertexTypes/PositionTextureNTB.cs
trunk/AgateLib/Geometry/VertexTypes/PositionTextureNormal.cs
trunk/AgateLib/Geometry/VertexTypes/VertexLayout.cs
trunk/AgateLib/ImplementationBase/IndexBufferImpl.cs
trunk/AgateLib/ImplementationBase/ShaderCompilerImpl.cs
trunk/AgateLib/ImplementationBase/VertexBufferImpl.cs
trunk/AgateLib/Meshes/
trunk/AgateLib/Meshes/Loaders/
trunk/AgateLib/Meshes/Loaders/OBJFileRepresentation.cs
trunk/AgateLib/Meshes/Loaders/Obj/
trunk/AgateLib/Meshes/Loaders/Obj/OBJFileRepresentation.cs
trunk/AgateLib/Meshes/Loaders/Obj/Parser.cs
trunk/AgateLib/Meshes/Loaders/Obj/TokenTypes.cs
trunk/Build/Projects/AgateSDX.proj.xml
trunk/Drivers/AgateMDX/MDX1_IndexBuffer.cs
trunk/Drivers/AgateMDX/MDX1_VertexBuffer.cs
trunk/Drivers/AgateOTK/ArbShader.cs
trunk/Drivers/AgateOTK/ArbShaderCompiler.cs
trunk/Drivers/AgateOTK/GL_IndexBuffer.cs
trunk/Drivers/AgateOTK/GL_VertexBuffer.cs
trunk/Drivers/AgateOTK/GlslFragmentProgram.cs
trunk/Drivers/AgateOTK/GlslShader.cs
trunk/Drivers/AgateOTK/GlslShaderCompiler.cs
trunk/Drivers/AgateOTK/GlslVertexProgram.cs
trunk/Drivers/AgateOTK/OtkShader.cs
trunk/Drivers/AgateSDX/
trunk/Drivers/AgateSDX/AgateSDX.csproj
trunk/Drivers/AgateSDX/D3DDevice.cs
trunk/Drivers/AgateSDX/DrawBuffer.cs
trunk/Drivers/AgateSDX/EffectParameter.cs
trunk/Drivers/AgateSDX/HlslCompiler.cs
trunk/Drivers/AgateSDX/HlslEffect.cs
trunk/Drivers/AgateSDX/Properties/
trunk/Drivers/AgateSDX/Properties/AssemblyInfo.cs
trunk/Drivers/AgateSDX/Reporter.cs
trunk/Drivers/AgateSDX/SDX_Audio.cs
trunk/Drivers/AgateSDX/SDX_Display.cs
trunk/Drivers/AgateSDX/SDX_DisplayWindow.cs
trunk/Drivers/AgateSDX/SDX_Effect.cs
trunk/Drivers/AgateSDX/SDX_IRenderTarget.cs
trunk/Drivers/AgateSDX/SDX_IndexBuffer.cs
trunk/Drivers/AgateSDX/SDX_Input.cs
trunk/Drivers/AgateSDX/SDX_Surface.cs
trunk/Drivers/AgateSDX/SDX_VertexBuffer.cs
trunk/Drivers/AgateSDX/VertexFormats.cs
trunk/Drivers/AgateSDX/frmFullScreen.Designer.cs
trunk/Drivers/AgateSDX/frmFullScreen.cs
trunk/Drivers/AgateSDX/frmFullScreen.resx
trunk/Tests/Data/bg-bricks-heightmap.png
trunk/Tests/Data/shaders/
trunk/Tests/Data/shaders/glsl/
trunk/Tests/Data/shaders/glsl/BumpMap_fragment.txt
trunk/Tests/Data/shaders/glsl/BumpMap_vertex.txt
trunk/Tests/Data/shaders/glsl/PerPixelLighting_fragment.txt
trunk/Tests/Data/shaders/glsl/PerPixelLighting_vertex.txt
trunk/Tests/Data/shaders/hlsl/
trunk/Tests/Data/shaders/hlsl/Lighting.fx
trunk/Tests/Data/shaders/hlsl/PerPixelLighting.fx
trunk/Tests/DisplayTests/RenderStates/
trunk/Tests/DisplayTests/RenderStates/RenderStates.cs
trunk/Tests/DisplayTests/RenderStates/frmRenderStateTest.Designer.cs
trunk/Tests/DisplayTests/RenderStates/frmRenderStateTest.cs
trunk/Tests/DisplayTests/RenderStates/frmRenderStateTest.resx
trunk/Tests/Shaders/
trunk/Tests/Shaders/Hlsl.cs
trunk/Tests/Shaders/LightingTest/
trunk/Tests/Shaders/LightingTest/LightingTest.cs
trunk/Tests/Shaders/LightingTest/LightingTestForm.Designer.cs
trunk/Tests/Shaders/LightingTest/LightingTestForm.cs
trunk/Tests/Shaders/LightingTest/LightingTestForm.resx
Removed Paths:
-------------
trunk/AgateLib/DisplayLib/Shaders/AgateShaderCompileError.cs
trunk/AgateLib/DisplayLib/Shaders/Effect.cs
trunk/AgateLib/DisplayLib/Shaders/ShaderCompiler.cs
trunk/AgateLib/DisplayLib/Shaders/ShaderLanguage.cs
trunk/AgateLib/DisplayLib/Shaders/ShaderProgram.cs
trunk/AgateLib/DisplayLib/Shaders/Technique.cs
trunk/AgateLib/DisplayLib/Shaders/UniformState.cs
trunk/AgateLib/Geometry/Builders/Cube.cs
trunk/AgateLib/Geometry/Builders/Terrain.cs
trunk/AgateLib/Geometry/VertexTypes/PositionColor.cs
trunk/AgateLib/Geometry/VertexTypes/PositionTextureColor.cs
trunk/AgateLib/Geometry/VertexTypes/PositionTextureNTB.cs
trunk/AgateLib/Geometry/VertexTypes/PositionTextureNormal.cs
trunk/AgateLib/Geometry/VertexTypes/VertexLayout.cs
trunk/AgateLib/Meshes/Loaders/
trunk/AgateLib/Meshes/Loaders/OBJFileRepresentation.cs
trunk/AgateLib/Meshes/Loaders/Obj/
trunk/AgateLib/Meshes/Loaders/Obj/OBJFileRepresentation.cs
trunk/AgateLib/Meshes/Loaders/Obj/Parser.cs
trunk/AgateLib/Meshes/Loaders/Obj/TokenTypes.cs
trunk/Drivers/AgateSDX/AgateSDX.csproj
trunk/Drivers/AgateSDX/D3DDevice.cs
trunk/Drivers/AgateSDX/DrawBuffer.cs
trunk/Drivers/AgateSDX/EffectParameter.cs
trunk/Drivers/AgateSDX/HlslCompiler.cs
trunk/Drivers/AgateSDX/HlslEffect.cs
trunk/Drivers/AgateSDX/Properties/
trunk/Drivers/AgateSDX/Properties/AssemblyInfo.cs
trunk/Drivers/AgateSDX/Reporter.cs
trunk/Drivers/AgateSDX/SDX_Audio.cs
trunk/Drivers/AgateSDX/SDX_Display.cs
trunk/Drivers/AgateSDX/SDX_DisplayWindow.cs
trunk/Drivers/AgateSDX/SDX_Effect.cs
trunk/Drivers/AgateSDX/SDX_IRenderTarget.cs
trunk/Drivers/AgateSDX/SDX_IndexBuffer.cs
trunk/Drivers/AgateSDX/SDX_Input.cs
trunk/Drivers/AgateSDX/SDX_Surface.cs
trunk/Drivers/AgateSDX/SDX_VertexBuffer.cs
trunk/Drivers/AgateSDX/VertexFormats.cs
trunk/Drivers/AgateSDX/frmFullScreen.Designer.cs
trunk/Drivers/AgateSDX/frmFullScreen.cs
trunk/Drivers/AgateSDX/frmFullScreen.resx
trunk/Tests/Data/shaders/glsl/
trunk/Tests/Data/shaders/glsl/BumpMap_fragment.txt
trunk/Tests/Data/shaders/glsl/BumpMap_vertex.txt
trunk/Tests/Data/shaders/glsl/PerPixelLighting_fragment.txt
trunk/Tests/Data/shaders/glsl/PerPixelLighting_vertex.txt
trunk/Tests/Data/shaders/hlsl/
trunk/Tests/Data/shaders/hlsl/Lighting.fx
trunk/Tests/Data/shaders/hlsl/PerPixelLighting.fx
trunk/Tests/DisplayTests/LightingTest/
trunk/Tests/DisplayTests/RenderStates/RenderStates.cs
trunk/Tests/DisplayTests/RenderStates/frmRenderStateTest.Designer.cs
trunk/Tests/DisplayTests/RenderStates/frmRenderStateTest.cs
trunk/Tests/DisplayTests/RenderStates/frmRenderStateTest.resx
trunk/Tests/Shaders/Hlsl.cs
trunk/Tests/Shaders/LightingTest/
trunk/Tests/Shaders/LightingTest/LightingTest.cs
trunk/Tests/Shaders/LightingTest/LightingTestForm.Designer.cs
trunk/Tests/Shaders/LightingTest/LightingTestForm.cs
trunk/Tests/Shaders/LightingTest/LightingTestForm.resx
Property Changed:
----------------
trunk/
trunk/AgateLib/
trunk/AgateLib/AgateFileProvider.cs
trunk/AgateLib/AgateSetup.cs
trunk/AgateLib/AudioLib/
trunk/AgateLib/AudioLib/Audio.cs
trunk/AgateLib/BitmapFont/FontMetrics.cs
trunk/AgateLib/BitmapFont/GlyphMetrics.cs
trunk/AgateLib/Core.cs
trunk/AgateLib/DisplayLib/
trunk/AgateLib/DisplayLib/Display.cs
trunk/AgateLib/DisplayLib/StringTransformer.cs
trunk/AgateLib/Drivers/AgateDriverReporter.cs
trunk/AgateLib/Drivers/IDesktopDriver.cs
trunk/AgateLib/ImplementationBase/
trunk/AgateLib/ImplementationBase/AudioImpl.cs
trunk/AgateLib/InputLib/
trunk/AgateLib/Resources/AgateResourceCollection.cs
trunk/AgateLib/Resources/AgateResourceLoader.cs
trunk/AgateLib/Resources/BitmapFontResource.cs
trunk/AgateLib/Sprites/Sprite.cs
trunk/AgateLib/Sprites/SpriteFrame.cs
trunk/AgateLib/Timing.cs
trunk/AgateLib/Utility/Platform.cs
trunk/Build/monodevelop.sh
trunk/Drivers/
trunk/Drivers/AgateDrawing/Drawing_Reporter.cs
trunk/Drivers/AgateLib.WinForms/
trunk/Drivers/AgateSDL/
trunk/Drivers/AgateSDL/Audio/SDL_Audio.cs
trunk/Drivers/AgateSDL/Audio/SDL_Music.cs
trunk/Drivers/AgateSDL/Audio/SDL_SoundBuffer.cs
trunk/Drivers/AgateSDL/Audio/SDL_SoundBufferSession.cs
trunk/Drivers/AgateSDL/Input/SDL_Input.cs
trunk/Drivers/AgateSDL/Reporter.cs
trunk/Examples/BallBuster.Net/OpenTK.dll.config
trunk/Tests/CoreTests/
trunk/Tests/DisplayTests/SurfaceTester/SurfaceTester.cs
trunk/Tests/DisplayTests/TestPacker/TestPacker.cs
trunk/Tests/DisplayTests/TestPacker/frmTestPacker.Designer.cs
trunk/Tests/DisplayTests/TestPacker/frmTestPacker.cs
trunk/Tests/DisplayTests/TestPacker/frmTestPacker.resx
trunk/Tests/DisplayTests/TileTester/TileTester.cs
trunk/Tests/DisplayTests/TileTester/frmTileTester.Designer.cs
trunk/Tests/DisplayTests/TileTester/frmTileTester.cs
trunk/Tests/DisplayTests/TileTester/frmTileTester.resx
trunk/Tests/InputTests/Input/
trunk/Tests/InputTests/Input/InputTester.cs
trunk/Tests/InputTests/Input/frmInputTester.Designer.cs
trunk/Tests/InputTests/Input/frmInputTester.cs
trunk/Tests/InputTests/InputState/
trunk/Tests/InputTests/InputState/InputStateTester.cs
trunk/Tools/FontCreator/CreateFont.Designer.cs
trunk/Tools/FontCreator/CreateFont.cs
trunk/Tools/FontCreator/CreateFont.resx
trunk/Tools/FontCreator/EditGlyphs.Designer.cs
trunk/Tools/FontCreator/EditGlyphs.cs
trunk/Tools/FontCreator/EditGlyphs.resx
trunk/Tools/FontCreator/SaveFont.Designer.cs
trunk/Tools/FontCreator/SaveFont.cs
trunk/Tools/FontCreator/SaveFont.resx
trunk/Tools/FontCreator/frmFontCreator.Designer.cs
trunk/Tools/FontCreator/frmFontCreator.cs
trunk/Tools/FontCreator/frmFontCreator.resx
trunk/Tools/PackedSpriteCreator/SpriteEditor.Designer.cs
trunk/Tools/PackedSpriteCreator/SpriteEditor.cs
trunk/Tools/PackedSpriteCreator/SpriteEditor.resx
trunk/Tools/PackedSpriteCreator/SpritePacker.cs
Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate-3d:659
/branches/build:424-517
/branches/font:778-916
/branches/merge-tests:806-810
/branches/registrar:595-599
/branches/sprites:463-513
+ /branches/agate-3d:629-702,840-864
/branches/agate3d-3.2:923-1034
/branches/build:424-517
/branches/font:778-916
/branches/merge-tests:806-810
/branches/registrar:595-599
/branches/sprites:463-513
Property changes on: trunk/AgateLib
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate-3d/AgateLib:659
/branches/build/AgateLib:447-517
/branches/font/AgateLib:778-916
/branches/merge-tests/AgateLib:806-810
/branches/registrar/AgateLib:595-599
/branches/sprites/AgateLib:463-513
+ /branches/agate-3d/AgateLib:629-702,840-864
/branches/agate3d-3.2/AgateLib:923-1034
/branches/build/AgateLib:447-448,501-517
/branches/font/AgateLib:778-916
/branches/merge-tests/AgateLib:806-810
/branches/registrar/AgateLib:595-599
/branches/sprites/AgateLib:463-513
Modified: trunk/AgateLib/AgateApplication.cs
===================================================================
--- trunk/AgateLib/AgateApplication.cs 2009-08-30 20:21:03 UTC (rev 1034)
+++ trunk/AgateLib/AgateApplication.cs 2009-08-31 05:13:07 UTC (rev 1035)
@@ -49,7 +49,7 @@
double totalSplashTime = 0;
bool splashFadeDone = false;
- #region --- Run Methods ---
+ #region --- Run Method ---
/// <summary>
/// Runs the application.
@@ -68,6 +68,10 @@
{
using (AgateSetup setup = new AgateSetup(args))
{
+ setup.PreferredDisplay = InitParams.PreferredDisplay;
+ setup.PreferredAudio = InitParams.PreferredAudio;
+ setup.PreferredInput = InitParams.PreferredInput;
+
setup.Initialize(
InitParams.InitializeDisplay,
InitParams.InitializeAudio,
@@ -233,7 +237,7 @@
Surface powered = InternalResources.Data.PoweredBy;
Size size = powered.SurfaceSize;
- int left = (int)(totalSplashTime * size.Width - size.Width);
+ int left = (int)(totalSplashTime * size.Width - size.Width)+1;
Rectangle gradientRect = new Rectangle(left, MainWindow.Height - size.Height,
size.Width, size.Height);
Modified: trunk/AgateLib/AgateException.cs
===================================================================
--- trunk/AgateLib/AgateException.cs 2009-08-30 20:21:03 UTC (rev 1034)
+++ trunk/AgateLib/AgateException.cs 2009-08-31 05:13:07 UTC (rev 1035)
@@ -46,10 +46,21 @@
/// <summary>
/// Constructs an AgateException.
/// </summary>
- public AgateException(string message, Exception inner) : base(message, inner) { }
+ public AgateException(Exception inner, string message) : base(message, inner) { }
/// <summary>
+ /// Constructs an AgateException, calling string.Format on the arguments.
+ /// </summary>
+ public AgateException(string format, params object[] args)
+ : base(string.Format(format, args)) { }
+ /// <summary>
/// Constructs an AgateException.
/// </summary>
+ public AgateException(Exception inner, string format, params object[] args)
+ : base(string.Format(format, args), inner) { }
+
+ /// <summary>
+ /// Deserializes an AgateException.
+ /// </summary>
protected AgateException(
System.Runtime.Serialization.SerializationInfo info,
System.Runtime.Serialization.StreamingContext context)
@@ -93,4 +104,4 @@
System.Runtime.Serialization.StreamingContext context)
: base(info, context) { }
}
-}
+}
\ No newline at end of file
Property changes on: trunk/AgateLib/AgateFileProvider.cs
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/build/AgateLib/Utility/AgateFileProvider.cs:447-517
/branches/font/AgateLib/AgateFileProvider.cs:778-916
/branches/merge-tests/AgateLib/AgateFileProvider.cs:806-810
/branches/registrar/AgateLib/Utility/AgateFileProvider.cs:595-599
/branches/sprites/AgateLib/Utility/AgateFileProvider.cs:463-513
+ /branches/agate3d-3.2/AgateLib/AgateFileProvider.cs:923-1034
/branches/build/AgateLib/Utility/AgateFileProvider.cs:447-517
/branches/font/AgateLib/AgateFileProvider.cs:778-916
/branches/merge-tests/AgateLib/AgateFileProvider.cs:806-810
/branches/registrar/AgateLib/Utility/AgateFileProvider.cs:595-599
/branches/sprites/AgateLib/Utility/AgateFileProvider.cs:463-513
Modified: trunk/AgateLib/AgateSetup.cs
===================================================================
--- trunk/AgateLib/AgateSetup.cs 2009-08-30 20:21:03 UTC (rev 1034)
+++ trunk/AgateLib/AgateSetup.cs 2009-08-31 05:13:07 UTC (rev 1035)
@@ -66,10 +66,29 @@
private bool mUseAudio = true;
private bool mUseInput = true;
+ private DisplayTypeID mPreferredDisplay = DisplayTypeID.AutoSelect;
+ private AudioTypeID mPreferredAudio = AudioTypeID.AutoSelect;
+ private InputTypeID mPreferredInput = InputTypeID.AutoSelect;
+
private DisplayTypeID mSelectDisplay = DisplayTypeID.AutoSelect;
private AudioTypeID mSelectAudio = AudioTypeID.AutoSelect;
private InputTypeID mSelectInput = InputTypeID.AutoSelect;
+ public DisplayTypeID PreferredDisplay
+ {
+ get { return mPreferredDisplay; }
+ set { mPreferredDisplay = value; }
+ }
+ public AudioTypeID PreferredAudio
+ {
+ get { return mPreferredAudio; }
+ set { mPreferredAudio = value; }
+ }
+ public InputTypeID PreferredInput
+ {
+ get { return mPreferredInput; }
+ set { mPreferredInput = value; }
+ }
/// <summary>
/// Constructs a Setup object.
@@ -280,8 +299,10 @@
return;
mWasCanceled = !Registrar.UserSelectDrivers(mUseDisplay, mUseAudio, mUseInput,
- out mSelectDisplay, out mSelectAudio, out mSelectInput);
+ mPreferredDisplay, mPreferredAudio, mPreferredInput ,
+ out mSelectDisplay, out mSelectAudio, out mSelectInput);
+
mAlreadyAsked = true;
}
Property changes on: trunk/AgateLib/AgateSetup.cs
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate-3d/AgateLib/AgateSetup.cs:659
/branches/build/AgateLib/AgateSetup.cs:501-517
/branches/font/AgateLib/AgateSetup.cs:778-916
/branches/merge-tests/AgateLib/AgateSetup.cs:806-810
/branches/registrar/AgateLib/AgateSetup.cs:595-599
/branches/sprites/AgateLib/AgateSetup.cs:463-513
+ /branches/agate-3d/AgateLib/AgateSetup.cs:629-702,840-864
/branches/agate3d-3.2/AgateLib/AgateSetup.cs:923-1034
/branches/build/AgateLib/AgateSetup.cs:501-517
/branches/font/AgateLib/AgateSetup.cs:778-916
/branches/merge-tests/AgateLib/AgateSetup.cs:806-810
/branches/registrar/AgateLib/AgateSetup.cs:595-599
/branches/sprites/AgateLib/AgateSetup.cs:463-513
Modified: trunk/AgateLib/AppInitParameters.cs
===================================================================
--- trunk/AgateLib/AppInitParameters.cs 2009-08-30 20:21:03 UTC (rev 1034)
+++ trunk/AgateLib/AppInitParameters.cs 2009-08-31 05:13:07 UTC (rev 1035)
@@ -23,5 +23,10 @@
public bool InitializeDisplay { get; set; }
public bool InitializeAudio { get; set; }
public bool InitializeJoysticks { get; set; }
+
+ public Drivers.DisplayTypeID PreferredDisplay { get; set; }
+ public Drivers.AudioTypeID PreferredAudio { get; set; }
+ public Drivers.InputTypeID PreferredInput { get; set; }
+
}
}
Property changes on: trunk/AgateLib/AudioLib
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate-3d/AgateLib/AudioLib:659
/branches/font/AgateLib/AudioLib:778-916
/branches/merge-tests/AgateLib/AudioLib:806-810
/branches/registrar/AgateLib/AudioLib:595-599
/branches/sprites/AgateLib/AudioLib:463-513
+ /branches/agate-3d/AgateLib/AudioLib:629-702,840-864
/branches/agate3d-3.2/AgateLib/AudioLib:923-1034
/branches/font/AgateLib/AudioLib:778-916
/branches/merge-tests/AgateLib/AudioLib:806-810
/branches/registrar/AgateLib/AudioLib:595-599
/branches/sprites/AgateLib/AudioLib:463-513
Property changes on: trunk/AgateLib/AudioLib/Audio.cs
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate-3d/AgateLib/AudioLib/Audio.cs:659
/branches/build/AgateLib/AudioLib/Audio.cs:501-517
/branches/font/AgateLib/AudioLib/Audio.cs:778-916
/branches/merge-tests/AgateLib/AudioLib/Audio.cs:806-810
/branches/registrar/AgateLib/AudioLib/Audio.cs:595-599
/branches/sprites/AgateLib/AudioLib/Audio.cs:463-513
+ /branches/agate-3d/AgateLib/AudioLib/Audio.cs:629-702,840-864
/branches/agate3d-3.2/AgateLib/AudioLib/Audio.cs:923-1034
/branches/build/AgateLib/AudioLib/Audio.cs:501-517
/branches/font/AgateLib/AudioLib/Audio.cs:778-916
/branches/merge-tests/AgateLib/AudioLib/Audio.cs:806-810
/branches/registrar/AgateLib/AudioLib/Audio.cs:595-599
/branches/sprites/AgateLib/AudioLib/Audio.cs:463-513
Property changes on: trunk/AgateLib/BitmapFont/FontMetrics.cs
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate-3d/AgateLib/BitmapFont/FontMetrics.cs:659
/branches/font/AgateLib/BitmapFont/FontMetrics.cs:778-916
/branches/merge-tests/AgateLib/BitmapFont/FontMetrics.cs:806-810
+ /branches/agate-3d/AgateLib/BitmapFont/FontMetrics.cs:629-702,840-864
/branches/agate3d-3.2/AgateLib/BitmapFont/FontMetrics.cs:923-1034
/branches/font/AgateLib/BitmapFont/FontMetrics.cs:778-916
/branches/merge-tests/AgateLib/BitmapFont/FontMetrics.cs:806-810
Property changes on: trunk/AgateLib/BitmapFont/GlyphMetrics.cs
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate-3d/AgateLib/BitmapFont/GlyphMetrics.cs:659
/branches/build/AgateLib/Resources/GlyphMetrics.cs:447-517
/branches/font/AgateLib/BitmapFont/GlyphMetrics.cs:778-916
/branches/merge-tests/AgateLib/BitmapFont/GlyphMetrics.cs:806-810
/branches/registrar/AgateLib/Resources/GlyphMetrics.cs:595-599
/branches/sprites/AgateLib/Resources/GlyphMetrics.cs:463-513
+ /branches/agate-3d/AgateLib/BitmapFont/GlyphMetrics.cs:629-702,840-864
/branches/agate3d-3.2/AgateLib/BitmapFont/GlyphMetrics.cs:923-1034
/branches/build/AgateLib/Resources/GlyphMetrics.cs:447-517
/branches/font/AgateLib/BitmapFont/GlyphMetrics.cs:778-916
/branches/merge-tests/AgateLib/BitmapFont/GlyphMetrics.cs:806-810
/branches/registrar/AgateLib/Resources/GlyphMetrics.cs:595-599
/branches/sprites/AgateLib/Resources/GlyphMetrics.cs:463-513
Property changes on: trunk/AgateLib/Core.cs
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate-3d/AgateLib/Core.cs:659
/branches/build/AgateLib/Core.cs:501-517
/branches/font/AgateLib/Core.cs:778-916
/branches/merge-tests/AgateLib/Core.cs:806-810
/branches/registrar/AgateLib/Core.cs:595-599
/branches/sprites/AgateLib/Core.cs:463-513
+ /branches/agate-3d/AgateLib/Core.cs:629-702,840-864
/branches/agate3d-3.2/AgateLib/Core.cs:923-1034
/branches/build/AgateLib/Core.cs:501-517
/branches/font/AgateLib/Core.cs:778-916
/branches/merge-tests/AgateLib/Core.cs:806-810
/branches/registrar/AgateLib/Core.cs:595-599
/branches/sprites/AgateLib/Core.cs:463-513
Property changes on: trunk/AgateLib/DisplayLib
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate-3d/AgateLib/DisplayLib:659
/branches/font/AgateLib/DisplayLib:778-916
/branches/merge-tests/AgateLib/DisplayLib:806-810
/branches/registrar/AgateLib/DisplayLib:595-599
/branches/sprites/AgateLib/DisplayLib:463-513
+ /branches/agate-3d/AgateLib/DisplayLib:629-702,840-864
/branches/agate3d-3.2/AgateLib/DisplayLib:923-1034
/branches/font/AgateLib/DisplayLib:778-916
/branches/merge-tests/AgateLib/DisplayLib:806-810
/branches/registrar/AgateLib/DisplayLib:595-599
/branches/sprites/AgateLib/DisplayLib:463-513
Modified: trunk/AgateLib/DisplayLib/Display.cs
===================================================================
--- trunk/AgateLib/DisplayLib/Display.cs 2009-08-30 20:21:03 UTC (rev 1034)
+++ trunk/AgateLib/DisplayLib/Display.cs 2009-08-31 05:13:07 UTC (rev 1035)
@@ -61,6 +61,9 @@
private static DisplayImpl impl;
private static DisplayWindow mCurrentWindow;
private static SurfacePacker mSurfacePacker;
+ private static Rectangle mCurrentClipRect;
+ private static Stack<Rectangle> mClipRects = new Stack<Rectangle>();
+ private static RenderStateAdapter mRenderState = new RenderStateAdapter();
/// <summary>
/// Gets the object which handles all of the actual calls to Display functions.
@@ -91,8 +94,17 @@
impl.Initialize();
mSurfacePacker = new SurfacePacker();
+ }
+ public static RenderStateAdapter RenderState
+ {
+ get { return mRenderState; }
}
+
+ private static ShaderCompilerImpl CreateShaderCompiler()
+ {
+ return impl.CreateShaderCompiler();
+ }
/// <summary>
/// Disposes of the Display.
/// </summary>
@@ -125,6 +137,12 @@
}
}
+ public static Shaders.Effect Effect
+ {
+ get { return impl.Effect; }
+ set { impl.Effect = value; }
+ }
+
/// <summary>
/// Delegate type for functions which are called when Display.Dispose is called
/// at the end of execution of the program.
@@ -142,20 +160,6 @@
DisposeDisplay();
}
- private static bool TestPath(string filename, out string fullPath)
- {
- if (File.Exists(filename))
- {
- fullPath = Path.GetFullPath(filename);
- return true;
- }
- else
- {
- fullPath = "";
- return false;
- }
- }
-
/// <summary>
/// Returns the PixelFormat of Surfaces which are created to be compatible
/// with the display mode. If you want to create a PixelBuffer which does
@@ -278,6 +282,7 @@
throw new AgateException("The current window has been closed, and a new render target has not been set. A render target must be set to continue rendering.");
impl.BeginFrame();
+ mCurrentClipRect = new Rectangle(0, 0, RenderTarget.Width, RenderTarget.Height);
}
/// <summary>
/// EndFrame must be called at the end of each frame.
@@ -322,15 +327,24 @@
/// <param name="newClipRect"></param>
public static void PushClipRect(Rectangle newClipRect)
{
- impl.PushClipRect(newClipRect);
+ mClipRects.Push(mCurrentClipRect);
+ SetClipRect(newClipRect);
}
/// <summary>
/// Pops the clip rect and restores the previous clip rect.
/// </summary>
public static void PopClipRect()
{
- impl.PopClipRect();
+ if (mClipRects.Count == 0)
+ {
+ throw new AgateException("You have popped the cliprect too many times.");
+ }
+ else
+ {
+ SetClipRect(mClipRects.Pop());
+ }
}
+
/// <summary>
/// Returns the maximum size a surface object can be.
/// </summary>
@@ -398,22 +412,11 @@
/// Gets or sets the VSync flag. If VSync is off, tearing might occur.
/// If VSync is on, the framerate will be capped at the monitor's refresh rate.
/// </summary>
+ [Obsolete("Use Display.RenderState.WaitForVerticalBlank instead.", true)]
public static bool VSync
{
- get
- {
- if (impl == null)
- throw new AgateException("Display has not been initialized.");
-
- return impl.VSync;
- }
- set
- {
- if (impl == null)
- throw new AgateException("Display has not been initialized.");
-
- impl.VSync = value;
- }
+ get { return RenderState.WaitForVerticalBlank; }
+ set { RenderState.WaitForVerticalBlank = value; }
}
/// <summary>
@@ -449,6 +452,11 @@
{
SetOrthoProjection(Rectangle.FromLTRB(left, top, right, bottom));
}
+ public static Matrix4x4 GetOrthoProjection()
+ {
+ return Matrix4x4.Ortho(RectangleF.FromLTRB(0, 0, RenderTarget.Width, RenderTarget.Height), -1, 1);
+ }
+
/// <summary>
/// Sets the orthogonal projection for rendering. This allows redefinition of the
/// coordinates used to address pixels in the window.
@@ -468,6 +476,7 @@
{
impl.SetOrthoProjection(region);
}
+
#region --- Drawing Functions ---
/// <summary>
@@ -489,7 +498,7 @@
/// <param name="color"></param>
public static void DrawLine(int x1, int y1, int x2, int y2, Color color)
{
- impl.DrawLine(x1, y1, x2, y2, color);
+ impl.DrawLine(new Point(x1, y1), new Point(x2, y2), color);
}
/// <summary>
/// Draws a line between the two points specified.
@@ -522,7 +531,6 @@
{
if (pts.Length % 2 == 1)
throw new ArgumentException("pts argument is not an even number of points!");
-
impl.DrawLineSegments(pts, color);
}
/// <summary>
@@ -555,7 +563,35 @@
{
impl.DrawRect(new Rectangle(x, y, width, height), color);
}
+
/// <summary>
+ /// Draws a filled ellipse inscribed in the specified rectangle.
+ /// </summary>
+ /// <param name="rect"></param>
+ /// <param name="color"></param>
+ public static void FillEllipse(Rectangle rect, Color color)
+ {
+ impl.FillEllipse((RectangleF)rect, color);
+ }
+ /// <summary>
+ /// Draws a filled e...
[truncated message content] |
|
From: <ka...@us...> - 2009-08-31 05:29:11
|
Revision: 1037
http://agate.svn.sourceforge.net/agate/?rev=1037&view=rev
Author: kanato
Date: 2009-08-31 05:29:04 +0000 (Mon, 31 Aug 2009)
Log Message:
-----------
Delete AgateMDX.
Modified Paths:
--------------
trunk/Build/AgateLib-Windows.xml
trunk/Drivers/AgateSDX/AgateSDX.csproj
Removed Paths:
-------------
trunk/Build/Projects/AgateMDX.proj.xml
trunk/Drivers/AgateMDX/
Modified: trunk/Build/AgateLib-Windows.xml
===================================================================
--- trunk/Build/AgateLib-Windows.xml 2009-08-31 05:26:45 UTC (rev 1036)
+++ trunk/Build/AgateLib-Windows.xml 2009-08-31 05:29:04 UTC (rev 1037)
@@ -25,7 +25,6 @@
<?include file="Projects/AgateOTK.proj.xml" ?>
<?include file="Projects/AgateSDL.proj.xml" ?>
<?include file="Projects/AgateFMOD.proj.xml" ?>
- <?include file="Projects/AgateMDX.proj.xml" ?>
<?include file="Projects/AgateSDX.proj.xml" ?>
<?include file="Projects/Tests.proj.xml" ?>
Deleted: trunk/Build/Projects/AgateMDX.proj.xml
===================================================================
--- trunk/Build/Projects/AgateMDX.proj.xml 2009-08-31 05:26:45 UTC (rev 1036)
+++ trunk/Build/Projects/AgateMDX.proj.xml 2009-08-31 05:29:04 UTC (rev 1037)
@@ -1,35 +0,0 @@
-<Project name="AgateMDX" path="../Drivers/AgateMDX" language="C#" type="Library" frameworkVersion="v3_5">
- <Configuration name="Debug">
- <Options>
- <OutputPath>../../Binaries/Debug/Drivers</OutputPath>
- <AllowUnsafe>true</AllowUnsafe>
- </Options>
- </Configuration>
-
- <Configuration name="Release">
- <Options>
- <OutputPath>../../Binaries/Release/Drivers</OutputPath>
- <AllowUnsafe>true</AllowUnsafe>
- </Options>
- </Configuration>
-
- <Reference name="AgateLib"/>
- <Reference name="AgateLib.WinForms"/>
- <Reference name="Microsoft.DirectX"/>
- <Reference name="Microsoft.DirectX.AudioVideoPlayback"/>
- <Reference name="Microsoft.DirectX.Direct3D"/>
- <Reference name="Microsoft.DirectX.Direct3DX"/>
- <Reference name="Microsoft.DirectX.DirectInput"/>
- <Reference name="Microsoft.DirectX.DirectSound"/>
- <Reference name="System"/>
- <Reference name="System.Core"/>
- <Reference name="System.Data"/>
- <Reference name="System.Drawing"/>
- <Reference name="System.Windows.Forms"/>
- <Reference name="System.Xml"/>
-
- <Files>
- <Match path="." pattern="*.cs" recurse="true"/>
- <Match pattern="*.resx" recurse="true"/>
- </Files>
-</Project>
Modified: trunk/Drivers/AgateSDX/AgateSDX.csproj
===================================================================
--- trunk/Drivers/AgateSDX/AgateSDX.csproj 2009-08-31 05:26:45 UTC (rev 1036)
+++ trunk/Drivers/AgateSDX/AgateSDX.csproj 2009-08-31 05:29:04 UTC (rev 1037)
@@ -3,7 +3,7 @@
<ProjectType>Local</ProjectType>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{E5DEDA0F-18A1-4C64-8343-06B04C7C4C56}</ProjectGuid>
+ <ProjectGuid>{BC71081A-124D-4675-9ECE-92450189EC75}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ApplicationIcon>
@@ -91,12 +91,12 @@
<ItemGroup>
<ProjectReference Include="..\..\AgateLib\AgateLib.csproj">
<Name>AgateLib</Name>
- <Project>{4514ED3F-E5BC-4748-8ABF-87C184DF8489}</Project>
+ <Project>{CCAE9D71-50DF-4B75-91AE-D9552A9A8353}</Project>
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
</ProjectReference>
<ProjectReference Include="..\AgateLib.WinForms\AgateLib.WinForms.csproj">
<Name>AgateLib.WinForms</Name>
- <Project>{A25F0712-B26B-460A-8E37-314D5D1B5959}</Project>
+ <Project>{B874EDC7-C67D-4C45-A2B7-A41FDD898A02}</Project>
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
</ProjectReference>
</ItemGroup>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2009-09-08 22:06:12
|
Revision: 1041
http://agate.svn.sourceforge.net/agate/?rev=1041&view=rev
Author: kanato
Date: 2009-09-08 22:05:56 +0000 (Tue, 08 Sep 2009)
Log Message:
-----------
Make sure to create a depth stencil surface for each render target.
Modified Paths:
--------------
trunk/Drivers/AgateSDX/SDX_DisplayWindow.cs
trunk/Tests/DisplayTests/MultipleWindows/MultipleRenderTargetExample.Designer.cs
trunk/Tests/DisplayTests/MultipleWindows/MultipleRenderTargetExample.resx
Modified: trunk/Drivers/AgateSDX/SDX_DisplayWindow.cs
===================================================================
--- trunk/Drivers/AgateSDX/SDX_DisplayWindow.cs 2009-09-08 17:24:55 UTC (rev 1040)
+++ trunk/Drivers/AgateSDX/SDX_DisplayWindow.cs 2009-09-08 22:05:56 UTC (rev 1041)
@@ -43,6 +43,7 @@
internal SwapChain mSwap;
internal Direct3D.Surface mBackBuffer;
+ internal Direct3D.Surface mBackDepthStencil;
int mChooseWidth;
int mChooseHeight;
@@ -359,6 +360,12 @@
mBackBuffer = mSwap.GetBackBuffer(0);
+ mBackDepthStencil = Direct3D.Surface.CreateDepthStencil(
+ mDisplay.D3D_Device.Device,
+ mChooseWidth, mChooseHeight,
+ mDisplay.DepthStencilFormat,
+ MultisampleType.None, 0, true);
+
}
@@ -459,6 +466,7 @@
public override void BeginRender()
{
mDisplay.D3D_Device.Device.SetRenderTarget(0, mBackBuffer);
+ mDisplay.D3D_Device.Device.DepthStencilSurface = mBackDepthStencil;
mDisplay.D3D_Device.Device.BeginScene();
}
public override void EndRender()
Modified: trunk/Tests/DisplayTests/MultipleWindows/MultipleRenderTargetExample.Designer.cs
===================================================================
--- trunk/Tests/DisplayTests/MultipleWindows/MultipleRenderTargetExample.Designer.cs 2009-09-08 17:24:55 UTC (rev 1040)
+++ trunk/Tests/DisplayTests/MultipleWindows/MultipleRenderTargetExample.Designer.cs 2009-09-08 22:05:56 UTC (rev 1041)
@@ -48,6 +48,9 @@
//
// pictureBox1
//
+ this.pictureBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
this.pictureBox1.Location = new System.Drawing.Point(12, 38);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(136, 32);
Modified: trunk/Tests/DisplayTests/MultipleWindows/MultipleRenderTargetExample.resx
===================================================================
--- trunk/Tests/DisplayTests/MultipleWindows/MultipleRenderTargetExample.resx 2009-09-08 17:24:55 UTC (rev 1040)
+++ trunk/Tests/DisplayTests/MultipleWindows/MultipleRenderTargetExample.resx 2009-09-08 22:05:56 UTC (rev 1041)
@@ -120,7 +120,4 @@
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
- <metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>17, 17</value>
- </metadata>
</root>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2009-10-19 02:44:47
|
Revision: 1055
http://agate.svn.sourceforge.net/agate/?rev=1055&view=rev
Author: kanato
Date: 2009-10-19 02:44:39 +0000 (Mon, 19 Oct 2009)
Log Message:
-----------
Rename AgateApplication to AgateGame.
Modified Paths:
--------------
trunk/Tests/CoreTests/App.cs
trunk/Tests/DisplayTests/BasicSprite.cs
trunk/Tests/DisplayTests/Interpolation.cs
trunk/Tests/Fonts/TextLayout.cs
trunk/Tests/InputTests/InputState/InputStateTester.cs
trunk/Tests/WinFormsTests/Converters.cs
Added Paths:
-----------
trunk/AgateLib/AgateGame.cs
Removed Paths:
-------------
trunk/AgateLib/AgateApplication.cs
Deleted: trunk/AgateLib/AgateApplication.cs
===================================================================
--- trunk/AgateLib/AgateApplication.cs 2009-10-19 02:39:01 UTC (rev 1054)
+++ trunk/AgateLib/AgateApplication.cs 2009-10-19 02:44:39 UTC (rev 1055)
@@ -1,309 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using AgateLib.Geometry;
-using AgateLib.DisplayLib;
-
-namespace AgateLib
-{
- /// <summary>
- /// Application framework for a game. Using AgateApplication can simplify the application
- /// source code and start up.
- /// </summary>
- /// <example>
- /// <code>
- /// using AgateLib;
- ///
- /// namespace MyApplication
- /// {
- /// class MyApp : AgateApplication
- /// {
- /// public static void Main(string[] args)
- /// {
- /// new MyApp().Run(args);
- /// }
- ///
- /// protected override void Initialize()
- /// {
- /// // do any needed initialization, loading of surfaces, etc. here.
- /// }
- /// protected override void Update(double time_ms)
- /// {
- /// // update game logic here.
- /// }
- /// protected override void Render()
- /// {
- /// // render game here.
- /// }
- /// }
- /// }
- /// </code>
- /// </example>
- public class AgateApplication
- {
- DisplayWindow mWindow;
- AppInitParameters mInitParams;
- FontSurface font;
-
- double totalSplashTime = 0;
- bool splashFadeDone = false;
-
- #region --- Run Method ---
-
- /// <summary>
- /// Runs the application.
- /// </summary>
- /// <returns></returns>
- public int Run()
- {
- return Run(null);
- }
- /// <summary>
- /// Runs the application.
- /// </summary>
- /// <param name="args"></param>
- /// <returns></returns>
- public int Run(string[] args)
- {
- using (AgateSetup setup = new AgateSetup(args))
- {
- setup.PreferredDisplay = InitParams.PreferredDisplay;
- setup.PreferredAudio = InitParams.PreferredAudio;
- setup.PreferredInput = InitParams.PreferredInput;
-
- setup.Initialize(
- InitParams.InitializeDisplay,
- InitParams.InitializeAudio,
- InitParams.InitializeJoysticks);
-
- if (setup.WasCanceled)
- return 1;
-
- CreateDisplayWindow();
-
- font = new FontSurface("Arial", 12.0f);
-
- if (InitParams.ShowSplashScreen)
- {
- DoSplash();
- }
-
- Initialize();
-
- while (MainWindow.IsClosed == false)
- {
- Update(Display.DeltaTime);
-
- Display.RenderTarget = mWindow;
- Display.BeginFrame();
-
- Render();
-
- Display.EndFrame();
- Core.KeepAlive();
- }
- }
-
- return 0;
- }
-
- private AppInitParameters InitParams
- {
- get
- {
- mInitParams = mInitParams ?? GetAppInitParameters();
- return mInitParams;
- }
- }
-
- #endregion
- #region --- Initialization ---
-
- /// <summary>
- /// Override Initialize() to do any needed initialization for your application,
- /// such as creating <see cref="AgateLib.DisplayLib.Surface">Surface</see> objects.
- /// </summary>
- protected virtual void Initialize()
- {
- }
-
- private void CreateDisplayWindow()
- {
- CreateWindowParams windp;
-
- if (FullScreen)
- {
- windp = CreateWindowParams.FullScreen(ApplicationTitle,
- WindowSize.Width, WindowSize.Height, 32);
-
- windp.IconFile = InitParams.IconFile;
- }
- else
- {
- windp = CreateWindowParams.Windowed(ApplicationTitle,
- WindowSize.Width, WindowSize.Height,
- InitParams.AllowResize, InitParams.IconFile);
- }
-
- mWindow = new DisplayWindow(windp);
- }
-
- #endregion
- #region --- Rendering and Updating ---
-
- /// <summary>
- /// Override this method to update your game logic.
- /// </summary>
- /// <param name="time_ms">The amount of time that has passed since the last
- /// update, in milliseconds.</param>
- protected virtual void Update(double time_ms)
- {
-
- }
-
- /// <summary>
- /// Override this method to render your game.
- /// Do not call Display.BeginFrame or Display.EndFrame.
- /// </summary>
- /// <remarks>Do not call Display.BeginFrame or Display.EndFrame or change
- /// render targets in this method.</remarks>
- protected virtual void Render()
- {
- RenderSplashScreen();
-
- if (splashFadeDone)
- {
- Surface powered = InternalResources.Data.PoweredBy;
- Size size = powered.SurfaceSize;
-
- int bottom = MainWindow.Height - size.Height;
- int h = font.FontHeight;
-
- font.DisplayAlignment = OriginAlignment.BottomLeft;
- font.Color = Color.Black;
-
- font.DrawText(0, bottom - 2 * h, "Welcome to AgateLib.");
- font.DrawText(0, bottom - h, "Your application framework is ready.");
- font.DrawText(0, bottom, "Override the Render method in order to do your own drawing.");
- }
- }
-
- #endregion
- #region --- Splash Screen ---
-
- private void DoSplash()
- {
- while (UpdateSplashScreen(Display.DeltaTime) == true)
- {
- Display.BeginFrame();
-
- RenderSplashScreen();
-
- Display.EndFrame();
- Core.KeepAlive();
-
- System.Threading.Thread.Sleep(0);
-
- if (MainWindow.IsClosed)
- return;
- }
- }
-
- /// <summary>
- /// Override this method to update the logic for a custom splash screen,
- /// if there are any animations.
- /// Return false to cancel the splash screen and move on.
- /// </summary>
- /// <param name="time_ms"></param>
- protected virtual bool UpdateSplashScreen(double time_ms)
- {
- totalSplashTime += time_ms / 1000.0;
-
- if (totalSplashTime > 3.0)
- return false;
- else
- return true;
- }
- /// <summary>
- /// Override this method to provide a custom splash screen. This method
- /// is called before the Initialize method is called.
- /// </summary>
- /// <param name="time_ms"></param>
- protected virtual void RenderSplashScreen()
- {
- Display.Clear(Color.White);
-
- Surface powered = InternalResources.Data.PoweredBy;
- Size size = powered.SurfaceSize;
-
- int left = (int)(totalSplashTime * size.Width - size.Width)+1;
- Rectangle gradientRect = new Rectangle(left, MainWindow.Height - size.Height,
- size.Width, size.Height);
-
- if (left < 0)
- Display.PushClipRect(gradientRect);
- else if (left > size.Width)
- splashFadeDone = true;
-
- powered.DisplayAlignment = OriginAlignment.BottomLeft;
- powered.Draw(0, MainWindow.Height);
-
- Gradient g = new Gradient(
- Color.FromArgb(0, Color.White),
- Color.White,
- Color.FromArgb(0, Color.White),
- Color.White);
-
- Display.FillRect(gradientRect, g);
- if (left < 0)
- {
- Display.PopClipRect();
- }
- }
-
- #endregion
-
- #region --- Virtual Properties ---
-
- /// <summary>
- /// Override this to set the title of the window which is created.
- /// </summary>
- protected virtual string ApplicationTitle
- {
- get { return "AgateLib Application"; }
- }
- /// <summary>
- /// Gets the initialization parameters.
- /// </summary>
- /// <returns></returns>
- protected virtual AppInitParameters GetAppInitParameters()
- {
- return new AppInitParameters();
- }
-
- protected virtual Size WindowSize { get { return new Size(800, 600); } }
- protected virtual bool FullScreen { get { return false; } }
-
- #endregion
- #region --- Public Properties ---
-
- /// <summary>
- /// Gets the main display window.
- /// </summary>
- public DisplayWindow MainWindow
- {
- get { return mWindow; }
- }
-
- #endregion
-
- /// <summary>
- /// Closes the main window.
- /// </summary>
- public void Quit()
- {
- MainWindow.Dispose();
- }
- }
-}
Copied: trunk/AgateLib/AgateGame.cs (from rev 1049, trunk/AgateLib/AgateApplication.cs)
===================================================================
--- trunk/AgateLib/AgateGame.cs (rev 0)
+++ trunk/AgateLib/AgateGame.cs 2009-10-19 02:44:39 UTC (rev 1055)
@@ -0,0 +1,309 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using AgateLib.Geometry;
+using AgateLib.DisplayLib;
+
+namespace AgateLib
+{
+ /// <summary>
+ /// Application framework for a game. Using AgateGame can simplify the application
+ /// source code and start up.
+ /// </summary>
+ /// <example>
+ /// <code>
+ /// using AgateLib;
+ ///
+ /// namespace MyApplication
+ /// {
+ /// class MyApp : AgateGame
+ /// {
+ /// public static void Main(string[] args)
+ /// {
+ /// new MyApp().Run(args);
+ /// }
+ ///
+ /// protected override void Initialize()
+ /// {
+ /// // do any needed initialization, loading of surfaces, etc. here.
+ /// }
+ /// protected override void Update(double time_ms)
+ /// {
+ /// // update game logic here.
+ /// }
+ /// protected override void Render()
+ /// {
+ /// // render game here.
+ /// }
+ /// }
+ /// }
+ /// </code>
+ /// </example>
+ public class AgateGame
+ {
+ DisplayWindow mWindow;
+ AppInitParameters mInitParams;
+ FontSurface font;
+
+ double totalSplashTime = 0;
+ bool splashFadeDone = false;
+
+ #region --- Run Method ---
+
+ /// <summary>
+ /// Runs the application.
+ /// </summary>
+ /// <returns></returns>
+ public int Run()
+ {
+ return Run(null);
+ }
+ /// <summary>
+ /// Runs the application.
+ /// </summary>
+ /// <param name="args"></param>
+ /// <returns></returns>
+ public int Run(string[] args)
+ {
+ using (AgateSetup setup = new AgateSetup(args))
+ {
+ setup.PreferredDisplay = InitParams.PreferredDisplay;
+ setup.PreferredAudio = InitParams.PreferredAudio;
+ setup.PreferredInput = InitParams.PreferredInput;
+
+ setup.Initialize(
+ InitParams.InitializeDisplay,
+ InitParams.InitializeAudio,
+ InitParams.InitializeJoysticks);
+
+ if (setup.WasCanceled)
+ return 1;
+
+ CreateDisplayWindow();
+
+ font = new FontSurface("Arial", 12.0f);
+
+ if (InitParams.ShowSplashScreen)
+ {
+ DoSplash();
+ }
+
+ Initialize();
+
+ while (MainWindow.IsClosed == false)
+ {
+ Update(Display.DeltaTime);
+
+ Display.RenderTarget = mWindow;
+ Display.BeginFrame();
+
+ Render();
+
+ Display.EndFrame();
+ Core.KeepAlive();
+ }
+ }
+
+ return 0;
+ }
+
+ private AppInitParameters InitParams
+ {
+ get
+ {
+ mInitParams = mInitParams ?? GetAppInitParameters();
+ return mInitParams;
+ }
+ }
+
+ #endregion
+ #region --- Initialization ---
+
+ /// <summary>
+ /// Override Initialize() to do any needed initialization for your application,
+ /// such as creating <see cref="AgateLib.DisplayLib.Surface">Surface</see> objects.
+ /// </summary>
+ protected virtual void Initialize()
+ {
+ }
+
+ private void CreateDisplayWindow()
+ {
+ CreateWindowParams windp;
+
+ if (FullScreen)
+ {
+ windp = CreateWindowParams.FullScreen(ApplicationTitle,
+ WindowSize.Width, WindowSize.Height, 32);
+
+ windp.IconFile = InitParams.IconFile;
+ }
+ else
+ {
+ windp = CreateWindowParams.Windowed(ApplicationTitle,
+ WindowSize.Width, WindowSize.Height,
+ InitParams.AllowResize, InitParams.IconFile);
+ }
+
+ mWindow = new DisplayWindow(windp);
+ }
+
+ #endregion
+ #region --- Rendering and Updating ---
+
+ /// <summary>
+ /// Override this method to update your game logic.
+ /// </summary>
+ /// <param name="time_ms">The amount of time that has passed since the last
+ /// update, in milliseconds.</param>
+ protected virtual void Update(double time_ms)
+ {
+
+ }
+
+ /// <summary>
+ /// Override this method to render your game.
+ /// Do not call Display.BeginFrame or Display.EndFrame.
+ /// </summary>
+ /// <remarks>Do not call Display.BeginFrame or Display.EndFrame or change
+ /// render targets in this method.</remarks>
+ protected virtual void Render()
+ {
+ RenderSplashScreen();
+
+ if (splashFadeDone)
+ {
+ Surface powered = InternalResources.Data.PoweredBy;
+ Size size = powered.SurfaceSize;
+
+ int bottom = MainWindow.Height - size.Height;
+ int h = font.FontHeight;
+
+ font.DisplayAlignment = OriginAlignment.BottomLeft;
+ font.Color = Color.Black;
+
+ font.DrawText(0, bottom - 2 * h, "Welcome to AgateLib.");
+ font.DrawText(0, bottom - h, "Your application framework is ready.");
+ font.DrawText(0, bottom, "Override the Render method in order to do your own drawing.");
+ }
+ }
+
+ #endregion
+ #region --- Splash Screen ---
+
+ private void DoSplash()
+ {
+ while (UpdateSplashScreen(Display.DeltaTime) == true)
+ {
+ Display.BeginFrame();
+
+ RenderSplashScreen();
+
+ Display.EndFrame();
+ Core.KeepAlive();
+
+ System.Threading.Thread.Sleep(0);
+
+ if (MainWindow.IsClosed)
+ return;
+ }
+ }
+
+ /// <summary>
+ /// Override this method to update the logic for a custom splash screen,
+ /// if there are any animations.
+ /// Return false to cancel the splash screen and move on.
+ /// </summary>
+ /// <param name="time_ms"></param>
+ protected virtual bool UpdateSplashScreen(double time_ms)
+ {
+ totalSplashTime += time_ms / 1000.0;
+
+ if (totalSplashTime > 3.0)
+ return false;
+ else
+ return true;
+ }
+ /// <summary>
+ /// Override this method to provide a custom splash screen. This method
+ /// is called before the Initialize method is called.
+ /// </summary>
+ /// <param name="time_ms"></param>
+ protected virtual void RenderSplashScreen()
+ {
+ Display.Clear(Color.White);
+
+ Surface powered = InternalResources.Data.PoweredBy;
+ Size size = powered.SurfaceSize;
+
+ int left = (int)(totalSplashTime * size.Width - size.Width)+1;
+ Rectangle gradientRect = new Rectangle(left, MainWindow.Height - size.Height,
+ size.Width, size.Height);
+
+ if (left < 0)
+ Display.PushClipRect(gradientRect);
+ else if (left > size.Width)
+ splashFadeDone = true;
+
+ powered.DisplayAlignment = OriginAlignment.BottomLeft;
+ powered.Draw(0, MainWindow.Height);
+
+ Gradient g = new Gradient(
+ Color.FromArgb(0, Color.White),
+ Color.White,
+ Color.FromArgb(0, Color.White),
+ Color.White);
+
+ Display.FillRect(gradientRect, g);
+ if (left < 0)
+ {
+ Display.PopClipRect();
+ }
+ }
+
+ #endregion
+
+ #region --- Virtual Properties ---
+
+ /// <summary>
+ /// Override this to set the title of the window which is created.
+ /// </summary>
+ protected virtual string ApplicationTitle
+ {
+ get { return "AgateLib Application"; }
+ }
+ /// <summary>
+ /// Gets the initialization parameters.
+ /// </summary>
+ /// <returns></returns>
+ protected virtual AppInitParameters GetAppInitParameters()
+ {
+ return new AppInitParameters();
+ }
+
+ protected virtual Size WindowSize { get { return new Size(800, 600); } }
+ protected virtual bool FullScreen { get { return false; } }
+
+ #endregion
+ #region --- Public Properties ---
+
+ /// <summary>
+ /// Gets the main display window.
+ /// </summary>
+ public DisplayWindow MainWindow
+ {
+ get { return mWindow; }
+ }
+
+ #endregion
+
+ /// <summary>
+ /// Closes the main window.
+ /// </summary>
+ public void Quit()
+ {
+ MainWindow.Dispose();
+ }
+ }
+}
Modified: trunk/Tests/CoreTests/App.cs
===================================================================
--- trunk/Tests/CoreTests/App.cs 2009-10-19 02:39:01 UTC (rev 1054)
+++ trunk/Tests/CoreTests/App.cs 2009-10-19 02:44:39 UTC (rev 1055)
@@ -5,7 +5,7 @@
namespace Tests.AppTester
{
- class App : AgateApplication, IAgateTest
+ class App : AgateGame, IAgateTest
{
public void Main(string[] args)
{
Modified: trunk/Tests/DisplayTests/BasicSprite.cs
===================================================================
--- trunk/Tests/DisplayTests/BasicSprite.cs 2009-10-19 02:39:01 UTC (rev 1054)
+++ trunk/Tests/DisplayTests/BasicSprite.cs 2009-10-19 02:44:39 UTC (rev 1055)
@@ -9,7 +9,7 @@
namespace Tests.DisplayTests
{
- class BasicSprite : AgateApplication, IAgateTest
+ class BasicSprite : AgateGame, IAgateTest
{
#region IAgateTest Members
Modified: trunk/Tests/DisplayTests/Interpolation.cs
===================================================================
--- trunk/Tests/DisplayTests/Interpolation.cs 2009-10-19 02:39:01 UTC (rev 1054)
+++ trunk/Tests/DisplayTests/Interpolation.cs 2009-10-19 02:44:39 UTC (rev 1055)
@@ -8,7 +8,7 @@
namespace Tests.DisplayTests
{
- class Interpolation : AgateLib.AgateApplication, IAgateTest
+ class Interpolation : AgateLib.AgateGame, IAgateTest
{
#region IAgateTest Members
Modified: trunk/Tests/Fonts/TextLayout.cs
===================================================================
--- trunk/Tests/Fonts/TextLayout.cs 2009-10-19 02:39:01 UTC (rev 1054)
+++ trunk/Tests/Fonts/TextLayout.cs 2009-10-19 02:44:39 UTC (rev 1055)
@@ -7,7 +7,7 @@
namespace Tests.Fonts.TextLayout
{
- class TextLayout : AgateApplication, IAgateTest
+ class TextLayout : AgateGame, IAgateTest
{
/// <summary>
/// The main entry point for the application.
Modified: trunk/Tests/InputTests/InputState/InputStateTester.cs
===================================================================
--- trunk/Tests/InputTests/InputState/InputStateTester.cs 2009-10-19 02:39:01 UTC (rev 1054)
+++ trunk/Tests/InputTests/InputState/InputStateTester.cs 2009-10-19 02:44:39 UTC (rev 1055)
@@ -10,7 +10,7 @@
namespace Tests.InputStateTester
{
- class InputStateTester : AgateApplication
+ class InputStateTester : AgateGame
{
#region IAgateTest Members
Modified: trunk/Tests/WinFormsTests/Converters.cs
===================================================================
--- trunk/Tests/WinFormsTests/Converters.cs 2009-10-19 02:39:01 UTC (rev 1054)
+++ trunk/Tests/WinFormsTests/Converters.cs 2009-10-19 02:44:39 UTC (rev 1055)
@@ -9,7 +9,7 @@
namespace Tests.WinFormsTests
{
- class Converters : AgateApplication, IAgateTest
+ class Converters : AgateGame, IAgateTest
{
public string Name
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2009-10-19 02:57:26
|
Revision: 1057
http://agate.svn.sourceforge.net/agate/?rev=1057&view=rev
Author: kanato
Date: 2009-10-19 02:57:18 +0000 (Mon, 19 Oct 2009)
Log Message:
-----------
Move error reporting stuff to Core.ErrorReporting class.
Modified Paths:
--------------
trunk/AgateLib/Core.cs
trunk/AgateLib/Drivers/Registrar.cs
trunk/AgateLib/Utility/FileSystemProvider.cs
trunk/Drivers/AgateLib.WinForms/FormUtil.cs
trunk/Drivers/AgateSDX/AgateSDX.csproj
trunk/Tests/CoreTests/ErrorReport/frmErrorReport.cs
Modified: trunk/AgateLib/Core.cs
===================================================================
--- trunk/AgateLib/Core.cs 2009-10-19 02:50:27 UTC (rev 1056)
+++ trunk/AgateLib/Core.cs 2009-10-19 02:57:18 UTC (rev 1057)
@@ -72,7 +72,7 @@
None,
/// <summary>
- /// Outputs comments using Core.ReportError with a comment level.
+ /// Outputs comments using Core.Report with a comment level.
/// </summary>
Comment,
@@ -90,9 +90,210 @@
private static bool mAutoPause = false;
private static bool mIsActive = true;
private static bool mInititalized = false;
+
+ #region --- Error Reporting ---
+
private static CrossPlatformDebugLevel mCrossPlatform = CrossPlatformDebugLevel.Comment;
private static System.Diagnostics.Stopwatch mTime = Stopwatch.StartNew();
+ public static class ErrorReporting
+ {
+
+ private static string mErrorFile = "errorlog.txt";
+ private static bool mAutoStackTrace = false;
+ private static bool mWroteHeader = false;
+
+ /// <summary>
+ /// Gets or sets the file name to which errors are recorded. Defaults
+ /// to "errorlog.txt"
+ /// </summary>
+ public static string ErrorFile
+ {
+ get { return mErrorFile; }
+ set { mErrorFile = value; }
+ }
+
+ /// <summary>
+ /// Gets or sets whether or not a stack trace is automatically used.
+ /// </summary>
+ /// <example>
+ /// You may find it useful to turn this on during a debug build, and
+ /// then turn if off when building the release version. The following
+ /// code accomplishes that.
+ /// <code>
+ /// #if _DEBUG
+ /// AgateLib.Core.AutoStackTrace = true;
+ /// #endif
+ /// </code>
+ /// </example>
+ public static bool AutoStackTrace
+ {
+ get { return mAutoStackTrace; }
+ set { mAutoStackTrace = value; }
+ }
+
+ /// <summary>
+ /// Gets or sets a value indicating how AgateLib should deal with issues that may
+ /// cause problems when porting to another platform.
+ /// </summary>
+ public static CrossPlatformDebugLevel CrossPlatformDebugLevel
+ {
+ get { return mCrossPlatform; }
+ set { mCrossPlatform = value; }
+ }
+
+ /// <summary>
+ /// Saves an error message to the ErrorFile.
+ /// Outputs a stack trace and shows a dialog box if the ErrorLevel
+ /// is Bug or Fatal.
+ /// </summary>
+ /// <param name="message">A message to print out before the
+ /// exception's message.</param>
+ /// <param name="e"></param>
+ /// <param name="level"></param>
+ public static void Report(ErrorLevel level, string message, Exception e)
+ {
+
+ switch (level)
+ {
+ case ErrorLevel.Bug:
+ case ErrorLevel.Fatal:
+ Report(level, message, e, true, true);
+ break;
+
+ case ErrorLevel.Comment:
+ case ErrorLevel.Warning:
+ Report(level, message, e, AutoStackTrace, false);
+ break;
+ }
+ }
+
+ /// <summary>
+ /// Saves an error message to the ErrorFile.
+ /// </summary>
+ /// <param name="message">A message to print out before the
+ /// exception's message.</param>
+ /// <param name="e"></param>
+ /// <param name="level"></param>
+ /// <param name="printStackTrace">Bool value indicating whether or not
+ /// a stack trace should be written out. </param>
+ /// <param name="showDialog">Bool value indicating whether or not a
+ /// message box should pop up with an OK button, informing the user about the
+ /// error. If false, the error is silently written to the ErrorFile.</param>
+ public static void Report(ErrorLevel level, string message, Exception e, bool printStackTrace, bool showDialog)
+ {
+ StringBuilder b = new StringBuilder();
+
+ b.Append(LevelText(level));
+ b.Append(": ");
+ b.AppendLine(message);
+
+ if (e != null)
+ {
+ b.Append(e.GetType().Name);
+ b.Append(": ");
+ b.AppendLine(e.Message);
+
+ if (printStackTrace)
+ b.AppendLine(e.StackTrace);
+ }
+
+ b.AppendLine();
+
+ string text = b.ToString();
+
+ // show the error dialog if AgateWinForms.dll is present.
+ if (showDialog && Drivers.Registrar.WinForms != null)
+ {
+ Drivers.Registrar.WinForms.ShowErrorDialog(message, e, level);
+ }
+
+ using (StreamWriter filewriter = OpenErrorFile())
+ {
+ if (filewriter != null)
+ filewriter.Write(text);
+ }
+
+ Console.Write(text);
+ }
+
+ /// <summary>
+ /// Reports a cross platform error, according to the setting of Core.CrossPlatformDebugLevel.
+ /// </summary>
+ /// <param name="message"></param>
+ public static void ReportCrossPlatformError(string message)
+ {
+ switch (CrossPlatformDebugLevel)
+ {
+ case CrossPlatformDebugLevel.Comment:
+ Report(ErrorLevel.Warning, message, null);
+ break;
+
+ case CrossPlatformDebugLevel.Exception:
+ throw new AgateCrossPlatformException(message);
+
+ }
+ }
+
+ private static StreamWriter OpenErrorFile()
+ {
+ try
+ {
+ if (mWroteHeader == true)
+ {
+ FileStream stream = File.Open(ErrorFile, FileMode.Append, FileAccess.Write);
+
+ return new StreamWriter(stream);
+ }
+ else
+ {
+ FileStream stream = File.Open(ErrorFile, FileMode.Create, FileAccess.Write);
+ StreamWriter writer = new StreamWriter(stream);
+
+ WriteHeader(writer);
+
+ mWroteHeader = true;
+
+ return writer;
+ }
+ }
+ catch (Exception e)
+ {
+ string message = "Could not open file " + ErrorFile + ".\r\n" +
+ "Error message: " + e.Message + "\r\n" +
+ "Errors cannot be saved to a text file.";
+
+ Console.WriteLine(message);
+ System.Diagnostics.Debug.WriteLine(message);
+ System.Diagnostics.Trace.WriteLine(message);
+
+ return null;
+ }
+ }
+
+ private static void WriteHeader(StreamWriter writer)
+ {
+ writer.WriteLine("Error Log started " + DateTime.Now.ToString());
+ writer.WriteLine("");
+ }
+ private static string LevelText(ErrorLevel level)
+ {
+ switch (level)
+ {
+ case ErrorLevel.Comment: return "COMMENT";
+ case ErrorLevel.Warning: return "WARNING";
+ case ErrorLevel.Fatal: return "ERROR";
+ case ErrorLevel.Bug: return "BUG";
+ }
+
+ return "ERROR";
+ }
+
+
+ }
+
+ #endregion
+
static Core()
{
@@ -203,201 +404,7 @@
}
}
- #region --- Error Reporting ---
-
- private static string mErrorFile = "errorlog.txt";
- private static bool mAutoStackTrace = false;
- private static bool mWroteHeader = false;
-
/// <summary>
- /// Gets or sets the file name to which errors are recorded. Defaults
- /// to "errorlog.txt"
- /// </summary>
- public static string ErrorFile
- {
- get { return Core.mErrorFile; }
- set { Core.mErrorFile = value; }
- }
-
- /// <summary>
- /// Gets or sets whether or not a stack trace is automatically used.
- /// </summary>
- /// <example>
- /// You may find it useful to turn this on during a debug build, and
- /// then turn if off when building the release version. The following
- /// code accomplishes that.
- /// <code>
- /// #if _DEBUG
- /// AgateLib.Core.AutoStackTrace = true;
- /// #endif
- /// </code>
- /// </example>
- public static bool AutoStackTrace
- {
- get { return Core.mAutoStackTrace; }
- set { Core.mAutoStackTrace = value; }
- }
-
- /// <summary>
- /// Saves an error message to the ErrorFile.
- /// Outputs a stack trace and shows a dialog box if the ErrorLevel
- /// is Bug or Fatal.
- /// </summary>
- /// <param name="message">A message to print out before the
- /// exception's message.</param>
- /// <param name="e"></param>
- /// <param name="level"></param>
- public static void ReportError(ErrorLevel level, string message, Exception e)
- {
-
- switch (level)
- {
- case ErrorLevel.Bug:
- case ErrorLevel.Fatal:
- ReportError(level, message, e, true, true);
- break;
-
- case ErrorLevel.Comment:
- case ErrorLevel.Warning:
- ReportError(level, message, e, AutoStackTrace, false);
- break;
- }
- }
-
- /// <summary>
- /// Saves an error message to the ErrorFile.
- /// </summary>
- /// <param name="message">A message to print out before the
- /// exception's message.</param>
- /// <param name="e"></param>
- /// <param name="level"></param>
- /// <param name="printStackTrace">Bool value indicating whether or not
- /// a stack trace should be written out. </param>
- /// <param name="showDialog">Bool value indicating whether or not a
- /// message box should pop up with an OK button, informing the user about the
- /// error. If false, the error is silently written to the ErrorFile.</param>
- public static void ReportError(ErrorLevel level, string message, Exception e, bool printStackTrace, bool showDialog)
- {
- StringBuilder b = new StringBuilder();
-
- b.Append(LevelText(level));
- b.Append(": ");
- b.AppendLine(message);
-
- if (e != null)
- {
- b.Append(e.GetType().Name);
- b.Append(": ");
- b.AppendLine(e.Message);
-
- if (printStackTrace)
- b.AppendLine(e.StackTrace);
- }
-
- b.AppendLine();
-
- string text = b.ToString();
-
- // show the error dialog if AgateWinForms.dll is present.
- if (showDialog && Drivers.Registrar.WinForms != null)
- {
- Drivers.Registrar.WinForms.ShowErrorDialog(message, e, level);
- }
-
- using (StreamWriter filewriter = OpenErrorFile())
- {
- if (filewriter != null)
- filewriter.Write(text);
- }
-
- Console.Write(text);
- }
-
- private static StreamWriter OpenErrorFile()
- {
- try
- {
- if (mWroteHeader == true)
- {
- FileStream stream = File.Open(ErrorFile, FileMode.Append, FileAccess.Write);
-
- return new StreamWriter(stream);
- }
- else
- {
- FileStream stream = File.Open(ErrorFile, FileMode.Create, FileAccess.Write);
- StreamWriter writer = new StreamWriter(stream);
-
- WriteHeader(writer);
-
- mWroteHeader = true;
-
- return writer;
- }
- }
- catch (Exception e)
- {
- string message = "Could not open file " + ErrorFile + ".\r\n" +
- "Error message: " + e.Message + "\r\n" +
- "Errors cannot be saved to a text file.";
-
- Console.WriteLine(message);
- System.Diagnostics.Debug.WriteLine(message);
- System.Diagnostics.Trace.WriteLine(message);
-
- return null;
- }
- }
-
- private static void WriteHeader(StreamWriter writer)
- {
- writer.WriteLine("Error Log started " + DateTime.Now.ToString());
- writer.WriteLine("");
- }
- private static string LevelText(ErrorLevel level)
- {
- switch (level)
- {
- case ErrorLevel.Comment: return "COMMENT";
- case ErrorLevel.Warning: return "WARNING";
- case ErrorLevel.Fatal: return "ERROR";
- case ErrorLevel.Bug: return "BUG";
- }
-
- return "ERROR";
- }
-
- /// <summary>
- /// Gets or sets a value indicating how AgateLib should deal with issues that may
- /// cause problems when porting to another platform.
- /// </summary>
- public static CrossPlatformDebugLevel CrossPlatformDebugLevel
- {
- get { return mCrossPlatform; }
- set { mCrossPlatform = value; }
- }
- /// <summary>
- /// Reports a cross platform error, according to the setting of Core.CrossPlatformDebugLevel.
- /// </summary>
- /// <param name="message"></param>
- public static void ReportCrossPlatformError(string message)
- {
- switch (CrossPlatformDebugLevel)
- {
- case CrossPlatformDebugLevel.Comment:
- ReportError(ErrorLevel.Warning, message, null);
- break;
-
- case CrossPlatformDebugLevel.Exception:
- throw new AgateCrossPlatformException(message);
-
- }
- }
-
-
- #endregion
-
- /// <summary>
/// returns time since agatelib was initialized in milliseconds.
/// </summary>
/// <returns></returns>
Modified: trunk/AgateLib/Drivers/Registrar.cs
===================================================================
--- trunk/AgateLib/Drivers/Registrar.cs 2009-10-19 02:50:27 UTC (rev 1056)
+++ trunk/AgateLib/Drivers/Registrar.cs 2009-10-19 02:57:18 UTC (rev 1057)
@@ -120,7 +120,7 @@
break;
default:
- Core.ReportError(ErrorLevel.Warning, string.Format(
+ Core.ErrorReporting.Report(ErrorLevel.Warning, string.Format(
"Could not interpret DriverType returned by type {0} in assembly {1}.",
info.DriverTypeName, info.AssemblyFile), null);
@@ -183,7 +183,7 @@
Environment.OSVersion.Platform == (PlatformID)128) &&
System.IO.Path.GetFileName(file).ToLower().Contains("agatemdx.dll"))
{
- Core.ReportError(ErrorLevel.Comment,
+ Core.ErrorReporting.Report(ErrorLevel.Comment,
"DirectX not supported on Linux. Remove "
+ System.IO.Path.GetFileName(file) +
" to eliminate this message.", null);
@@ -413,7 +413,7 @@
private static Assembly LoadAssemblyLoadFrom(AgateDriverInfo info)
{
- Core.ReportError(ErrorLevel.Warning,
+ Core.ErrorReporting.Report(ErrorLevel.Warning,
string.Format("Assembly {0} was loaded in the LoadFrom context. Move it to the application directory to load in the Load context.", info.AssemblyName), null);
return Assembly.LoadFrom(info.AssemblyFile);
}
Modified: trunk/AgateLib/Utility/FileSystemProvider.cs
===================================================================
--- trunk/AgateLib/Utility/FileSystemProvider.cs 2009-10-19 02:50:27 UTC (rev 1056)
+++ trunk/AgateLib/Utility/FileSystemProvider.cs 2009-10-19 02:57:18 UTC (rev 1057)
@@ -87,7 +87,7 @@
if (File.Exists(path) == false)
return null;
- if (Core.CrossPlatformDebugLevel != CrossPlatformDebugLevel.Comment)
+ if (Core.ErrorReporting.CrossPlatformDebugLevel != CrossPlatformDebugLevel.Comment)
{
string[] files = Directory.GetFiles(mPath);
string badMatch = "";
@@ -110,12 +110,12 @@
}
if (matchCount > 1)
- Core.ReportCrossPlatformError(
+ Core.ErrorReporting.ReportCrossPlatformError(
"The file " + filename + " located in directory \"" + mPath + "\"" +
" has multiple case-insensitive matches. This will present problems " +
"when porting to an operating system with a case-insensitive filesystem (eg. Windows, MacOS).");
if (badCaseMatch)
- Core.ReportCrossPlatformError(
+ Core.ErrorReporting.ReportCrossPlatformError(
"The search file " + filename + " does not have an exact case match in directory \"" +
mPath + "\". The closest match was " + badMatch +
". This will present problems when porting to an operating system " +
@@ -146,7 +146,7 @@
string text = b.ToString();
- Core.ReportCrossPlatformError(text);
+ Core.ErrorReporting.ReportCrossPlatformError(text);
}
/// <summary>
Modified: trunk/Drivers/AgateLib.WinForms/FormUtil.cs
===================================================================
--- trunk/Drivers/AgateLib.WinForms/FormUtil.cs 2009-10-19 02:50:27 UTC (rev 1056)
+++ trunk/Drivers/AgateLib.WinForms/FormUtil.cs 2009-10-19 02:57:18 UTC (rev 1057)
@@ -111,7 +111,7 @@
}
catch (System.Resources.MissingManifestResourceException e)
{
- AgateLib.Core.ReportError(ErrorLevel.Warning,
+ AgateLib.Core.ErrorReporting.Report(ErrorLevel.Warning,
"Caught a MissingManifestResourceException when looking for the AgateLib Icon. " +
"This indicates a problem with the way resources were embedded into AgateLib.WinForms.dll when it was built.",
e);
Modified: trunk/Drivers/AgateSDX/AgateSDX.csproj
===================================================================
--- trunk/Drivers/AgateSDX/AgateSDX.csproj 2009-10-19 02:50:27 UTC (rev 1056)
+++ trunk/Drivers/AgateSDX/AgateSDX.csproj 2009-10-19 02:57:18 UTC (rev 1057)
@@ -3,7 +3,7 @@
<ProjectType>Local</ProjectType>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{BC71081A-124D-4675-9ECE-92450189EC75}</ProjectGuid>
+ <ProjectGuid>{489A4486-7435-4949-BECB-136E6288C35D}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ApplicationIcon>
@@ -89,18 +89,6 @@
</Reference>
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="..\..\AgateLib\AgateLib.csproj">
- <Name>AgateLib</Name>
- <Project>{CCAE9D71-50DF-4B75-91AE-D9552A9A8353}</Project>
- <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
- </ProjectReference>
- <ProjectReference Include="..\AgateLib.WinForms\AgateLib.WinForms.csproj">
- <Name>AgateLib.WinForms</Name>
- <Project>{B874EDC7-C67D-4C45-A2B7-A41FDD898A02}</Project>
- <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
<Compile Include="D3DDevice.cs">
<SubType>Code</SubType>
</Compile>
@@ -164,6 +152,16 @@
<DependentUpon>frmFullScreen.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\AgateLib\AgateLib.csproj">
+ <Project>{5BE2B3C1-F0A0-4732-9499-41AE50CC4C48}</Project>
+ <Name>AgateLib</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\AgateLib.WinForms\AgateLib.WinForms.csproj">
+ <Project>{CD71274E-9AF0-42FC-ADC8-FE35D3274C61}</Project>
+ <Name>AgateLib.WinForms</Name>
+ </ProjectReference>
+ </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
<PropertyGroup>
<PreBuildEvent>
Modified: trunk/Tests/CoreTests/ErrorReport/frmErrorReport.cs
===================================================================
--- trunk/Tests/CoreTests/ErrorReport/frmErrorReport.cs 2009-10-19 02:50:27 UTC (rev 1056)
+++ trunk/Tests/CoreTests/ErrorReport/frmErrorReport.cs 2009-10-19 02:57:18 UTC (rev 1057)
@@ -27,7 +27,7 @@
private static void GenerateErrors()
{
- AgateLib.Core.ReportError(ErrorLevel.Comment, "Test comment about application condition", null);
+ AgateLib.Core.ErrorReporting.Report(ErrorLevel.Comment, "Test comment about application condition", null);
try
{
@@ -35,7 +35,7 @@
}
catch (Exception e)
{
- AgateLib.Core.ReportError(ErrorLevel.Warning, "File not there.", e);
+ AgateLib.Core.ErrorReporting.Report(ErrorLevel.Warning, "File not there.", e);
}
try
@@ -44,7 +44,7 @@
}
catch (Exception e)
{
- AgateLib.Core.ReportError(ErrorLevel.Fatal, "Missing file", e);
+ AgateLib.Core.ErrorReporting.Report(ErrorLevel.Fatal, "Missing file", e);
}
try
@@ -53,7 +53,7 @@
}
catch (Exception e)
{
- AgateLib.Core.ReportError(ErrorLevel.Bug, "Oops, a bug.", e);
+ AgateLib.Core.ErrorReporting.Report(ErrorLevel.Bug, "Oops, a bug.", e);
}
// unhandled error
@@ -62,7 +62,7 @@
private void FillTextBox()
{
- System.IO.TextReader r = new System.IO.StreamReader(AgateLib.Core.ErrorFile);
+ System.IO.TextReader r = new System.IO.StreamReader(AgateLib.Core.ErrorReporting.ErrorFile);
textBox1.Text = r.ReadToEnd();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2009-10-19 17:07:16
|
Revision: 1060
http://agate.svn.sourceforge.net/agate/?rev=1060&view=rev
Author: kanato
Date: 2009-10-19 17:07:10 +0000 (Mon, 19 Oct 2009)
Log Message:
-----------
Change versions to 0.3.2.
Modified Paths:
--------------
trunk/AgateLib/Properties/AssemblyInfo.cs
trunk/Drivers/AgateDrawing/Properties/AssemblyInfo.cs
trunk/Drivers/AgateFMOD/Properties/AssemblyInfo.cs
trunk/Drivers/AgateLib.WinForms/Properties/AssemblyInfo.cs
trunk/Drivers/AgateOTK/Properties/AssemblyInfo.cs
trunk/Drivers/AgateSDL/Properties/AssemblyInfo.cs
trunk/Drivers/AgateSDX/Properties/AssemblyInfo.cs
trunk/Tests/Properties/AssemblyInfo.cs
trunk/Tools/FontCreator/FontCreator.cs
Modified: trunk/AgateLib/Properties/AssemblyInfo.cs
===================================================================
--- trunk/AgateLib/Properties/AssemblyInfo.cs 2009-10-19 16:22:00 UTC (rev 1059)
+++ trunk/AgateLib/Properties/AssemblyInfo.cs 2009-10-19 17:07:10 UTC (rev 1060)
@@ -51,6 +51,6 @@
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.3.1.0")]
-[assembly: AssemblyFileVersion("0.3.1.0")]
+[assembly: AssemblyVersion("0.3.2.0")]
+[assembly: AssemblyFileVersion("0.3.2.0")]
[assembly: NeutralResourcesLanguageAttribute("en")]
Modified: trunk/Drivers/AgateDrawing/Properties/AssemblyInfo.cs
===================================================================
--- trunk/Drivers/AgateDrawing/Properties/AssemblyInfo.cs 2009-10-19 16:22:00 UTC (rev 1059)
+++ trunk/Drivers/AgateDrawing/Properties/AssemblyInfo.cs 2009-10-19 17:07:10 UTC (rev 1060)
@@ -48,5 +48,5 @@
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.3.1.0")]
-[assembly: AssemblyFileVersion("0.3.1.0")]
+[assembly: AssemblyVersion("0.3.2.0")]
+[assembly: AssemblyFileVersion("0.3.2.0")]
Modified: trunk/Drivers/AgateFMOD/Properties/AssemblyInfo.cs
===================================================================
--- trunk/Drivers/AgateFMOD/Properties/AssemblyInfo.cs 2009-10-19 16:22:00 UTC (rev 1059)
+++ trunk/Drivers/AgateFMOD/Properties/AssemblyInfo.cs 2009-10-19 17:07:10 UTC (rev 1060)
@@ -49,5 +49,5 @@
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
-[assembly: AssemblyVersion("0.3.1.0")]
-[assembly: AssemblyFileVersion("0.3.1.0")]
+[assembly: AssemblyVersion("0.3.2.0")]
+[assembly: AssemblyFileVersion("0.3.2.0")]
Modified: trunk/Drivers/AgateLib.WinForms/Properties/AssemblyInfo.cs
===================================================================
--- trunk/Drivers/AgateLib.WinForms/Properties/AssemblyInfo.cs 2009-10-19 16:22:00 UTC (rev 1059)
+++ trunk/Drivers/AgateLib.WinForms/Properties/AssemblyInfo.cs 2009-10-19 17:07:10 UTC (rev 1060)
@@ -49,5 +49,5 @@
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
-[assembly: AssemblyVersion("0.3.1.0")]
-[assembly: AssemblyFileVersion("0.3.1.0")]
+[assembly: AssemblyVersion("0.3.2.0")]
+[assembly: AssemblyFileVersion("0.3.2.0")]
Modified: trunk/Drivers/AgateOTK/Properties/AssemblyInfo.cs
===================================================================
--- trunk/Drivers/AgateOTK/Properties/AssemblyInfo.cs 2009-10-19 16:22:00 UTC (rev 1059)
+++ trunk/Drivers/AgateOTK/Properties/AssemblyInfo.cs 2009-10-19 17:07:10 UTC (rev 1060)
@@ -47,5 +47,5 @@
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.3.1.0")]
-[assembly: AssemblyFileVersion("0.3.1.0")]
+[assembly: AssemblyVersion("0.3.2.0")]
+[assembly: AssemblyFileVersion("0.3.2.0")]
Modified: trunk/Drivers/AgateSDL/Properties/AssemblyInfo.cs
===================================================================
--- trunk/Drivers/AgateSDL/Properties/AssemblyInfo.cs 2009-10-19 16:22:00 UTC (rev 1059)
+++ trunk/Drivers/AgateSDL/Properties/AssemblyInfo.cs 2009-10-19 17:07:10 UTC (rev 1060)
@@ -49,5 +49,5 @@
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
-[assembly: AssemblyVersion("0.3.1.0")]
-[assembly: AssemblyFileVersion("0.3.1.0")]
+[assembly: AssemblyVersion("0.3.2.0")]
+[assembly: AssemblyFileVersion("0.3.2.0")]
Modified: trunk/Drivers/AgateSDX/Properties/AssemblyInfo.cs
===================================================================
--- trunk/Drivers/AgateSDX/Properties/AssemblyInfo.cs 2009-10-19 16:22:00 UTC (rev 1059)
+++ trunk/Drivers/AgateSDX/Properties/AssemblyInfo.cs 2009-10-19 17:07:10 UTC (rev 1060)
@@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AssemblyVersion("0.3.2.0")]
+[assembly: AssemblyFileVersion("0.3.2.0")]
Modified: trunk/Tests/Properties/AssemblyInfo.cs
===================================================================
--- trunk/Tests/Properties/AssemblyInfo.cs 2009-10-19 16:22:00 UTC (rev 1059)
+++ trunk/Tests/Properties/AssemblyInfo.cs 2009-10-19 17:07:10 UTC (rev 1060)
@@ -29,5 +29,5 @@
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.3.1.0")]
-[assembly: AssemblyFileVersion("0.3.1.0")]
+[assembly: AssemblyVersion("0.3.2.0")]
+[assembly: AssemblyFileVersion("0.3.2.0")]
Modified: trunk/Tools/FontCreator/FontCreator.cs
===================================================================
--- trunk/Tools/FontCreator/FontCreator.cs 2009-10-19 16:22:00 UTC (rev 1059)
+++ trunk/Tools/FontCreator/FontCreator.cs 2009-10-19 17:07:10 UTC (rev 1060)
@@ -224,7 +224,7 @@
Display.Clear();
font.SetScale(mDisplayScale, mDisplayScale);
- ((BitmapFontImpl)font.Impl).InterpolationHint = InterpolationMode.Fastest;
+ ((BitmapFontImpl)font.Impl).Surface.InterpolationHint = InterpolationMode.Fastest;
DrawBackground();
DrawText();
@@ -237,7 +237,7 @@
Display.Clear();
font.SetScale(1.0, 1.0);
- ((BitmapFontImpl)font.Impl).InterpolationHint = InterpolationMode.Nicest;
+ ((BitmapFontImpl)font.Impl).Surface.InterpolationHint = InterpolationMode.Nicest;
DrawBackground();
DrawText();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ac...@us...> - 2009-10-21 10:34:08
|
Revision: 1064
http://agate.svn.sourceforge.net/agate/?rev=1064&view=rev
Author: accagon
Date: 2009-10-21 10:33:59 +0000 (Wed, 21 Oct 2009)
Log Message:
-----------
merge branches/particles into trunk
Modified Paths:
--------------
trunk/AgateLib/Sprites/Sprite.cs
Added Paths:
-----------
trunk/AgateLib/Particles/
trunk/AgateLib/Particles/Emitters/
trunk/AgateLib/Particles/Emitters/PixelEmitter.cs
trunk/AgateLib/Particles/Emitters/SpriteEmitter.cs
trunk/AgateLib/Particles/Emitters/SurfaceEmitter.cs
trunk/AgateLib/Particles/Manipulators/
trunk/AgateLib/Particles/Manipulators/FadeOutManipulator.cs
trunk/AgateLib/Particles/Manipulators/GravityManipulator.cs
trunk/AgateLib/Particles/Manipulators/GravityPointManipulator.cs
trunk/AgateLib/Particles/Particle.cs
trunk/AgateLib/Particles/ParticleEmitter.cs
trunk/AgateLib/Particles/Particles/
trunk/AgateLib/Particles/Particles/PixelParticle.cs
trunk/AgateLib/Particles/Particles/SpriteParticle.cs
trunk/AgateLib/Particles/Particles/SurfaceParticle.cs
trunk/Tests/Data/smoke.png
trunk/Tests/Data/smoke2.png
trunk/Tests/DisplayTests/ParticleTests/
trunk/Tests/DisplayTests/ParticleTests/ParticleTests.cs
Added: trunk/AgateLib/Particles/Emitters/PixelEmitter.cs
===================================================================
--- trunk/AgateLib/Particles/Emitters/PixelEmitter.cs (rev 0)
+++ trunk/AgateLib/Particles/Emitters/PixelEmitter.cs 2009-10-21 10:33:59 UTC (rev 1064)
@@ -0,0 +1,197 @@
+// The contents of this file are subject to the Mozilla Public License
+// Version 1.1 (the "License"); you may not use this file except in
+// compliance with the License. You may obtain a copy of the License at
+// http://www.mozilla.org/MPL/
+//
+// Software distributed under the License is distributed on an "AS IS"
+// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+// License for the specific language governing rights and limitations
+// under the License.
+//
+// The Original Code is AgateLib.Particles.
+//
+// The Initial Developer of the Original Code is Marcel Hauf
+// Portions created by Marcel Hauf are Copyright (C) 2009.
+// All Rights Reserved.
+//
+// Contributor(s): Marcel Hauf.
+//
+using System;
+using System.Linq;
+using System.Collections.Generic;
+
+using AgateLib.DisplayLib;
+using AgateLib.Geometry;
+
+namespace AgateLib.Particles
+{
+ /// <summary>
+ /// A pixel particle emitter.
+ /// Optimized for pixel rendering.
+ /// </summary>
+ public class PixelEmitter : ParticleEmitter
+ {
+ private Color mEmitColor = Color.White;
+
+ private float time = 0f;
+
+ private Surface mSurface;
+
+ /// <value>
+ /// Gets or sets the emit color.
+ /// </value>
+ public Color EmitColor
+ {
+ get { return mEmitColor; }
+ set { mEmitColor = value; }
+ }
+
+ /// <value>
+ /// Gets or sets the pixel size.
+ /// </value>
+ public Size PixelSize
+ {
+ get { return mSurface.DisplaySize; }
+ set { mSurface = new Surface(FillSurface(value, Color.White)); }
+ }
+
+ /// <summary>
+ /// Constructs a pixel particle emitter.
+ /// </summary>
+ /// <param name="color">Emit color.</param>
+ /// <param name="position">Position of the emitter.</param>
+ public PixelEmitter(Vector2 position, Color color)
+ {
+ Position = position;
+ mEmitColor = color;
+ mSurface = new Surface(FillSurface(new Size(1,1), Color.White));
+ }
+
+ private static PixelBuffer FillSurface(Size size, Color color)
+ {
+ PixelBuffer pb = new PixelBuffer(PixelFormat.ARGB8888, size);
+ int ii = 0;
+ for(int i = 0; i < pb.Width; i++)
+ {
+ for(ii = 0;ii <pb.Height; ii++)
+ {
+ pb.SetPixel(i, ii, color);
+ }
+ }
+ return pb;
+ }
+
+ /// <summary>
+ /// Constructs a pixel particle emitter.
+ /// </summary>
+ /// <param name="position"></param>
+ /// <param name="color"></param>
+ /// <param name="emitLife"></param>
+ public PixelEmitter(Vector2 position, Color color, float emitLife) : this(position, color)
+ {
+ base.EmitLife = emitLife;
+ }
+
+ /// <summary>
+ /// Constructs a pixel particle emitter.
+ /// </summary>
+ /// <param name="position">Position of the emitter.</param>
+ /// <param name="color">Emit color.</param>
+ /// <param name="maxParticles">Maximum amount of particles.</param>
+ public PixelEmitter(Vector2 position, Color color, int maxParticles) : this(position, color)
+ {
+ Particles = new List<Particle>(maxParticles);
+ }
+
+ /// <summary>
+ /// Constructs a pixel particle emitter.
+ /// </summary>
+ /// <param name="position"></param>
+ /// <param name="color"></param>
+ /// <param name="maxParticles"></param>
+ /// <param name="emitLife"></param>
+ public PixelEmitter(Vector2 position, Color color, int maxParticles, float emitLife) : this(position, color, maxParticles)
+ {
+ base.EmitLife = emitLife;
+ }
+
+ /// <summary>s
+ /// Overridden Draw method.
+ /// Draws each living particle.
+ /// </summary>
+ public override void Draw ()
+ {
+ foreach(PixelParticle ptl in Particles)
+ {
+ if(ptl.Condition == Condition.Alive || ptl.Condition == Condition.Frozen)
+ {
+ mSurface.Color = ptl.Color;
+ mSurface.Draw(ptl.Position);
+ }
+ }
+ }
+
+ /// <summary>
+ /// Overridden Update mehtod.
+ /// Emits particles based on the frequency property.
+ /// Updates the emitter position.
+ /// Calls particle manipulators to manipulate particles.
+ /// </summary>
+ /// <param name="time_ms">Time in milliseconds.</param>
+ public override void Update (double time_ms)
+ {
+ time += (float)time_ms;
+ float frequency = EmitFrequency*1000;
+
+ while(time >= frequency)
+ {
+ //int index = Particles.IndexOf(Particles.FirstOrDefault(pt => pt.IsAlive == false));
+ int index = -1;
+ for (int i = 0; i < Particles.Count; i++)
+ {
+ if (Particles[i].IsAlive == false)
+ {
+ index = i;
+ break;
+ }
+ }
+
+ if(index > -1)
+ {
+ // Recycle a dead particle
+ Particles[index].Acceleration = EmitAcceleration;
+ (Particles[index] as PixelParticle).Color = EmitColor;
+ Particles[index].Condition = Condition.Alive;
+ Particles[index].Life = EmitLife;
+ Particles[index].Position = Position;
+ Particles[index].Velocity = EmitVelocity;
+ NewRecyledParticle(Particles[index]);
+ }
+ else if(Particles.Count < Particles.Capacity)
+ {
+ // Add a new particle
+ PixelParticle pp = new PixelParticle(EmitColor);
+ pp.Acceleration = EmitVelocity;
+ pp.Color = EmitColor;
+ pp.Condition = Condition.Alive;
+ pp.Life = EmitLife;
+ pp.Position = Position;
+ pp.Velocity = EmitVelocity;
+ NewParticle(pp);
+ Particles.Add(pp);
+ }
+ else
+ {
+ // No capacity left and no dead particles to recycle
+ time = 0;
+ break;
+ }
+
+ time -= frequency;
+ }
+
+ // updates own position, particle positions and calls manipulators
+ base.Update (time_ms);
+ }
+ }
+}
Added: trunk/AgateLib/Particles/Emitters/SpriteEmitter.cs
===================================================================
--- trunk/AgateLib/Particles/Emitters/SpriteEmitter.cs (rev 0)
+++ trunk/AgateLib/Particles/Emitters/SpriteEmitter.cs 2009-10-21 10:33:59 UTC (rev 1064)
@@ -0,0 +1,226 @@
+// The contents of this file are subject to the Mozilla Public License
+// Version 1.1 (the "License"); you may not use this file except in
+// compliance with the License. You may obtain a copy of the License at
+// http://www.mozilla.org/MPL/
+//
+// Software distributed under the License is distributed on an "AS IS"
+// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+// License for the specific language governing rights and limitations
+// under the License.
+//
+// The Original Code is AgateLib.Particles.
+//
+// The Initial Developer of the Original Code is Marcel Hauf
+// Portions created by Marcel Hauf are Copyright (C) 2009.
+// All Rights Reserved.
+//
+// Contributor(s): Marcel Hauf.
+//
+using System;
+using System.Linq;
+using System.Collections.Generic;
+
+using AgateLib.DisplayLib;
+using AgateLib.Geometry;
+using AgateLib.Sprites;
+
+namespace AgateLib.Particles
+{
+ /// <summary>
+ /// Emitter class optimized for simulating sprite particles.
+ /// </summary>
+ public class SpriteEmitter : ParticleEmitter
+ {
+ private List<Sprite> mSprites = new List<Sprite>();
+
+ private int mEmitSpriteKey;
+ private double mEmitAlpha = 1d;
+
+ private float time;
+
+ /// <value>
+ /// Gets or sets the alpha channel of emitting <see cref="SpriteParticle"/>s.
+ /// </value>
+ public double EmitAlpha
+ {
+ get { return mEmitAlpha; }
+ set { mEmitAlpha = value; }
+ }
+
+ /// <value>
+ /// Gets or sets the SpriteKey of emitting <see cref="SpriteParticle"/>s.
+ /// </value>
+ public int EmitSpriteKey
+ {
+ get { return mEmitSpriteKey; }
+ set { mEmitSpriteKey = value; }
+ }
+
+ /// <summary>
+ /// Constructs a SpriteEmitter with default values:
+ /// EmitLife = 1f, maxParticle = 1000, emitSpriteKey = 0
+ /// </summary>
+ /// <param name="position"></param>
+ public SpriteEmitter(Vector2 position) : this(position, 1f, 1000, 0) {}
+
+ /// <summary>
+ /// Constructs a SpriteEmitter with default values:
+ /// maxParticle = 1000, emitSpriteKey = 0
+ /// </summary>
+ /// <param name="position"></param>
+ /// <param name="emitLife"></param>
+ public SpriteEmitter(Vector2 position, float emitLife) : this(position, emitLife, 1000, 0) {}
+
+ /// <summary>
+ /// Constructs a SpriteEmitter with default values:
+ /// emitSpriteKey = 0
+ /// </summary>
+ /// <param name="position"></param>
+ /// <param name="emitLife"></param>
+ /// <param name="maxParticle"></param>
+ public SpriteEmitter(Vector2 position, float emitLife, int maxParticle) : this(position, emitLife, maxParticle, 0) {}
+
+ /// <summary>
+ /// Constructs a SpriteEmitter.
+ /// </summary>
+ /// <param name="position"></param>
+ /// <param name="emitLife"></param>
+ /// <param name="maxParticle"></param>
+ /// <param name="emitSpriteKey"></param>
+ public SpriteEmitter(Vector2 position, float emitLife, int maxParticle, int emitSpriteKey)
+ {
+ base.Position = position;
+ base.EmitLife = emitLife;
+ base.Particles = new List<Particle>(maxParticle);
+ mEmitSpriteKey = emitSpriteKey;
+ }
+
+ /// <summary>
+ /// Gets a stored <see cref="Sprite"/> by key.
+ /// </summary>
+ /// <param name="key"></param>
+ /// <returns></returns>
+ public Sprite GetSpriteByKey(int key)
+ {
+ return mSprites[key];
+ }
+
+ /// <summary>
+ /// Adds a <see cref="Sprite"/> to the storage.
+ /// </summary>
+ /// <param name="sprite"></param>
+ /// <returns>Returns the key related to the stored <see cref="Sprite"/>.</returns>
+ public int AddSprite(Sprite sprite)
+ {
+ int index = mSprites.Count;
+ mSprites.Insert(index, sprite);
+ return index;
+ }
+
+ /// <summary>s
+ /// Overridden Draw method.
+ /// Draws each living particle.
+ /// </summary>
+ public override void Draw ()
+ {
+ foreach(SpriteParticle sp in base.Particles)
+ {
+ if(sp.Condition == Condition.Alive || sp.Condition == Condition.Frozen)
+ {
+ mSprites[sp.SpriteKey].CurrentFrameIndex = sp.Frame;
+ mSprites[sp.SpriteKey].Alpha = sp.Alpha;
+ mSprites[sp.SpriteKey].Draw(sp.Position);
+ }
+ }
+ }
+
+ /// <summary>
+ /// Overridden Update mehtod.
+ /// Emits particles based on the frequency property.
+ /// Updates the emitter position.
+ /// Calls particle manipulators to manipulate particles.
+ /// Updates the animation of each <see cref="Sprite"/>.
+ /// </summary>
+ /// <param name="time_ms">Time in milliseconds.</param>
+ public override void Update (double time_ms)
+ {
+ time += (float)time_ms;
+ float frequency = EmitFrequency*1000;
+
+ while(time >= frequency)
+ {
+ //int index = Particles.IndexOf(Particles.FirstOrDefault(pt => pt.IsAlive == false));
+ int index = -1;
+ for (int i = 0; i < Particles.Count; i++)
+ {
+ if (Particles[i].IsAlive == false)
+ {
+ index = i;
+ break;
+ }
+ }
+
+ if(index > -1)
+ {
+ // Recycle a dead particle
+ Particles[index].Acceleration = EmitAcceleration;
+ (Particles[index] as SpriteParticle).SpriteKey = mEmitSpriteKey;
+ (Particles[index] as SpriteParticle).Alpha = mEmitAlpha;
+ (Particles[index] as SpriteParticle).Frame = 0;
+ (Particles[index] as SpriteParticle).FrameTime = 0d;
+ Particles[index].Condition = Condition.Alive;
+ Particles[index].Life = EmitLife;
+ Particles[index].Position = Position;
+ Particles[index].Velocity = EmitVelocity;
+ NewRecyledParticle(Particles[index]);
+ }
+ else if(Particles.Count < Particles.Capacity)
+ {
+ // Add a new particle
+ SpriteParticle sp = new SpriteParticle();
+ sp.Acceleration = EmitAcceleration;
+ sp.SpriteKey = mEmitSpriteKey;
+ sp.Alpha = mEmitAlpha;
+ sp.Frame = 0;
+ sp.FrameTime = 0d;
+ sp.Condition = Condition.Alive;
+ sp.Life = EmitLife;
+ sp.Position = Position;
+ sp.Velocity = EmitVelocity;
+ NewParticle(sp);
+ Particles.Add(sp);
+ }
+ else
+ {
+ // No capacity left and no dead particles to recycle
+ time = 0;
+ break;
+ }
+ time -= frequency;
+ }
+
+ // Update animation
+ foreach(SpriteParticle sp in Particles)
+ {
+ if(mSprites[sp.SpriteKey].Frames.Count <= 1)
+ {
+ sp.SpriteKey = 0;
+ continue;
+ }
+ sp.FrameTime += time_ms/1000;
+ while (sp.FrameTime >= mSprites[sp.SpriteKey].TimePerFrame)
+ {
+ sp.FrameTime -= mSprites[sp.SpriteKey].TimePerFrame;
+ if(mSprites[sp.SpriteKey].PlayReverse)
+ sp.Frame--;
+ else
+ sp.Frame++;
+ // TODO: Handle AnimationType
+ }
+ }
+
+ // updates own position, particle positions and calls manipulators
+ base.Update (time_ms);
+ }
+ }
+}
Added: trunk/AgateLib/Particles/Emitters/SurfaceEmitter.cs
===================================================================
--- trunk/AgateLib/Particles/Emitters/SurfaceEmitter.cs (rev 0)
+++ trunk/AgateLib/Particles/Emitters/SurfaceEmitter.cs 2009-10-21 10:33:59 UTC (rev 1064)
@@ -0,0 +1,235 @@
+// The contents of this file are subject to the Mozilla Public License
+// Version 1.1 (the "License"); you may not use this file except in
+// compliance with the License. You may obtain a copy of the License at
+// http://www.mozilla.org/MPL/
+//
+// Software distributed under the License is distributed on an "AS IS"
+// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+// License for the specific language governing rights and limitations
+// under the License.
+//
+// The Original Code is AgateLib.Particles.
+//
+// The Initial Developer of the Original Code is Marcel Hauf
+// Portions created by Marcel Hauf are Copyright (C) 2009.
+// All Rights Reserved.
+//
+// Contributor(s): Marcel Hauf.
+//
+using System;
+using System.Linq;
+using System.Collections.Generic;
+
+using AgateLib.Geometry;
+using AgateLib.DisplayLib;
+
+namespace AgateLib.Particles
+{
+ /// <summary>
+ /// A surface emitter.
+ /// Optimized for emitting and rendering surface based particles.
+ /// </summary>
+ public class SurfaceEmitter : ParticleEmitter
+ {
+ private List<Surface> mSurfaces = new List<Surface>();
+
+ private int mEmitSurfaceKey;
+
+ private float time;
+
+ private double mEmitAlpha = 1d;
+
+ private SizeF mEmitScale = new SizeF(1f, 1f);
+
+ /// <value>
+ /// Gets or sets the scale width of emitting particles.
+ /// </value>
+ public float EmitScaleWidth
+ {
+ get { return mEmitScale.Width; }
+ set { mEmitScale.Width = value; }
+ }
+
+ /// <value>
+ /// Gets or sets the scale height of emitting particles.
+ /// </value>
+ public float EmitScaleHeight
+ {
+ get { return mEmitScale.Height; }
+ set { mEmitScale.Height = value; }
+ }
+
+ /// <value>
+ /// Gets or sets the scale of emitting particles.
+ /// </value>
+ public SizeF EmitScale
+ {
+ get { return mEmitScale; }
+ set { mEmitScale = value; }
+ }
+
+ /// <value>
+ /// Gets or sets the alpha channel of emitting particles.
+ /// </value>
+ public double EmitAlpha
+ {
+ get { return EmitAlpha; }
+ set { mEmitAlpha = value; }
+ }
+
+ /// <value>
+ /// Gets or sets the SurfaceKey of the emitting particles.
+ /// </value>
+ public int EmitSurfaceKey
+ {
+ get { return mEmitSurfaceKey; }
+ set { mEmitSurfaceKey = value; }
+ }
+
+ /// <summary>
+ /// Constructs a SurfaceEmitter with default values:
+ /// EmitLife = 1f, maxParticle = 1000, emitSurfaceKey = 0
+ /// </summary>
+ /// <param name="position"></param>
+ public SurfaceEmitter(Vector2 position) : this(position, 1f, 1000, 0) {}
+
+ /// <summary>
+ /// Constructs a SurfaceEmitter with default values:
+ /// maxParticle = 1000, emitSurfaceKey = 0
+ /// </summary>
+ /// <param name="position"></param>
+ /// <param name="emitLife"></param>
+ public SurfaceEmitter(Vector2 position, float emitLife) : this(position, emitLife, 1000, 0) {}
+
+ /// <summary>
+ /// Constructs a SurfaceEmitter with default values:
+ /// emitSurfaceKey = 0
+ /// </summary>
+ /// <param name="position"></param>
+ /// <param name="emitLife"></param>
+ /// <param name="maxParticle"></param>
+ public SurfaceEmitter(Vector2 position, float emitLife, int maxParticle) : this(position, emitLife, maxParticle, 0) {}
+
+ /// <summary>
+ /// Constructs a SurfaceEmitter.
+ /// </summary>
+ /// <param name="position"></param>
+ /// <param name="emitLife"></param>
+ /// <param name="maxParticle"></param>
+ /// <param name="emitSurfaceKey"></param>
+ public SurfaceEmitter(Vector2 position, float emitLife, int maxParticle, int emitSurfaceKey)
+ {
+ base.Position = position;
+ base.EmitLife = emitLife;
+ base.Particles = new List<Particle>(maxParticle);
+ mEmitSurfaceKey = emitSurfaceKey;
+ }
+
+ /// <summary>
+ /// Gets surface by key from storage.
+ /// </summary>
+ /// <param name="key">Surface key</param>
+ /// <returns></returns>
+ public Surface GetSurfaceByKey(int key)
+ {
+ return mSurfaces[key];
+ }
+
+ /// <summary>
+ /// Adds a surface to the storage.
+ /// </summary>
+ /// <param name="image"></param>
+ /// <returns>Returns the key where the surface is stored.</returns>
+ public int AddSurface(Surface image)
+ {
+ int index = mSurfaces.Count;
+ mSurfaces.Insert(index, image);
+ return index;
+ }
+
+ /// <summary>
+ /// Overridden Update mehtod.
+ /// Emits particles based on the frequency property.
+ /// Updates the emitter position.
+ /// Calls particle manipulators to manipulate particles.
+ /// </summary>
+ /// <param name="time_ms">Time in milliseconds.</param>
+ public override void Update (double time_ms)
+ {
+ time += (float)time_ms;
+ float frequency = EmitFrequency*1000;
+
+ while(time >= frequency)
+ {
+ //int index = Particles.IndexOf(Particles.FirstOrDefault(pt => pt.IsAlive == false));
+ int index = -1;
+ for (int i = 0; i < Particles.Count; i++)
+ {
+ if (Particles[i].IsAlive == false)
+ {
+ index = i;
+ break;
+ }
+ }
+
+ if(index > -1)
+ {
+ // Recycle a dead particle
+ Particles[index].Acceleration = EmitAcceleration;
+ (Particles[index] as SurfaceParticle).SurfaceKey = mEmitSurfaceKey;
+ (Particles[index] as SurfaceParticle).Alpha = mEmitAlpha;
+ (Particles[index] as SurfaceParticle).Scale = mEmitScale;
+ Particles[index].Condition = Condition.Alive;
+ Particles[index].Life = EmitLife;
+ Particles[index].Position = Position;
+ Particles[index].Velocity = EmitVelocity;
+ NewRecyledParticle(Particles[index]);
+ }
+ else if(Particles.Count < Particles.Capacity)
+ {
+ // Add a new particle
+ SurfaceParticle sp = new SurfaceParticle();
+ sp.Acceleration = EmitAcceleration;
+ sp.SurfaceKey = mEmitSurfaceKey;
+ sp.Alpha = mEmitAlpha;
+ sp.Scale = mEmitScale;
+ sp.Condition = Condition.Alive;
+ sp.Life = EmitLife;
+ sp.Position = Position;
+ sp.Velocity = EmitVelocity;
+ NewRecyledParticle(sp);
+ Particles.Add(sp);
+ }
+ else
+ {
+ // No capacity left and no dead particles to recycle
+ time = 0;
+ break;
+ }
+
+ time -= frequency;
+ }
+
+ // updates own position, particle positions and calls manipulators
+ base.Update (time_ms);
+ }
+
+ /// <summary>s
+ /// Overridden Draw method.
+ /// Draws each living particle.
+ /// </summary>
+ public override void Draw ()
+ {
+ foreach(SurfaceParticle sp in Particles)
+ {
+ if(sp.Condition == Condition.Alive || sp.Condition == Condition.Frozen)
+ {
+ mSurfaces[sp.SurfaceKey].ScaleHeight = sp.ScaleHeight;
+ mSurfaces[sp.SurfaceKey].ScaleWidth = sp.ScaleWidth;
+ mSurfaces[sp.SurfaceKey].Alpha = sp.Alpha;
+ mSurfaces[sp.SurfaceKey].Draw(sp.Position);
+ }
+ }
+ }
+ }
+}
Added: trunk/AgateLib/Particles/Manipulators/FadeOutManipulator.cs
===================================================================
--- trunk/AgateLib/Particles/Manipulators/FadeOutManipulator.cs (rev 0)
+++ trunk/AgateLib/Particles/Manipulators/FadeOutManipulator.cs 2009-10-21 10:33:59 UTC (rev 1064)
@@ -0,0 +1,138 @@
+// The contents of this file are subject to the Mozilla Public License
+// Version 1.1 (the "License"); you may not use this file except in
+// compliance with the License. You may obtain a copy of the License at
+// http://www.mozilla.org/MPL/
+//
+// Software distributed under the License is distributed on an "AS IS"
+// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+// License for the specific language governing rights and limitations
+// under the License.
+//
+// The Original Code is AgateLib.Particles.
+//
+// The Initial Developer of the Original Code is Marcel Hauf
+// Portions created by Marcel Hauf are Copyright (C) 2009.
+// All Rights Reserved.
+//
+// Contributor(s): Marcel Hauf.
+//
+using System;
+
+using AgateLib.Geometry;
+
+namespace AgateLib.Particles
+{
+ /// <summary>
+ /// Fades out particles by changing the alpha channel.
+ /// Works with <see cref="PixelEmitter"/>, <see cref="SurfaceEmitter"/> and <see cref="SpriteEmitter"/>.
+ /// </summary>
+ public class FadeOutManipulator
+ {
+ private float mLifeBarrier = 1f;
+ private float mAlphaAmount = 0.5f;
+
+ private int fadeout = 0;
+
+ private bool mRecyleInvisible = true;
+
+ /// <value>
+ /// Gets or sets if invisible particles should be recyled.
+ /// </value>
+ public bool RecyleInvisible
+ {
+ get { return mRecyleInvisible; }
+ set { mRecyleInvisible = value; }
+ }
+
+ /// <value>
+ /// Gets or sets the life barrier at which the particle should fade out.
+ /// </value>
+ public float LifeBarrier
+ {
+ get { return mLifeBarrier; }
+ set { mLifeBarrier = value; }
+ }
+
+ /// <value>
+ /// Gets or sets the amount of alpha which will be reduced.
+ /// </value>
+ public float AlphaAmount
+ {
+ get { return mAlphaAmount; }
+ set { mAlphaAmount = value; }
+ }
+
+ /// <summary>
+ /// Constructs a FadeOutManipulator.
+ /// </summary>
+ /// <param name="lifeBarrier">The barrier at which the particles will be faded out</param>
+ /// <param name="alphaAmount">The amount of alpha wich will be reduced.</param>
+ public FadeOutManipulator(float lifeBarrier, float alphaAmount)
+ {
+ mLifeBarrier = lifeBarrier;
+ mAlphaAmount = alphaAmount;
+ }
+
+ void HandleOnUpdate(UpdateArgs args)
+ {
+ Type emitterType = args.Emitter.GetType();
+ double time = args.Time_ms/1000;
+
+ if(emitterType == typeof(PixelEmitter))
+ {
+ foreach(PixelParticle pt in args.Emitter.Particles)
+ {
+ if(pt.Condition == Condition.Alive && pt.Life <= LifeBarrier)
+ {
+ fadeout = pt.Color.A - (int)(255 * mAlphaAmount * time);
+ pt.Color = Color.FromArgb(fadeout, pt.Color);
+ if(mRecyleInvisible == true && pt.Color.A == 0)
+ pt.Condition = Condition.Dead;
+ }
+ }
+ }
+ else if (emitterType == typeof(SurfaceEmitter))
+ {
+ foreach(SurfaceParticle sp in args.Emitter.Particles)
+ {
+ if(sp.Condition == Condition.Alive && sp.Life <= LifeBarrier)
+ {
+ sp.Alpha -= mAlphaAmount * time;
+ if(mRecyleInvisible == true && sp.Alpha == 0)
+ sp.Condition = Condition.Dead;
+ }
+ }
+ }
+ else if (emitterType == typeof(SpriteEmitter))
+ {
+ foreach(SpriteParticle sp in args.Emitter.Particles)
+ {
+ if(sp.Condition == Condition.Alive && sp.Life <= LifeBarrier)
+ {
+ sp.Alpha -= mAlphaAmount * time;
+ if(mRecyleInvisible == true && sp.Alpha == 0)
+ sp.Condition = Condition.Dead;
+ }
+ }
+ }
+ }
+
+ /// <summary>
+ /// Subscribe to a particle emitter.
+ /// </summary>
+ /// <param name="emitter"></param>
+ public void SubscribeToEmitter (ParticleEmitter emitter)
+ {
+ emitter.OnUpdate += HandleOnUpdate;
+ }
+
+ /// <summary>
+ /// Unsubscribe to a particle emitter.
+ /// </summary>
+ /// <param name="emitter"></param>
+ public void UnSubscribeToEmitter (ParticleEmitter emitter)
+ {
+ emitter.OnUpdate -= HandleOnUpdate;
+ }
+ }
+}
Added: trunk/AgateLib/Particles/Manipulators/GravityManipulator.cs
===================================================================
--- trunk/AgateLib/Particles/Manipulators/GravityManipulator.cs (rev 0)
+++ trunk/AgateLib/Particles/Manipulators/GravityManipulator.cs 2009-10-21 10:33:59 UTC (rev 1064)
@@ -0,0 +1,82 @@
+// The contents of this file are subject to the Mozilla Public License
+// Version 1.1 (the "License"); you may not use this file except in
+// compliance with the License. You may obtain a copy of the License at
+// http://www.mozilla.org/MPL/
+//
+// Software distributed under the License is distributed on an "AS IS"
+// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+// License for the specific language governing rights and limitations
+// under the License.
+//
+// The Original Code is AgateLib.Particles.
+//
+// The Initial Developer of the Original Code is Marcel Hauf
+// Portions created by Marcel Hauf are Copyright (C) 2009.
+// All Rights Reserved.
+//
+// Contributor(s): Marcel Hauf.
+//
+using System;
+using System.Collections.Generic;
+
+using AgateLib.Geometry;
+
+namespace AgateLib.Particles
+{
+ /// <summary>
+ /// A gravity particle manipulator.
+ /// </summary>
+ public class GravityManipulator
+ {
+ private Vector2 mGravity = Vector2.Empty;
+
+ /// <value>
+ /// Gets or sets the gravity strength and direction.
+ /// </value>
+ public Vector2 Gravity
+ {
+ get { return mGravity; }
+ set { mGravity = value; }
+ }
+
+ /// <summary>
+ /// Constructs a gravitiy manipulator.
+ /// </summary>
+ /// <param name="gravity">Gravity strength and direction.</param>
+ public GravityManipulator(Vector2 gravity)
+ {
+ mGravity = gravity;
+ }
+
+ void HandleOnUpdate(UpdateArgs args)
+ {
+ foreach(Particle pt in args.Emitter.Particles)
+ {
+ if(pt.IsAlive == true)
+ {
+ pt.Acceleration = pt.Acceleration + Gravity * (float)args.Time_ms/1000;
+ // pt.Acceleration = pt.Acceleration + Position * Strength * args.Time_ms;
+ // pt.Velocity = pt.Velocity + Position * Strength * args.Time_ms;
+ }
+ }
+ }
+
+ /// <summary>
+ /// Subscribe to a particle emitter.
+ /// </summary>
+ /// <param name="emitter"></param>
+ public void SubscribeToEmitter (ParticleEmitter emitter)
+ {
+ emitter.OnUpdate += HandleOnUpdate;
+ }
+
+ /// <summary>
+ /// Unsubscribe to a particle emitter.
+ /// </summary>
+ /// <param name="emitter"></param>
+ public void UnSubscribeToEmitter (ParticleEmitter emitter)
+ {
+ emitter.OnUpdate -= HandleOnUpdate;
+ }
+ }
+}
Added: trunk/AgateLib/Particles/Manipulators/GravityPointManipulator.cs
===================================================================
--- trunk/AgateLib/Particles/Manipulators/GravityPointManipulator.cs (rev 0)
+++ trunk/AgateLib/Particles/Manipulators/GravityPointManipulator.cs 2009-10-21 10:33:59 UTC (rev 1064)
@@ -0,0 +1,129 @@
+// The contents of this file are subject to the Mozilla Public License
+// Version 1.1 (the "License"); you may not use this file except in
+// compliance with the License. You may obtain a copy of the License at
+// http://www.mozilla.org/MPL/
+//
+// Software distributed under the License is distributed on an "AS IS"
+// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+// License for the specific language governing rights and limitations
+// under the License.
+//
+// The Original Code is AgateLib.Particles.
+//
+// The Initial Developer of the Original Code is Marcel Hauf
+// Portions created by Marcel Hauf are Copyright (C) 2009.
+// All Rights Reserved.
+//
+// Contributor(s): Marcel Hauf.
+//
+
+using System;
+using AgateLib.Geometry;
+
+namespace AgateLib.Particles
+{
+ /// <summary>
+ /// A point gravity particle manipulator.
+ /// </summary>
+ public class GravityPointManipulator
+ {
+ private Vector2 mPosition;
+ private float mForce;
+ private float mRange;
+
+ /// <summary>
+ /// Gets or sets the position of the point gravity.
+ /// </summary>
+ public Vector2 Position {
+ get { return mPosition; }
+ set { mPosition = value; }
+ }
+
+ /// <summary>
+ /// Gets or sets the gravity force.
+ /// </summary>
+ public float Force {
+ get { return mForce; }
+ set { mForce = value; }
+ }
+
+ /// <summary>
+ /// Gets or sets the range of the gravity impact.
+ /// A value of 0 means the gravity is disabled.
+ /// A value lower than 0 means the gravity has impact on all registered particles.
+ /// </summary>
+ public float Range {
+ get { return mRange; }
+ set { mRange = ...
[truncated message content] |
|
From: <ka...@us...> - 2009-11-05 22:17:49
|
Revision: 1085
http://agate.svn.sourceforge.net/agate/?rev=1085&view=rev
Author: kanato
Date: 2009-11-05 22:17:39 +0000 (Thu, 05 Nov 2009)
Log Message:
-----------
Merge build branch and dump Prebuild based build system.
Modified Paths:
--------------
trunk/Drivers/AgateSDX/AgateSDX.csproj
trunk/Examples/BallBuster.Net/CImage.cs
Added Paths:
-----------
trunk/AgateLib/AgateLib.csproj
trunk/AgateLib-Windows.sln
trunk/AgateLib.sln
trunk/AgateTools.sln
trunk/Drivers/AgateDrawing/AgateDrawing.csproj
trunk/Drivers/AgateFMOD/AgateFMOD.csproj
trunk/Drivers/AgateLib.WinForms/AgateLib.WinForms.csproj
trunk/Drivers/AgateOTK/AgateOTK.csproj
trunk/Drivers/AgateSDL/AgateSDL.csproj
trunk/Examples.sln
trunk/Tests/Tests.csproj
trunk/Tools/FontCreator/FontCreator.csproj
trunk/Tools/NotebookLib/NotebookLib/NotebookLib.csproj
trunk/Tools/PackedSpriteCreator/PackedSpriteCreator.csproj
trunk/Tools/ResourceEditor/ResourceEditor.csproj
Removed Paths:
-------------
trunk/Build/
trunk/BuildInstructions.txt
trunk/Examples/Examples.sln
Property Changed:
----------------
trunk/
trunk/AgateLib/
trunk/AgateLib/AgateFileProvider.cs
trunk/AgateLib/AgateSetup.cs
trunk/AgateLib/AudioLib/
trunk/AgateLib/AudioLib/Audio.cs
trunk/AgateLib/BitmapFont/FontMetrics.cs
trunk/AgateLib/BitmapFont/GlyphMetrics.cs
trunk/AgateLib/Core.cs
trunk/AgateLib/DisplayLib/
trunk/AgateLib/DisplayLib/Display.cs
trunk/AgateLib/DisplayLib/StringTransformer.cs
trunk/AgateLib/Drivers/AgateDriverReporter.cs
trunk/AgateLib/Drivers/IDesktopDriver.cs
trunk/AgateLib/ImplementationBase/
trunk/AgateLib/ImplementationBase/AudioImpl.cs
trunk/AgateLib/InputLib/
trunk/AgateLib/Meshes/Loaders/OBJFileRepresentation.cs
trunk/AgateLib/Meshes/Loaders/Obj/OBJFileRepresentation.cs
trunk/AgateLib/Meshes/Loaders/Obj/TokenTypes.cs
trunk/AgateLib/Resources/AgateResourceCollection.cs
trunk/AgateLib/Resources/AgateResourceLoader.cs
trunk/AgateLib/Resources/BitmapFontResource.cs
trunk/AgateLib/Sprites/Sprite.cs
trunk/AgateLib/Sprites/SpriteFrame.cs
trunk/AgateLib/Timing.cs
trunk/AgateLib/Utility/Platform.cs
trunk/Drivers/
trunk/Drivers/AgateDrawing/
trunk/Drivers/AgateDrawing/Drawing_Reporter.cs
trunk/Drivers/AgateFMOD/
trunk/Drivers/AgateLib.WinForms/
trunk/Drivers/AgateOTK/
trunk/Drivers/AgateSDL/
trunk/Drivers/AgateSDL/Audio/SDL_Audio.cs
trunk/Drivers/AgateSDL/Audio/SDL_Music.cs
trunk/Drivers/AgateSDL/Audio/SDL_SoundBuffer.cs
trunk/Drivers/AgateSDL/Audio/SDL_SoundBufferSession.cs
trunk/Drivers/AgateSDL/Input/SDL_Input.cs
trunk/Drivers/AgateSDL/Reporter.cs
trunk/Examples/BallBuster.Net/OpenTK.dll.config
trunk/Tests/
trunk/Tests/CoreTests/
trunk/Tests/DisplayTests/SurfaceTester/SurfaceTester.cs
trunk/Tests/DisplayTests/TestPacker/TestPacker.cs
trunk/Tests/DisplayTests/TestPacker/frmTestPacker.Designer.cs
trunk/Tests/DisplayTests/TestPacker/frmTestPacker.cs
trunk/Tests/DisplayTests/TestPacker/frmTestPacker.resx
trunk/Tests/DisplayTests/TileTester/TileTester.cs
trunk/Tests/DisplayTests/TileTester/frmTileTester.Designer.cs
trunk/Tests/DisplayTests/TileTester/frmTileTester.cs
trunk/Tests/DisplayTests/TileTester/frmTileTester.resx
trunk/Tests/InputTests/Input/
trunk/Tests/InputTests/Input/InputTester.cs
trunk/Tests/InputTests/Input/frmInputTester.Designer.cs
trunk/Tests/InputTests/Input/frmInputTester.cs
trunk/Tests/InputTests/InputState/
trunk/Tests/InputTests/InputState/InputStateTester.cs
trunk/Tools/FontCreator/
trunk/Tools/FontCreator/CreateFont.Designer.cs
trunk/Tools/FontCreator/CreateFont.cs
trunk/Tools/FontCreator/CreateFont.resx
trunk/Tools/FontCreator/EditGlyphs.Designer.cs
trunk/Tools/FontCreator/EditGlyphs.cs
trunk/Tools/FontCreator/EditGlyphs.resx
trunk/Tools/FontCreator/SaveFont.Designer.cs
trunk/Tools/FontCreator/SaveFont.cs
trunk/Tools/FontCreator/SaveFont.resx
trunk/Tools/FontCreator/frmFontCreator.Designer.cs
trunk/Tools/FontCreator/frmFontCreator.cs
trunk/Tools/FontCreator/frmFontCreator.resx
trunk/Tools/NotebookLib/NotebookLib/
trunk/Tools/PackedSpriteCreator/
trunk/Tools/PackedSpriteCreator/SpriteEditor.Designer.cs
trunk/Tools/PackedSpriteCreator/SpriteEditor.cs
trunk/Tools/PackedSpriteCreator/SpriteEditor.resx
trunk/Tools/PackedSpriteCreator/SpritePacker.cs
trunk/Tools/ResourceEditor/
Property changes on: trunk
___________________________________________________________________
Modified: svn:ignore
- bin
Binaries
obj
*.csproj
*.build
*.sln
+ bin
Binaries
obj
*.csproj
*.build
Modified: svn:mergeinfo
- /branches/agate-3d:629-702,840-864
/branches/agate3d-3.2:923-1034
/branches/build:424-517
/branches/font:778-916
/branches/merge-tests:806-810
/branches/registrar:595-599
/branches/sprites:463-513
+ /branches/agate-3d:629-702,840-864
/branches/agate3d-3.2:923-1034
/branches/build:424-517,1081-1084
/branches/font:778-916
/branches/merge-tests:806-810
/branches/registrar:595-599
/branches/sprites:463-513
Property changes on: trunk/AgateLib
___________________________________________________________________
Modified: svn:ignore
- obj
*.suo
Thumbs.db
[Bb]in
[Dd]ebug
[Rr]elease
*.user
*.aps
*.eto
*.csproj
+ obj
*.suo
Thumbs.db
[Bb]in
[Dd]ebug
[Rr]elease
*.user
*.aps
*.eto
Modified: svn:mergeinfo
- /branches/agate-3d/AgateLib:629-702,840-864
/branches/agate3d-3.2/AgateLib:923-1034
/branches/build/AgateLib:447-448,501-517
/branches/font/AgateLib:778-916
/branches/merge-tests/AgateLib:806-810
/branches/registrar/AgateLib:595-599
/branches/sprites/AgateLib:463-513
+ /branches/agate-3d/AgateLib:629-702,840-864
/branches/agate3d-3.2/AgateLib:923-1034
/branches/build/AgateLib:447-448,501-517,1081-1084
/branches/font/AgateLib:778-916
/branches/merge-tests/AgateLib:806-810
/branches/registrar/AgateLib:595-599
/branches/sprites/AgateLib:463-513
Property changes on: trunk/AgateLib/AgateFileProvider.cs
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate3d-3.2/AgateLib/AgateFileProvider.cs:923-1034
/branches/build/AgateLib/Utility/AgateFileProvider.cs:447-517
/branches/font/AgateLib/AgateFileProvider.cs:778-916
/branches/merge-tests/AgateLib/AgateFileProvider.cs:806-810
/branches/registrar/AgateLib/Utility/AgateFileProvider.cs:595-599
/branches/sprites/AgateLib/Utility/AgateFileProvider.cs:463-513
+ /branches/agate3d-3.2/AgateLib/AgateFileProvider.cs:923-1034
/branches/build/AgateLib/AgateFileProvider.cs:1081-1084
/branches/build/AgateLib/Utility/AgateFileProvider.cs:447-517
/branches/font/AgateLib/AgateFileProvider.cs:778-916
/branches/merge-tests/AgateLib/AgateFileProvider.cs:806-810
/branches/registrar/AgateLib/Utility/AgateFileProvider.cs:595-599
/branches/sprites/AgateLib/Utility/AgateFileProvider.cs:463-513
Copied: trunk/AgateLib/AgateLib.csproj (from rev 1084, branches/build/AgateLib/AgateLib.csproj)
===================================================================
--- trunk/AgateLib/AgateLib.csproj (rev 0)
+++ trunk/AgateLib/AgateLib.csproj 2009-11-05 22:17:39 UTC (rev 1085)
@@ -0,0 +1,527 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+ <PropertyGroup>
+ <ProjectType>Local</ProjectType>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{BED5DD5D-13C6-4BA4-80DC-A47478E74F84}</ProjectGuid>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ApplicationIcon></ApplicationIcon>
+ <AssemblyKeyContainerName>
+ </AssemblyKeyContainerName>
+ <AssemblyName>AgateLib</AssemblyName>
+ <DefaultClientScript>JScript</DefaultClientScript>
+ <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
+ <DefaultTargetSchema>IE50</DefaultTargetSchema>
+ <DelaySign>false</DelaySign>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder></AppDesignerFolder>
+ <RootNamespace>AgateLib</RootNamespace>
+ <StartupObject></StartupObject>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ <BaseAddress>285212672</BaseAddress>
+ <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
+ <ConfigurationOverrideFile>
+ </ConfigurationOverrideFile>
+ <DefineConstants>DEBUG;TRACE;</DefineConstants>
+ <DocumentationFile></DocumentationFile>
+ <DebugSymbols>True</DebugSymbols>
+ <FileAlignment>4096</FileAlignment>
+ <Optimize>False</Optimize>
+ <OutputPath>..\Binaries\Debug\AgateLib\</OutputPath>
+ <RegisterForComInterop>False</RegisterForComInterop>
+ <RemoveIntegerChecks>False</RemoveIntegerChecks>
+ <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
+ <WarningLevel>4</WarningLevel>
+ <NoWarn></NoWarn>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ <BaseAddress>285212672</BaseAddress>
+ <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
+ <ConfigurationOverrideFile>
+ </ConfigurationOverrideFile>
+ <DefineConstants>TRACE;</DefineConstants>
+ <DocumentationFile>AgateLib.xml</DocumentationFile>
+ <DebugSymbols>False</DebugSymbols>
+ <FileAlignment>4096</FileAlignment>
+ <Optimize>True</Optimize>
+ <OutputPath>..\Binaries\Release\AgateLib\</OutputPath>
+ <RegisterForComInterop>False</RegisterForComInterop>
+ <RemoveIntegerChecks>False</RemoveIntegerChecks>
+ <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
+ <WarningLevel>4</WarningLevel>
+ <NoWarn></NoWarn>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System">
+ <Name>System</Name>
+ </Reference>
+ <Reference Include="System.Core">
+ <Name>System.Core</Name>
+ </Reference>
+ <Reference Include="System.Xml">
+ <Name>System.Xml</Name>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="AgateException.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="AgateFileProvider.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="AgateGame.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="AgateSetup.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="AppInitParameters.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Core.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="IFileProvider.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Timing.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="AudioLib\Audio.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="AudioLib\Music.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="AudioLib\SoundBuffer.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="AudioLib\SoundBufferSession.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="BitmapFont\BitmapFontImpl.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="BitmapFont\BitmapFontOptions.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="BitmapFont\FontMetrics.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="BitmapFont\GlyphMetrics.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="DisplayLib\CreateWindowParams.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="DisplayLib\Display.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="DisplayLib\DisplayCapsInfo.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="DisplayLib\DisplayWindow.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="DisplayLib\FontState.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="DisplayLib\FontSurface.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="DisplayLib\IndexBuffer.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="DisplayLib\IRenderTarget.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="DisplayLib\ISurface.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="DisplayLib\Light.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="DisplayLib\LightManager.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="DisplayLib\Origin.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="DisplayLib\OriginAlignment.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="DisplayLib\PixelBuffer.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="DisplayLib\PixelFormat.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="DisplayLib\PrimitiveType.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="DisplayLib\RenderStateAdapter.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="DisplayLib\ScreenMode.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="DisplayLib\StringTransformer.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="DisplayLib\Surface.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="DisplayLib\SurfaceState.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="DisplayLib\TextLayout.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="DisplayLib\VertexBuffer.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="DisplayLib\Cache\FontStateCache.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="DisplayLib\Cache\SurfaceStateCache.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="DisplayLib\Shaders\AgateShaderCompileError.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="DisplayLib\Shaders\Effect.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="DisplayLib\Shaders\ShaderCompiler.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="DisplayLib\Shaders\ShaderLanguage.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="DisplayLib\Shaders\ShaderProgram.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="DisplayLib\Shaders\Technique.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="DisplayLib\Shaders\UniformState.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Drivers\AgateDriverInfo.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Drivers\AgateDriverReporter.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Drivers\AgateSandBoxLoader.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Drivers\DriverImplBase.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Drivers\IDesktopDriver.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Drivers\IUserSetSystems.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Drivers\NullInputImpl.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Drivers\NullSoundImpl.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Drivers\Registrar.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Drivers\TypeID.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Geometry\Color.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Geometry\Gradient.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Geometry\Matrix4x4.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Geometry\Point.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Geometry\PointF.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Geometry\Rectangle.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Geometry\RectangleF.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Geometry\Size.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Geometry\SizeF.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Geometry\TypeConverters.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Geometry\Vector2.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Geometry\Vector3.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Geometry\Vector4.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Geometry\Builders\Cube.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Geometry\Builders\Terrain.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Geometry\VertexTypes\PositionColor.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Geometry\VertexTypes\PositionTextureColor.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Geometry\VertexTypes\PositionTextureNormal.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Geometry\VertexTypes\PositionTextureNormalTangent.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Geometry\VertexTypes\PositionTextureNTB.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Geometry\VertexTypes\VertexLayout.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="ImplementationBase\AudioImpl.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="ImplementationBase\DisplayImpl.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="ImplementationBase\DisplayWindowImpl.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="ImplementationBase\FontSurfaceImpl.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="ImplementationBase\IndexBufferImpl.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="ImplementationBase\InputImpl.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="ImplementationBase\JoystickImpl.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="ImplementationBase\RenderTargetImpl.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="ImplementationBase\ShaderCompilerImpl.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="ImplementationBase\SurfaceImpl.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="ImplementationBase\VertexBufferImpl.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="InputLib\InputEventArgs.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="InputLib\Joystick.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="InputLib\JoystickInput.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="InputLib\Keyboard.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="InputLib\KeyCode.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="InputLib\KeyModifiers.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="InputLib\Mouse.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="InternalResources\Data.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="InternalResources\DataResources.Designer.cs">
+ <DependentUpon>DataResources.resx</DependentUpon>
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Meshes\Loaders\OBJFileRepresentation.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Meshes\Loaders\Obj\OBJFileRepresentation.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Meshes\Loaders\Obj\Parser.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Meshes\Loaders\Obj\TokenTypes.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Particles\Particle.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Particles\ParticleEmitter.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Particles\Emitters\PixelEmitter.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Particles\Emitters\SpriteEmitter.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Particles\Emitters\SurfaceEmitter.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Particles\Manipulators\FadeOutManipulator.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Particles\Manipulators\GravityManipulator.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Particles\Manipulators\GravityPointManipulator.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Particles\Particles\PixelParticle.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Particles\Particles\SpriteParticle.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Particles\Particles\SurfaceParticle.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="PlatformSpecific\IPlatformServices.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Properties\AssemblyInfo.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Resources\AgateResource.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Resources\AgateResourceCollection.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Resources\AgateResourceException.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Resources\AgateResourceLoader.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Resources\BitmapFontResource.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Resources\DisplayWindowResource.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Resources\SpriteResource.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Resources\StringTable.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Resources\SurfaceResource.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Resources\XmlHelper.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Serialization\Formatters\Xml\XmlFormatter.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Serialization\Xle\ITypeBinder.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Serialization\Xle\IXleSerializable.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Serialization\Xle\TypeBinder.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Serialization\Xle\XleSerializationException.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Serialization\Xle\XleSerializationInfo.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Serialization\Xle\XleSerializer.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Sprites\FrameList.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Sprites\IFrameList.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Sprites\ISprite.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Sprites\ISpriteFrame.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Sprites\Sprite.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Sprites\SpriteFrame.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Utility\FileProviderList.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Utility\FileSystemProvider.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Utility\Platform.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Utility\Ref.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Utility\SurfacePacker.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Utility\TgzFileProvider.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Utility\ZipFileProvider.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <EmbeddedResource Include="InternalResources\DataResources.resx">
+ <SubType>Designer</SubType>
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>DataResources.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
+ <PropertyGroup>
+ <PreBuildEvent>
+ </PreBuildEvent>
+ <PostBuildEvent>
+ </PostBuildEvent>
+ </PropertyGroup>
+</Project>
Property changes on: trunk/AgateLib/AgateSetup.cs
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate-3d/AgateLib/AgateSetup.cs:629-702,840-864
/branches/agate3d-3.2/AgateLib/AgateSetup.cs:923-1034
/branches/build/AgateLib/AgateSetup.cs:501-517
/branches/font/AgateLib/AgateSetup.cs:778-916
/branches/merge-tests/AgateLib/AgateSetup.cs:806-810
/branches/registrar/AgateLib/AgateSetup.cs:595-599
/branches/sprites/AgateLib/AgateSetup.cs:463-513
+ /branches/agate-3d/AgateLib/AgateSetup.cs:629-702,840-864
/branches/agate3d-3.2/AgateLib/AgateSetup.cs:923-1034
/branches/build/AgateLib/AgateSetup.cs:501-517,1081-1084
/branches/font/AgateLib/AgateSetup.cs:778-916
/branches/merge-tests/AgateLib/AgateSetup.cs:806-810
/branches/registrar/AgateLib/AgateSetup.cs:595-599
/branches/sprites/AgateLib/AgateSetup.cs:463-513
Property changes on: trunk/AgateLib/AudioLib
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate-3d/AgateLib/AudioLib:629-702,840-864
/branches/agate3d-3.2/AgateLib/AudioLib:923-1034
/branches/font/AgateLib/AudioLib:778-916
/branches/merge-tests/AgateLib/AudioLib:806-810
/branches/registrar/AgateLib/AudioLib:595-599
/branches/sprites/AgateLib/AudioLib:463-513
+ /branches/agate-3d/AgateLib/AudioLib:629-702,840-864
/branches/agate3d-3.2/AgateLib/AudioLib:923-1034
/branches/build/AgateLib/AudioLib:1081-1084
/branches/font/AgateLib/AudioLib:778-916
/branches/merge-tests/AgateLib/AudioLib:806-810
/branches/registrar/AgateLib/AudioLib:595-599
/branches/sprites/AgateLib/AudioLib:463-513
Property changes on: trunk/AgateLib/AudioLib/Audio.cs
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate-3d/AgateLib/AudioLib/Audio.cs:629-702,840-864
/branches/agate3d-3.2/AgateLib/AudioLib/Audio.cs:923-1034
/branches/build/AgateLib/AudioLib/Audio.cs:501-517
/branches/font/AgateLib/AudioLib/Audio.cs:778-916
/branches/merge-tests/AgateLib/AudioLib/Audio.cs:806-810
/branches/registrar/AgateLib/AudioLib/Audio.cs:595-599
/branches/sprites/AgateLib/AudioLib/Audio.cs:463-513
+ /branches/agate-3d/AgateLib/AudioLib/Audio.cs:629-702,840-864
/branches/agate3d-3.2/AgateLib/AudioLib/Audio.cs:923-1034
/branches/build/AgateLib/AudioLib/Audio.cs:501-517,1081-1084
/branches/font/AgateLib/AudioLib/Audio.cs:778-916
/branches/merge-tests/AgateLib/AudioLib/Audio.cs:806-810
/branches/registrar/AgateLib/AudioLib/Audio.cs:595-599
/branches/sprites/AgateLib/AudioLib/Audio.cs:463-513
Property changes on: trunk/AgateLib/BitmapFont/FontMetrics.cs
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate-3d/AgateLib/BitmapFont/FontMetrics.cs:629-702,840-864
/branches/agate3d-3.2/AgateLib/BitmapFont/FontMetrics.cs:923-1034
/branches/font/AgateLib/BitmapFont/FontMetrics.cs:778-916
/branches/merge-tests/AgateLib/BitmapFont/FontMetrics.cs:806-810
+ /branches/agate-3d/AgateLib/BitmapFont/FontMetrics.cs:629-702,840-864
/branches/agate3d-3.2/AgateLib/BitmapFont/FontMetrics.cs:923-1034
/branches/build/AgateLib/BitmapFont/FontMetrics.cs:1081-1084
/branches/font/AgateLib/BitmapFont/FontMetrics.cs:778-916
/branches/merge-tests/AgateLib/BitmapFont/FontMetrics.cs:806-810
Property changes on: trunk/AgateLib/BitmapFont/GlyphMetrics.cs
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate-3d/AgateLib/BitmapFont/GlyphMetrics.cs:629-702,840-864
/branches/agate3d-3.2/AgateLib/BitmapFont/GlyphMetrics.cs:923-1034
/branches/build/AgateLib/Resources/GlyphMetrics.cs:447-517
/branches/font/AgateLib/BitmapFont/GlyphMetrics.cs:778-916
/branches/merge-tests/AgateLib/BitmapFont/GlyphMetrics.cs:806-810
/branches/registrar/AgateLib/Resources/GlyphMetrics.cs:595-599
/branches/sprites/AgateLib/Resources/GlyphMetrics.cs:463-513
+ /branches/agate-3d/AgateLib/BitmapFont/GlyphMetrics.cs:629-702,840-864
/branches/agate3d-3.2/AgateLib/BitmapFont/GlyphMetrics.cs:923-1034
/branches/build/AgateLib/BitmapFont/GlyphMetrics.cs:1081-1084
/branches/build/AgateLib/Resources/GlyphMetrics.cs:447-517
/branches/font/AgateLib/BitmapFont/GlyphMetrics.cs:778-916
/branches/merge-tests/AgateLib/BitmapFont/GlyphMetrics.cs:806-810
/branches/registrar/AgateLib/Resources/GlyphMetrics.cs:595-599
/branches/sprites/AgateLib/Resources/GlyphMetrics.cs:463-513
Property changes on: trunk/AgateLib/Core.cs
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate-3...
[truncated message content] |
|
From: <ka...@us...> - 2009-11-23 23:02:17
|
Revision: 1112
http://agate.svn.sourceforge.net/agate/?rev=1112&view=rev
Author: kanato
Date: 2009-11-23 23:02:00 +0000 (Mon, 23 Nov 2009)
Log Message:
-----------
Merge in shaders branch.
Modified Paths:
--------------
trunk/AgateLib/AgateLib.csproj
trunk/AgateLib/AgateSetup.cs
trunk/AgateLib/Core.cs
trunk/AgateLib/DisplayLib/Display.cs
trunk/AgateLib/DisplayLib/DisplayCapsInfo.cs
trunk/AgateLib/DisplayLib/DisplayWindow.cs
trunk/AgateLib/DisplayLib/PrimitiveType.cs
trunk/AgateLib/DisplayLib/Shaders/AgateShaderCompileError.cs
trunk/AgateLib/Drivers/AgateSandBoxLoader.cs
trunk/AgateLib/Drivers/Registrar.cs
trunk/AgateLib/Geometry/Matrix4x4.cs
trunk/AgateLib/Geometry/VertexTypes/PositionTextureNormal.cs
trunk/AgateLib/ImplementationBase/DisplayImpl.cs
trunk/AgateLib/InternalResources/Data.cs
trunk/AgateLib/Meshes/Loaders/OBJFileRepresentation.cs
trunk/AgateLib/Meshes/Loaders/Obj/OBJFileRepresentation.cs
trunk/AgateLib/Meshes/Loaders/Obj/Parser.cs
trunk/AgateLib/Meshes/Loaders/Obj/TokenTypes.cs
trunk/AgateLib-Windows.sln
trunk/AgateLib.sln
trunk/Drivers/AgateDrawing/AgateDrawing.csproj
trunk/Drivers/AgateDrawing/Drawing_Display.cs
trunk/Drivers/AgateDrawing/Drawing_DisplayWindow.cs
trunk/Drivers/AgateDrawing/Drawing_FontSurface.cs
trunk/Drivers/AgateDrawing/Drawing_IRenderTarget.cs
trunk/Drivers/AgateDrawing/Drawing_Reporter.cs
trunk/Drivers/AgateDrawing/Drawing_Surface.cs
trunk/Drivers/AgateFMOD/AgateFMOD.csproj
trunk/Drivers/AgateLib.WinForms/AgateLib.WinForms.csproj
trunk/Drivers/AgateOTK/AL_Audio.cs
trunk/Drivers/AgateOTK/AgateOTK.csproj
trunk/Drivers/AgateOTK/ArbShader.cs
trunk/Drivers/AgateOTK/ArbShaderCompiler.cs
trunk/Drivers/AgateOTK/GLDrawBuffer.cs
trunk/Drivers/AgateOTK/GLState.cs
trunk/Drivers/AgateOTK/GL_Display.cs
trunk/Drivers/AgateOTK/GL_DisplayControl.cs
trunk/Drivers/AgateOTK/GL_GameWindow.cs
trunk/Drivers/AgateOTK/GL_IRenderTarget.cs
trunk/Drivers/AgateOTK/GL_IndexBuffer.cs
trunk/Drivers/AgateOTK/GL_Surface.cs
trunk/Drivers/AgateOTK/GL_VertexBuffer.cs
trunk/Drivers/AgateOTK/GlslShader.cs
trunk/Drivers/AgateOTK/GlslShaderCompiler.cs
trunk/Drivers/AgateOTK/OpenTK.dll
trunk/Drivers/AgateOTK/OpenTK.dll.config
trunk/Drivers/AgateOTK/OpenTK.xml
trunk/Drivers/AgateOTK/Otk_Reporter.cs
trunk/Drivers/AgateSDL/AgateSDL.csproj
trunk/Drivers/AgateSDX/AgateSDX.csproj
trunk/Drivers/AgateSDX/D3DDevice.cs
trunk/Drivers/AgateSDX/HlslEffect.cs
trunk/Drivers/AgateSDX/SDX_Display.cs
trunk/TODO.txt
trunk/Tests/Shaders/Hlsl.cs
trunk/Tests/Shaders/LightingTest/LightingTest.cs
trunk/Tests/Tests.csproj
trunk/Tests/frmLauncher.Designer.cs
trunk/Tests/frmLauncher.cs
trunk/Tools/FontCreator/CreateFont.Designer.cs
trunk/Tools/FontCreator/FontCreator.csproj
trunk/Tools/NotebookLib/NotebookLib/NotebookLib.csproj
trunk/Tools/PackedSpriteCreator/PackedSpriteCreator.csproj
trunk/Tools/ResourceEditor/ResourceEditor.csproj
Added Paths:
-----------
trunk/AgateLib/DisplayLib/Shaders/AgateBuiltInShaders.cs
trunk/AgateLib/DisplayLib/Shaders/AgateShader.cs
trunk/AgateLib/DisplayLib/Shaders/Basic2DShader.cs
trunk/AgateLib/DisplayLib/Shaders/Implementation/
trunk/AgateLib/DisplayLib/Shaders/Implementation/AgateInternalShader.cs
trunk/AgateLib/DisplayLib/Shaders/Implementation/AgateShaderCompileError.cs
trunk/AgateLib/DisplayLib/Shaders/Implementation/AgateShaderImpl.cs
trunk/AgateLib/DisplayLib/Shaders/Implementation/Basic2DImpl.cs
trunk/AgateLib/DisplayLib/Shaders/Implementation/BuiltInShader.cs
trunk/AgateLib/DisplayLib/Shaders/Implementation/Effect.cs
trunk/AgateLib/DisplayLib/Shaders/Implementation/Lighting2DImpl.cs
trunk/AgateLib/DisplayLib/Shaders/Implementation/Lighting3DImpl.cs
trunk/AgateLib/DisplayLib/Shaders/Implementation/ShaderCompiler.cs
trunk/AgateLib/DisplayLib/Shaders/Implementation/ShaderLanguage.cs
trunk/AgateLib/DisplayLib/Shaders/Implementation/ShaderProgram.cs
trunk/AgateLib/DisplayLib/Shaders/Implementation/Technique.cs
trunk/AgateLib/DisplayLib/Shaders/Implementation/UniformState.cs
trunk/AgateLib/DisplayLib/Shaders/Lighting2D.cs
trunk/AgateLib/DisplayLib/Shaders/Lighting3D.cs
trunk/AgateLib/Geometry/VertexTypes/PositionTextureColorNormal.cs
trunk/AgateLib/Platform.cs
trunk/AgateLib/PlatformType.cs
trunk/Drivers/AgateDrawing/DrawingBasic2DShader.cs
trunk/Drivers/AgateOTK/GeoHelper.cs
trunk/Drivers/AgateOTK/OpenTK.Compatibility.dll
trunk/Drivers/AgateOTK/OpenTK.Compatibility.dll.config
trunk/Drivers/AgateOTK/OpenTK.Compatibility.xml
trunk/Drivers/AgateOTK/Shaders/
trunk/Drivers/AgateOTK/Shaders/FixedFunction/
trunk/Drivers/AgateOTK/Shaders/FixedFunction/FixedFunctionShaderFactory.cs
trunk/Drivers/AgateOTK/Shaders/FixedFunction/OTK_FF_Basic2DShader.cs
trunk/Drivers/AgateOTK/Shaders/FixedFunction/OTK_FF_Lighting2D.cs
trunk/Drivers/AgateOTK/Shaders/FixedFunction/OTK_FF_Lighting3D.cs
trunk/Drivers/AgateOTK/Shaders/ShaderFactory.cs
trunk/Drivers/AgateSDX/GeoHelper.cs
trunk/Drivers/AgateSDX/Shaders/
trunk/Drivers/AgateSDX/Shaders/FixedFunction/
trunk/Drivers/AgateSDX/Shaders/FixedFunction/FixedFunctionShaderFactory.cs
trunk/Drivers/AgateSDX/Shaders/FixedFunction/SDX_FF_Basic2DShader.cs
trunk/Drivers/AgateSDX/Shaders/FixedFunction/SDX_FF_Lighting3D.cs
trunk/Drivers/AgateSDX/Shaders/ShaderFactory.cs
trunk/Tests/CoreTests/PlatformDetection/
trunk/Tests/CoreTests/PlatformDetection/PlatformDetection.Designer.cs
trunk/Tests/CoreTests/PlatformDetection/PlatformDetection.cs
trunk/Tests/CoreTests/PlatformDetection/PlatformDetection.resx
trunk/Tests/CoreTests/PlatformDetection/PlatformDetector.cs
trunk/Tests/DisplayTests/ClipRect.cs
trunk/Tests/Shaders/CoordinateSystem.cs
trunk/Tests/Shaders/Lighting3DTest.cs
Removed Paths:
-------------
trunk/AgateLib/DisplayLib/Light.cs
trunk/AgateLib/DisplayLib/LightManager.cs
trunk/AgateLib/DisplayLib/Shaders/Effect.cs
trunk/AgateLib/DisplayLib/Shaders/Implementation/AgateInternalShader.cs
trunk/AgateLib/DisplayLib/Shaders/Implementation/AgateShaderCompileError.cs
trunk/AgateLib/DisplayLib/Shaders/Implementation/AgateShaderImpl.cs
trunk/AgateLib/DisplayLib/Shaders/Implementation/Basic2DImpl.cs
trunk/AgateLib/DisplayLib/Shaders/Implementation/BuiltInShader.cs
trunk/AgateLib/DisplayLib/Shaders/Implementation/Effect.cs
trunk/AgateLib/DisplayLib/Shaders/Implementation/Lighting2DImpl.cs
trunk/AgateLib/DisplayLib/Shaders/Implementation/Lighting3DImpl.cs
trunk/AgateLib/DisplayLib/Shaders/Implementation/ShaderCompiler.cs
trunk/AgateLib/DisplayLib/Shaders/Implementation/ShaderLanguage.cs
trunk/AgateLib/DisplayLib/Shaders/Implementation/ShaderProgram.cs
trunk/AgateLib/DisplayLib/Shaders/Implementation/Technique.cs
trunk/AgateLib/DisplayLib/Shaders/Implementation/UniformState.cs
trunk/AgateLib/DisplayLib/Shaders/ShaderCompiler.cs
trunk/AgateLib/DisplayLib/Shaders/ShaderLanguage.cs
trunk/AgateLib/DisplayLib/Shaders/ShaderProgram.cs
trunk/AgateLib/DisplayLib/Shaders/Technique.cs
trunk/AgateLib/DisplayLib/Shaders/UniformState.cs
trunk/Drivers/AgateOTK/OpenTK.Utilities.dll
trunk/Drivers/AgateOTK/OpenTK.Utilities.dll.config
trunk/Drivers/AgateOTK/OpenTK.Utilities.xml
trunk/Drivers/AgateOTK/Shaders/FixedFunction/
trunk/Drivers/AgateOTK/Shaders/FixedFunction/FixedFunctionShaderFactory.cs
trunk/Drivers/AgateOTK/Shaders/FixedFunction/OTK_FF_Basic2DShader.cs
trunk/Drivers/AgateOTK/Shaders/FixedFunction/OTK_FF_Lighting2D.cs
trunk/Drivers/AgateOTK/Shaders/FixedFunction/OTK_FF_Lighting3D.cs
trunk/Drivers/AgateOTK/Shaders/ShaderFactory.cs
trunk/Drivers/AgateSDX/Shaders/FixedFunction/
trunk/Drivers/AgateSDX/Shaders/FixedFunction/FixedFunctionShaderFactory.cs
trunk/Drivers/AgateSDX/Shaders/FixedFunction/SDX_FF_Basic2DShader.cs
trunk/Drivers/AgateSDX/Shaders/FixedFunction/SDX_FF_Lighting3D.cs
trunk/Drivers/AgateSDX/Shaders/ShaderFactory.cs
trunk/Tests/CoreTests/PlatformDetection/PlatformDetection.Designer.cs
trunk/Tests/CoreTests/PlatformDetection/PlatformDetection.cs
trunk/Tests/CoreTests/PlatformDetection/PlatformDetection.resx
trunk/Tests/CoreTests/PlatformDetection/PlatformDetector.cs
trunk/Tests/DisplayTests/Ortho.cs
Property Changed:
----------------
trunk/
trunk/AgateLib/
trunk/AgateLib/AgateFileProvider.cs
trunk/AgateLib/AgateSetup.cs
trunk/AgateLib/AudioLib/
trunk/AgateLib/AudioLib/Audio.cs
trunk/AgateLib/BitmapFont/FontMetrics.cs
trunk/AgateLib/BitmapFont/GlyphMetrics.cs
trunk/AgateLib/Core.cs
trunk/AgateLib/DisplayLib/
trunk/AgateLib/DisplayLib/Display.cs
trunk/AgateLib/DisplayLib/StringTransformer.cs
trunk/AgateLib/Drivers/AgateDriverReporter.cs
trunk/AgateLib/Drivers/IDesktopDriver.cs
trunk/AgateLib/ImplementationBase/
trunk/AgateLib/ImplementationBase/AudioImpl.cs
trunk/AgateLib/InputLib/
trunk/AgateLib/Meshes/Loaders/OBJFileRepresentation.cs
trunk/AgateLib/Meshes/Loaders/Obj/OBJFileRepresentation.cs
trunk/AgateLib/Meshes/Loaders/Obj/TokenTypes.cs
trunk/AgateLib/Resources/AgateResourceCollection.cs
trunk/AgateLib/Resources/AgateResourceLoader.cs
trunk/AgateLib/Resources/BitmapFontResource.cs
trunk/AgateLib/Sprites/Sprite.cs
trunk/AgateLib/Sprites/SpriteFrame.cs
trunk/AgateLib/Timing.cs
trunk/AgateLib/Utility/Platform.cs
trunk/Drivers/
trunk/Drivers/AgateDrawing/Drawing_Reporter.cs
trunk/Drivers/AgateLib.WinForms/
trunk/Drivers/AgateSDL/
trunk/Drivers/AgateSDL/Audio/SDL_Audio.cs
trunk/Drivers/AgateSDL/Audio/SDL_Music.cs
trunk/Drivers/AgateSDL/Audio/SDL_SoundBuffer.cs
trunk/Drivers/AgateSDL/Audio/SDL_SoundBufferSession.cs
trunk/Drivers/AgateSDL/Input/SDL_Input.cs
trunk/Drivers/AgateSDL/Reporter.cs
trunk/Examples/BallBuster.Net/OpenTK.dll.config
trunk/Examples/ShootTheTraps/Properties/
trunk/Examples/ShootTheTraps/Properties/AssemblyInfo.cs
trunk/Tests/CoreTests/
trunk/Tests/DisplayTests/SurfaceTester/SurfaceTester.cs
trunk/Tests/DisplayTests/TestPacker/TestPacker.cs
trunk/Tests/DisplayTests/TestPacker/frmTestPacker.Designer.cs
trunk/Tests/DisplayTests/TestPacker/frmTestPacker.cs
trunk/Tests/DisplayTests/TestPacker/frmTestPacker.resx
trunk/Tests/DisplayTests/TileTester/TileTester.cs
trunk/Tests/DisplayTests/TileTester/frmTileTester.Designer.cs
trunk/Tests/DisplayTests/TileTester/frmTileTester.cs
trunk/Tests/DisplayTests/TileTester/frmTileTester.resx
trunk/Tests/InputTests/Input/
trunk/Tests/InputTests/Input/InputTester.cs
trunk/Tests/InputTests/Input/frmInputTester.Designer.cs
trunk/Tests/InputTests/Input/frmInputTester.cs
trunk/Tests/InputTests/InputState/
trunk/Tests/InputTests/InputState/InputStateTester.cs
trunk/Tools/FontCreator/CreateFont.Designer.cs
trunk/Tools/FontCreator/CreateFont.cs
trunk/Tools/FontCreator/CreateFont.resx
trunk/Tools/FontCreator/EditGlyphs.Designer.cs
trunk/Tools/FontCreator/EditGlyphs.cs
trunk/Tools/FontCreator/EditGlyphs.resx
trunk/Tools/FontCreator/SaveFont.Designer.cs
trunk/Tools/FontCreator/SaveFont.cs
trunk/Tools/FontCreator/SaveFont.resx
trunk/Tools/FontCreator/frmFontCreator.Designer.cs
trunk/Tools/FontCreator/frmFontCreator.cs
trunk/Tools/FontCreator/frmFontCreator.resx
trunk/Tools/PackedSpriteCreator/SpriteEditor.Designer.cs
trunk/Tools/PackedSpriteCreator/SpriteEditor.cs
trunk/Tools/PackedSpriteCreator/SpriteEditor.resx
trunk/Tools/PackedSpriteCreator/SpritePacker.cs
Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate-3d:629-702,840-864
/branches/agate3d-3.2:923-1034
/branches/build:424-517,1081-1084
/branches/font:778-916
/branches/merge-tests:806-810
/branches/registrar:595-599
/branches/sprites:463-513
+ /branches/agate-3d:629-702,840-864
/branches/agate3d-3.2:923-1034
/branches/build:424-517,1081-1084
/branches/font:778-916
/branches/merge-tests:806-810
/branches/otkupdate:1068-1076
/branches/registrar:595-599
/branches/shaders:1087-1111
/branches/sprites:463-513
Property changes on: trunk/AgateLib
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate-3d/AgateLib:629-702,840-864
/branches/agate3d-3.2/AgateLib:923-1034
/branches/build/AgateLib:447-448,501-517,1081-1084
/branches/font/AgateLib:778-916
/branches/merge-tests/AgateLib:806-810
/branches/registrar/AgateLib:595-599
/branches/sprites/AgateLib:463-513
+ /branches/agate-3d/AgateLib:629-702,840-864
/branches/agate3d-3.2/AgateLib:923-1034
/branches/build/AgateLib:447-448,501-517,1081-1084
/branches/font/AgateLib:778-916
/branches/merge-tests/AgateLib:806-810
/branches/otkupdate/AgateLib:1068-1076
/branches/registrar/AgateLib:595-599
/branches/shaders/AgateLib:1087-1111
/branches/sprites/AgateLib:463-513
Property changes on: trunk/AgateLib/AgateFileProvider.cs
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate3d-3.2/AgateLib/AgateFileProvider.cs:923-1034
/branches/build/AgateLib/AgateFileProvider.cs:1081-1084
/branches/build/AgateLib/Utility/AgateFileProvider.cs:447-517
/branches/font/AgateLib/AgateFileProvider.cs:778-916
/branches/merge-tests/AgateLib/AgateFileProvider.cs:806-810
/branches/registrar/AgateLib/Utility/AgateFileProvider.cs:595-599
/branches/sprites/AgateLib/Utility/AgateFileProvider.cs:463-513
+ /branches/agate3d-3.2/AgateLib/AgateFileProvider.cs:923-1034
/branches/build/AgateLib/AgateFileProvider.cs:1081-1084
/branches/build/AgateLib/Utility/AgateFileProvider.cs:447-517
/branches/font/AgateLib/AgateFileProvider.cs:778-916
/branches/merge-tests/AgateLib/AgateFileProvider.cs:806-810
/branches/otkupdate/AgateLib/AgateFileProvider.cs:1068-1076
/branches/registrar/AgateLib/Utility/AgateFileProvider.cs:595-599
/branches/shaders/AgateLib/AgateFileProvider.cs:1087-1111
/branches/sprites/AgateLib/Utility/AgateFileProvider.cs:463-513
Modified: trunk/AgateLib/AgateLib.csproj
===================================================================
--- trunk/AgateLib/AgateLib.csproj 2009-11-23 21:19:16 UTC (rev 1111)
+++ trunk/AgateLib/AgateLib.csproj 2009-11-23 23:02:00 UTC (rev 1112)
@@ -1,12 +1,13 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<PropertyGroup>
<ProjectType>Local</ProjectType>
- <ProductVersion>9.0.21022</ProductVersion>
+ <ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{BED5DD5D-13C6-4BA4-80DC-A47478E74F84}</ProjectGuid>
+ <ProjectGuid>{9490B719-829E-43A7-A5FE-8001F8A81759}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ApplicationIcon></ApplicationIcon>
+ <ApplicationIcon>
+ </ApplicationIcon>
<AssemblyKeyContainerName>
</AssemblyKeyContainerName>
<AssemblyName>AgateLib</AssemblyName>
@@ -16,9 +17,11 @@
<DelaySign>false</DelaySign>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<OutputType>Library</OutputType>
- <AppDesignerFolder></AppDesignerFolder>
+ <AppDesignerFolder>
+ </AppDesignerFolder>
<RootNamespace>AgateLib</RootNamespace>
- <StartupObject></StartupObject>
+ <StartupObject>
+ </StartupObject>
<FileUpgradeFlags>
</FileUpgradeFlags>
</PropertyGroup>
@@ -29,7 +32,8 @@
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>DEBUG;TRACE;</DefineConstants>
- <DocumentationFile></DocumentationFile>
+ <DocumentationFile>
+ </DocumentationFile>
<DebugSymbols>True</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>False</Optimize>
@@ -38,7 +42,8 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
- <NoWarn></NoWarn>
+ <NoWarn>
+ </NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
@@ -56,17 +61,19 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
- <NoWarn></NoWarn>
+ <NoWarn>
+ </NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="System">
- <Name>System</Name>
+ <Name>System</Name>
</Reference>
<Reference Include="System.Core">
- <Name>System.Core</Name>
+ <Name>System.Core</Name>
</Reference>
+ <Reference Include="System.Data" />
<Reference Include="System.Xml">
- <Name>System.Xml</Name>
+ <Name>System.Xml</Name>
</Reference>
</ItemGroup>
<ItemGroup>
@@ -90,9 +97,23 @@
<Compile Include="Core.cs">
<SubType>Code</SubType>
</Compile>
+ <Compile Include="DisplayLib\Shaders\AgateBuiltInShaders.cs" />
+ <Compile Include="DisplayLib\Shaders\Basic2DShader.cs" />
+ <Compile Include="DisplayLib\Shaders\AgateShader.cs" />
+ <Compile Include="DisplayLib\Shaders\Implementation\AgateInternalShader.cs" />
+ <Compile Include="DisplayLib\Shaders\Implementation\AgateShaderImpl.cs" />
+ <Compile Include="DisplayLib\Shaders\Implementation\Basic2DImpl.cs" />
+ <Compile Include="DisplayLib\Shaders\Implementation\BuiltInShader.cs" />
+ <Compile Include="DisplayLib\Shaders\Implementation\Lighting2DImpl.cs" />
+ <Compile Include="DisplayLib\Shaders\Implementation\Lighting3DImpl.cs" />
+ <Compile Include="DisplayLib\Shaders\Lighting2D.cs" />
+ <Compile Include="DisplayLib\Shaders\Lighting3D.cs" />
+ <Compile Include="Geometry\VertexTypes\PositionTextureColorNormal.cs" />
<Compile Include="IFileProvider.cs">
<SubType>Code</SubType>
</Compile>
+ <Compile Include="Platform.cs" />
+ <Compile Include="PlatformType.cs" />
<Compile Include="Timing.cs">
<SubType>Code</SubType>
</Compile>
@@ -147,12 +168,6 @@
<Compile Include="DisplayLib\ISurface.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="DisplayLib\Light.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="DisplayLib\LightManager.cs">
- <SubType>Code</SubType>
- </Compile>
<Compile Include="DisplayLib\Origin.cs">
<SubType>Code</SubType>
</Compile>
@@ -195,25 +210,25 @@
<Compile Include="DisplayLib\Cache\SurfaceStateCache.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="DisplayLib\Shaders\AgateShaderCompileError.cs">
+ <Compile Include="DisplayLib\Shaders\Implementation\AgateShaderCompileError.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="DisplayLib\Shaders\Effect.cs">
+ <Compile Include="DisplayLib\Shaders\Implementation\Effect.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="DisplayLib\Shaders\ShaderCompiler.cs">
+ <Compile Include="DisplayLib\Shaders\Implementation\ShaderCompiler.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="DisplayLib\Shaders\ShaderLanguage.cs">
+ <Compile Include="DisplayLib\Shaders\Implementation\ShaderLanguage.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="DisplayLib\Shaders\ShaderProgram.cs">
+ <Compile Include="DisplayLib\Shaders\Implementation\ShaderProgram.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="DisplayLib\Shaders\Technique.cs">
+ <Compile Include="DisplayLib\Shaders\Implementation\Technique.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="DisplayLib\Shaders\UniformState.cs">
+ <Compile Include="DisplayLib\Shaders\Implementation\UniformState.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Drivers\AgateDriverInfo.cs">
@@ -415,9 +430,6 @@
<Compile Include="Particles\Particles\SurfaceParticle.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="PlatformSpecific\IPlatformServices.cs">
- <SubType>Code</SubType>
- </Compile>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
@@ -496,9 +508,6 @@
<Compile Include="Utility\FileSystemProvider.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="Utility\Platform.cs">
- <SubType>Code</SubType>
- </Compile>
<Compile Include="Utility\Ref.cs">
<SubType>Code</SubType>
</Compile>
@@ -524,4 +533,4 @@
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
-</Project>
+</Project>
\ No newline at end of file
Modified: trunk/AgateLib/AgateSetup.cs
===================================================================
--- trunk/AgateLib/AgateSetup.cs 2009-11-23 21:19:16 UTC (rev 1111)
+++ trunk/AgateLib/AgateSetup.cs 2009-11-23 23:02:00 UTC (rev 1112)
@@ -170,6 +170,7 @@
/// Automatically selects the driver to use, or asks the user which
/// driver to use if appropriate.
/// </summary>
+ [Obsolete("Use Initialize(bool, bool, bool) overload instead.")]
public void InitializeDisplay()
{
DoAskUser();
@@ -191,6 +192,7 @@
/// Initializes the Audio subsystem.
/// Automatically picks which driver to use.
/// </summary>
+ [Obsolete("Use Initialize(bool, bool, bool) overload instead.")]
public void InitializeAudio()
{
DoAskUser();
@@ -212,6 +214,7 @@
/// Initializes the Input subsystem.
/// Automatically picks which driver to use.
/// </summary>
+ [Obsolete("Use Initialize(bool, bool, bool) overload instead.")]
public void InitializeInput()
{
DoAskUser();
Property changes on: trunk/AgateLib/AgateSetup.cs
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate-3d/AgateLib/AgateSetup.cs:629-702,840-864
/branches/agate3d-3.2/AgateLib/AgateSetup.cs:923-1034
/branches/build/AgateLib/AgateSetup.cs:501-517,1081-1084
/branches/font/AgateLib/AgateSetup.cs:778-916
/branches/merge-tests/AgateLib/AgateSetup.cs:806-810
/branches/registrar/AgateLib/AgateSetup.cs:595-599
/branches/sprites/AgateLib/AgateSetup.cs:463-513
+ /branches/agate-3d/AgateLib/AgateSetup.cs:629-702,840-864
/branches/agate3d-3.2/AgateLib/AgateSetup.cs:923-1034
/branches/build/AgateLib/AgateSetup.cs:501-517,1081-1084
/branches/font/AgateLib/AgateSetup.cs:778-916
/branches/merge-tests/AgateLib/AgateSetup.cs:806-810
/branches/otkupdate/AgateLib/AgateSetup.cs:1068-1076
/branches/registrar/AgateLib/AgateSetup.cs:595-599
/branches/shaders/AgateLib/AgateSetup.cs:1087-1111
/branches/sprites/AgateLib/AgateSetup.cs:463-513
Property changes on: trunk/AgateLib/AudioLib
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate-3d/AgateLib/AudioLib:629-702,840-864
/branches/agate3d-3.2/AgateLib/AudioLib:923-1034
/branches/build/AgateLib/AudioLib:1081-1084
/branches/font/AgateLib/AudioLib:778-916
/branches/merge-tests/AgateLib/AudioLib:806-810
/branches/registrar/AgateLib/AudioLib:595-599
/branches/sprites/AgateLib/AudioLib:463-513
+ /branches/agate-3d/AgateLib/AudioLib:629-702,840-864
/branches/agate3d-3.2/AgateLib/AudioLib:923-1034
/branches/build/AgateLib/AudioLib:1081-1084
/branches/font/AgateLib/AudioLib:778-916
/branches/merge-tests/AgateLib/AudioLib:806-810
/branches/otkupdate/AgateLib/AudioLib:1068-1076
/branches/registrar/AgateLib/AudioLib:595-599
/branches/shaders/AgateLib/AudioLib:1087-1111
/branches/sprites/AgateLib/AudioLib:463-513
Property changes on: trunk/AgateLib/AudioLib/Audio.cs
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate-3d/AgateLib/AudioLib/Audio.cs:629-702,840-864
/branches/agate3d-3.2/AgateLib/AudioLib/Audio.cs:923-1034
/branches/build/AgateLib/AudioLib/Audio.cs:501-517,1081-1084
/branches/font/AgateLib/AudioLib/Audio.cs:778-916
/branches/merge-tests/AgateLib/AudioLib/Audio.cs:806-810
/branches/registrar/AgateLib/AudioLib/Audio.cs:595-599
/branches/sprites/AgateLib/AudioLib/Audio.cs:463-513
+ /branches/agate-3d/AgateLib/AudioLib/Audio.cs:629-702,840-864
/branches/agate3d-3.2/AgateLib/AudioLib/Audio.cs:923-1034
/branches/build/AgateLib/AudioLib/Audio.cs:501-517,1081-1084
/branches/font/AgateLib/AudioLib/Audio.cs:778-916
/branches/merge-tests/AgateLib/AudioLib/Audio.cs:806-810
/branches/otkupdate/AgateLib/AudioLib/Audio.cs:1068-1076
/branches/registrar/AgateLib/AudioLib/Audio.cs:595-599
/branches/shaders/AgateLib/AudioLib/Audio.cs:1087-1111
/branches/sprites/AgateLib/AudioLib/Audio.cs:463-513
Property changes on: trunk/AgateLib/BitmapFont/FontMetrics.cs
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate-3d/AgateLib/BitmapFont/FontMetrics.cs:629-702,840-864
/branches/agate3d-3.2/AgateLib/BitmapFont/FontMetrics.cs:923-1034
/branches/build/AgateLib/BitmapFont/FontMetrics.cs:1081-1084
/branches/font/AgateLib/BitmapFont/FontMetrics.cs:778-916
/branches/merge-tests/AgateLib/BitmapFont/FontMetrics.cs:806-810
+ /branches/agate-3d/AgateLib/BitmapFont/FontMetrics.cs:629-702,840-864
/branches/agate3d-3.2/AgateLib/BitmapFont/FontMetrics.cs:923-1034
/branches/build/AgateLib/BitmapFont/FontMetrics.cs:1081-1084
/branches/font/AgateLib/BitmapFont/FontMetrics.cs:778-916
/branches/merge-tests/AgateLib/BitmapFont/FontMetrics.cs:806-810
/branches/otkupdate/AgateLib/BitmapFont/FontMetrics.cs:1068-1076
/branches/shaders/AgateLib/BitmapFont/FontMetrics.cs:1087-1111
Property changes on: trunk/AgateLib/BitmapFont/GlyphMetrics.cs
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate-3d/AgateLib/BitmapFont/GlyphMetrics.cs:629-702,840-864
/branches/agate3d-3.2/AgateLib/BitmapFont/GlyphMetrics.cs:923-1034
/branches/build/AgateLib/BitmapFont/GlyphMetrics.cs:1081-1084
/branches/build/AgateLib/Resources/GlyphMetrics.cs:447-517
/branches/font/AgateLib/BitmapFont/GlyphMetrics.cs:778-916
/branches/merge-tests/AgateLib/BitmapFont/GlyphMetrics.cs:806-810
/branches/registrar/AgateLib/Resources/GlyphMetrics.cs:595-599
/branches/sprites/AgateLib/Resources/GlyphMetrics.cs:463-513
+ /branches/agate-3d/AgateLib/BitmapFont/GlyphMetrics.cs:629-702,840-864
/branches/agate3d-3.2/AgateLib/BitmapFont/GlyphMetrics.cs:923-1034
/branches/build/AgateLib/BitmapFont/GlyphMetrics.cs:1081-1084
/branches/build/AgateLib/Resources/GlyphMetrics.cs:447-517
/branches/font/AgateLib/BitmapFont/GlyphMetrics.cs:778-916
/branches/merge-tests/AgateLib/BitmapFont/GlyphMetrics.cs:806-810
/branches/otkupdate/AgateLib/BitmapFont/GlyphMetrics.cs:1068-1076
/branches/registrar/AgateLib/Resources/GlyphMetrics.cs:595-599
/branches/shaders/AgateLib/BitmapFont/GlyphMetrics.cs:1087-1111
/branches/sprites/AgateLib/Resources/GlyphMetrics.cs:463-513
Modified: trunk/AgateLib/Core.cs
===================================================================
--- trunk/AgateLib/Core.cs 2009-11-23 21:19:16 UTC (rev 1111)
+++ trunk/AgateLib/Core.cs 2009-11-23 23:02:00 UTC (rev 1112)
@@ -24,7 +24,6 @@
using AgateLib.AudioLib;
using AgateLib.DisplayLib;
-using AgateLib.PlatformSpecific;
namespace AgateLib
{
@@ -90,6 +89,7 @@
private static bool mAutoPause = false;
private static bool mIsActive = true;
private static bool mInititalized = false;
+ private static Platform mPlatform;
#region --- Error Reporting ---
@@ -98,7 +98,6 @@
public static class ErrorReporting
{
-
private static string mErrorFile = "errorlog.txt";
private static bool mAutoStackTrace = false;
private static bool mWroteHeader = false;
@@ -214,7 +213,7 @@
filewriter.Write(text);
}
- Console.Write(text);
+ Trace.WriteLine(text);
}
/// <summary>
@@ -263,9 +262,8 @@
"Error message: " + e.Message + "\r\n" +
"Errors cannot be saved to a text file.";
- Console.WriteLine(message);
- System.Diagnostics.Debug.WriteLine(message);
- System.Diagnostics.Trace.WriteLine(message);
+ Debug.WriteLine(message);
+ Trace.WriteLine(message);
return null;
}
@@ -296,7 +294,7 @@
static Core()
{
-
+ mPlatform = new Platform();
}
/// <summary>
/// Initializes Core class.
@@ -309,11 +307,17 @@
Drivers.Registrar.Initialize();
- Debug.Listeners.Add(new TextWriterTraceListener(Console.Out));
mInititalized = true;
}
+ /// <summary>
+ /// Gets an object which describes details about the current platform.
+ /// </summary>
+ public static Platform Platform
+ {
+ get { return mPlatform; }
+ }
/// <summary>
/// Gets or sets a bool value which indicates whether or not your
@@ -412,5 +416,7 @@
{
return mTime.ElapsedMilliseconds;
}
+
+
}
}
\ No newline at end of file
Property changes on: trunk/AgateLib/Core.cs
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate-3d/AgateLib/Core.cs:629-702,840-864
/branches/agate3d-3.2/AgateLib/Core.cs:923-1034
/branches/build/AgateLib/Core.cs:501-517,1081-1084
/branches/font/AgateLib/Core.cs:778-916
/branches/merge-tests/AgateLib/Core.cs:806-810
/branches/registrar/AgateLib/Core.cs:595-599
/branches/sprites/AgateLib/Core.cs:463-513
+ /branches/agate-3d/AgateLib/Core.cs:629-702,840-864
/branches/agate3d-3.2/AgateLib/Core.cs:923-1034
/branches/build/AgateLib/Core.cs:501-517,1081-1084
/branches/font/AgateLib/Core.cs:778-916
/branches/merge-tests/AgateLib/Core.cs:806-810
/branches/otkupdate/AgateLib/Core.cs:1068-1076
/branches/registrar/AgateLib/Core.cs:595-599
/branches/shaders/AgateLib/Core.cs:1087-1111
/branches/sprites/AgateLib/C...
[truncated message content] |
|
From: <ka...@us...> - 2009-11-24 01:37:12
|
Revision: 1116
http://agate.svn.sourceforge.net/agate/?rev=1116&view=rev
Author: kanato
Date: 2009-11-24 01:36:58 +0000 (Tue, 24 Nov 2009)
Log Message:
-----------
Initial FrameBuffer stubs.
Remove OpenTK.Compatibility.dll finally.
Modified Paths:
--------------
trunk/AgateLib/AgateLib.csproj
trunk/AgateLib/ImplementationBase/DisplayImpl.cs
trunk/Drivers/AgateDrawing/AgateDrawing.csproj
trunk/Drivers/AgateDrawing/Drawing_Display.cs
trunk/Drivers/AgateOTK/AgateOTK.csproj
trunk/Drivers/AgateOTK/GL_Display.cs
trunk/Drivers/AgateSDX/AgateSDX.csproj
trunk/Drivers/AgateSDX/SDX_Display.cs
Added Paths:
-----------
trunk/AgateLib/DisplayLib/FrameBuffer.cs
trunk/AgateLib/ImplementationBase/FrameBufferImpl.cs
trunk/Drivers/AgateDrawing/Drawing_FrameBuffer.cs
trunk/Drivers/AgateOTK/GL_FrameBuffer.cs
trunk/Drivers/AgateSDX/SDX_FrameBuffer.cs
Removed Paths:
-------------
trunk/Drivers/AgateOTK/OpenTK.Compatibility.dll
trunk/Drivers/AgateOTK/OpenTK.Compatibility.dll.config
trunk/Drivers/AgateOTK/OpenTK.Compatibility.xml
Modified: trunk/AgateLib/AgateLib.csproj
===================================================================
--- trunk/AgateLib/AgateLib.csproj 2009-11-23 23:22:24 UTC (rev 1115)
+++ trunk/AgateLib/AgateLib.csproj 2009-11-24 01:36:58 UTC (rev 1116)
@@ -97,6 +97,7 @@
<Compile Include="Core.cs">
<SubType>Code</SubType>
</Compile>
+ <Compile Include="DisplayLib\FrameBuffer.cs" />
<Compile Include="DisplayLib\Shaders\AgateBuiltInShaders.cs" />
<Compile Include="DisplayLib\Shaders\Basic2DShader.cs" />
<Compile Include="DisplayLib\Shaders\AgateShader.cs" />
@@ -112,6 +113,7 @@
<Compile Include="IFileProvider.cs">
<SubType>Code</SubType>
</Compile>
+ <Compile Include="ImplementationBase\FrameBufferImpl.cs" />
<Compile Include="Platform.cs" />
<Compile Include="PlatformType.cs" />
<Compile Include="Timing.cs">
Added: trunk/AgateLib/DisplayLib/FrameBuffer.cs
===================================================================
--- trunk/AgateLib/DisplayLib/FrameBuffer.cs (rev 0)
+++ trunk/AgateLib/DisplayLib/FrameBuffer.cs 2009-11-24 01:36:58 UTC (rev 1116)
@@ -0,0 +1,31 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using AgateLib.Geometry;
+using AgateLib.ImplementationBase;
+
+namespace AgateLib.DisplayLib
+{
+ public class FrameBuffer
+ {
+ FrameBufferImpl impl;
+
+ public FrameBuffer(Size size)
+ {
+ impl = Display.Impl.CreateFrameBuffer(size);
+ }
+ public FrameBuffer(int width, int height)
+ : this(new Size(width, height))
+ { }
+ public FrameBuffer(FrameBufferImpl impl)
+ {
+ this.impl = impl;
+ }
+
+ public FrameBufferImpl Impl
+ {
+ get { return impl; }
+ }
+ }
+}
Modified: trunk/AgateLib/ImplementationBase/DisplayImpl.cs
===================================================================
--- trunk/AgateLib/ImplementationBase/DisplayImpl.cs 2009-11-23 23:22:24 UTC (rev 1115)
+++ trunk/AgateLib/ImplementationBase/DisplayImpl.cs 2009-11-24 01:36:58 UTC (rev 1116)
@@ -597,7 +597,23 @@
throw new AgateException("Cannot create an index buffer with a driver that does not support 3D.");
}
+
/// <summary>
+ /// Creates one of the build in shaders in AgateLib. Implementers should
+ /// return null for any built in shader that is not supported.
+ /// Basic2DShader must have an implementation, but any other shader can be unsupported.
+ /// </summary>
+ /// <param name="BuiltInShaderType"></param>
+ /// <returns></returns>
+ protected internal abstract AgateShaderImpl CreateBuiltInShader(AgateLib.DisplayLib.Shaders.Implementation.BuiltInShader BuiltInShaderType);
+
+ /// <summary>
+ /// Creates a
+ /// </summary>
+ /// <param name="size"></param>
+ protected internal abstract FrameBufferImpl CreateFrameBuffer(Size size);
+
+ /// <summary>
/// Override this method if shaders are supported.
/// Only call the base class method if shaders aren't supported, as it throws a NotSupportedException.
/// </summary>
@@ -643,13 +659,5 @@
protected internal abstract bool GetRenderState(RenderStateBool renderStateBool);
protected internal abstract void SetRenderState(RenderStateBool renderStateBool, bool value);
- /// <summary>
- /// Creates one of the build in shaders in AgateLib. Implementers should
- /// return null for any built in shader that is not supported.
- /// Basic2DShader must have an implementation, but any other shader can be unsupported.
- /// </summary>
- /// <param name="BuiltInShaderType"></param>
- /// <returns></returns>
- protected internal abstract AgateShaderImpl CreateBuiltInShader(AgateLib.DisplayLib.Shaders.Implementation.BuiltInShader BuiltInShaderType);
}
}
Added: trunk/AgateLib/ImplementationBase/FrameBufferImpl.cs
===================================================================
--- trunk/AgateLib/ImplementationBase/FrameBufferImpl.cs (rev 0)
+++ trunk/AgateLib/ImplementationBase/FrameBufferImpl.cs 2009-11-24 01:36:58 UTC (rev 1116)
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using AgateLib.Geometry;
+
+namespace AgateLib.ImplementationBase
+{
+ public abstract class FrameBufferImpl : IDisposable
+ {
+ bool mIsDisposed = false;
+
+
+ public abstract void Dispose();
+
+ public abstract Size Size { get; }
+
+ public int Width { get { return Size.Width; } }
+ public int Height { get { return Size.Height; } }
+
+ }
+}
Modified: trunk/Drivers/AgateDrawing/AgateDrawing.csproj
===================================================================
--- trunk/Drivers/AgateDrawing/AgateDrawing.csproj 2009-11-23 23:22:24 UTC (rev 1115)
+++ trunk/Drivers/AgateDrawing/AgateDrawing.csproj 2009-11-24 01:36:58 UTC (rev 1116)
@@ -108,6 +108,7 @@
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
+ <Compile Include="Drawing_FrameBuffer.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\AgateLib\AgateLib.csproj">
Modified: trunk/Drivers/AgateDrawing/Drawing_Display.cs
===================================================================
--- trunk/Drivers/AgateDrawing/Drawing_Display.cs 2009-11-23 23:22:24 UTC (rev 1115)
+++ trunk/Drivers/AgateDrawing/Drawing_Display.cs 2009-11-24 01:36:58 UTC (rev 1116)
@@ -116,6 +116,10 @@
{
return AgateLib.WinForms.BitmapFontUtil.ConstructFromOSFont(bitmapOptions);
}
+ protected override FrameBufferImpl CreateFrameBuffer(AgateLib.Geometry.Size size)
+ {
+ return new Drawing_FrameBuffer(size);
+ }
#endregion
#region --- Direct modification of the back buffer ---
Added: trunk/Drivers/AgateDrawing/Drawing_FrameBuffer.cs
===================================================================
--- trunk/Drivers/AgateDrawing/Drawing_FrameBuffer.cs (rev 0)
+++ trunk/Drivers/AgateDrawing/Drawing_FrameBuffer.cs 2009-11-24 01:36:58 UTC (rev 1116)
@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using AgateLib.Geometry;
+using AgateLib.ImplementationBase;
+
+namespace AgateDrawing
+{
+ class Drawing_FrameBuffer: FrameBufferImpl
+ {
+ public Drawing_FrameBuffer(Size size)
+ {
+ }
+
+ public override void Dispose()
+ {
+ throw new NotImplementedException();
+ }
+
+ public override Size Size
+ {
+ get { throw new NotImplementedException(); }
+ }
+ }
+}
Modified: trunk/Drivers/AgateOTK/AgateOTK.csproj
===================================================================
--- trunk/Drivers/AgateOTK/AgateOTK.csproj 2009-11-23 23:22:24 UTC (rev 1115)
+++ trunk/Drivers/AgateOTK/AgateOTK.csproj 2009-11-24 01:36:58 UTC (rev 1116)
@@ -70,7 +70,6 @@
<Name>OpenTK</Name>
<HintPath>.\OpenTK.dll</HintPath>
</Reference>
- <Reference Include="OpenTK.Compatibility, Version=0.9.9.4, Culture=neutral, processorArchitecture=MSIL" />
<Reference Include="System">
<Name>System</Name>
</Reference>
@@ -102,9 +101,6 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
- <None Include="OpenTK.Compatibility.dll.config">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </None>
<None Include="OpenTK.dll.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
@@ -170,6 +166,7 @@
<Compile Include="Otk_Reporter.cs">
<SubType>Code</SubType>
</Compile>
+ <Compile Include="GL_FrameBuffer.cs" />
<Compile Include="Shaders\FixedFunction\FixedFunctionShaderFactory.cs" />
<Compile Include="Shaders\FixedFunction\OTK_FF_Basic2DShader.cs" />
<Compile Include="Shaders\FixedFunction\OTK_FF_Lighting3D.cs" />
@@ -187,16 +184,9 @@
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
- <Content Include="OpenTK.Compatibility.dll">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- <Content Include="OpenTK.Compatibility.xml">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
<Content Include="OpenTK.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
- <Content Include="OpenTK.GLControl.xml" />
<Content Include="OpenTK.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
Modified: trunk/Drivers/AgateOTK/GL_Display.cs
===================================================================
--- trunk/Drivers/AgateOTK/GL_Display.cs 2009-11-23 23:22:24 UTC (rev 1115)
+++ trunk/Drivers/AgateOTK/GL_Display.cs 2009-11-24 01:36:58 UTC (rev 1116)
@@ -134,6 +134,11 @@
return AgateLib.WinForms.BitmapFontUtil.ConstructFromOSFont(bitmapOptions);
}
+ protected override FrameBufferImpl CreateFrameBuffer(Size size)
+ {
+ return new GL_FrameBufferExt(size);
+ }
+
internal void SetupGLOrtho(Rectangle ortho)
{
SetOrthoProjection(ortho);
Added: trunk/Drivers/AgateOTK/GL_FrameBuffer.cs
===================================================================
--- trunk/Drivers/AgateOTK/GL_FrameBuffer.cs (rev 0)
+++ trunk/Drivers/AgateOTK/GL_FrameBuffer.cs 2009-11-24 01:36:58 UTC (rev 1116)
@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using AgateLib.Geometry;
+using AgateLib.ImplementationBase;
+
+namespace AgateOTK
+{
+ class GL_FrameBufferExt: FrameBufferImpl
+ {
+ public GL_FrameBufferExt(Size size)
+ {
+ }
+
+ public override void Dispose()
+ {
+ throw new NotImplementedException();
+ }
+
+ public override Size Size
+ {
+ get { throw new NotImplementedException(); }
+ }
+ }
+}
Deleted: trunk/Drivers/AgateOTK/OpenTK.Compatibility.dll
===================================================================
(Binary files differ)
Deleted: trunk/Drivers/AgateOTK/OpenTK.Compatibility.dll.config
===================================================================
--- trunk/Drivers/AgateOTK/OpenTK.Compatibility.dll.config 2009-11-23 23:22:24 UTC (rev 1115)
+++ trunk/Drivers/AgateOTK/OpenTK.Compatibility.dll.config 2009-11-24 01:36:58 UTC (rev 1116)
@@ -1,11 +0,0 @@
-<configuration>
- <dllmap os="linux" dll="opengl32.dll" target="libGL.so.1"/>
- <dllmap os="linux" dll="glu32.dll" target="libGLU.so.1"/>
- <dllmap os="linux" dll="openal32.dll" target="libopenal.so.1"/>
- <dllmap os="linux" dll="alut.dll" target="libalut.so.0"/>
- <dllmap os="linux" dll="opencl.dll" target="libOpenCL.so"/>
- <dllmap os="osx" dll="openal32.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" />
- <dllmap os="osx" dll="alut.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" />
- <dllmap os="osx" dll="libGLES.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
- <dllmap os="osx" dll="libGLESv2.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
-</configuration>
Deleted: trunk/Drivers/AgateOTK/OpenTK.Compatibility.xml
===================================================================
--- trunk/Drivers/AgateOTK/OpenTK.Compatibility.xml 2009-11-23 23:22:24 UTC (rev 1115)
+++ trunk/Drivers/AgateOTK/OpenTK.Compatibility.xml 2009-11-24 01:36:58 UTC (rev 1116)
@@ -1,105220 +0,0 @@
-<?xml version="1.0"?>
-<doc>
- <assembly>
- <name>OpenTK.Compatibility</name>
- </assembly>
- <members>
- <member name="T:Tao.Platform.Windows.SimpleOpenGlControl">
- <summary>
- Provides a simple OpenGL control allowing quick development of Windows.Forms-based
- OpenGL applications. Relies on OpenTK.GLControl for cross-platform compatibility.
- </summary>
- </member>
- <member name="F:Tao.Platform.Windows.SimpleOpenGlControl.components">
- <summary>
- Required designer variable.
- </summary>
- </member>
- <member name="M:Tao.Platform.Windows.SimpleOpenGlControl.Dispose(System.Boolean)">
- <summary>
- Clean up any resources being used.
- </summary>
- <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
- </member>
- <member name="M:Tao.Platform.Windows.SimpleOpenGlControl.InitializeComponent">
- <summary>
- Required method for Designer support - do not modify
- the contents of this method with the code editor.
- </summary>
- </member>
- <member name="M:Tao.Platform.Windows.SimpleOpenGlControl.#ctor">
- <summary>
- Constructor. Creates contexts and sets properties.
- </summary>
- </member>
- <member name="M:Tao.Platform.Windows.SimpleOpenGlControl.DestroyContexts">
- <summary>
-
- </summary>
- </member>
- <member name="M:Tao.Platform.Windows.SimpleOpenGlControl.Draw">
- <summary>
- Sends an see cref="UserControl.Invalidate" command to this control, thus
- forcing a redraw to occur.
- </summary>
- </member>
- <member name="M:Tao.Platform.Windows.SimpleOpenGlControl.InitializeContexts">
- <summary>
- Creates the OpenGL contexts.
- </summary>
- </member>
- <member name="M:Tao.Platform.Windows.SimpleOpenGlControl.OnPaint(System.Windows.Forms.PaintEventArgs)">
- <summary>
- Paints the control.
- </summary>
- <param name="e">The paint event arguments.</param>
- </member>
- <member name="M:Tao.Platform.Windows.SimpleOpenGlControl.InitializeBackground">
- <summary>
- Loads the bitmap from the assembly's manifest resource.
- </summary>
- </member>
- <member name="M:Tao.Platform.Windows.SimpleOpenGlControl.InitializeStyles">
- <summary>
- Initializes the control's styles.
- </summary>
- </member>
- <member name="P:Tao.Platform.Windows.SimpleOpenGlControl.LogScaleX">
- <summary>
- Gets the number of logical pixels or dots per inch (dpi) in X-direction
- </summary>
- </member>
- <member name="P:Tao.Platform.Windows.SimpleOpenGlControl.LogScaleY">
- <summary>
- Gets the number of logical pixels or dots per inch (dpi) in Y-direction
- </summary>
- </member>
- <member name="P:Tao.Platform.Windows.SimpleOpenGlControl.AccumBits">
- <summary>
- Gets and sets the OpenGL control's accumulation buffer depth.
- </summary>
- </member>
- <member name="P:Tao.Platform.Windows.SimpleOpenGlControl.ColorBits">
- <summary>
- Gets and sets the OpenGL control's color buffer depth.
- </summary>
- </member>
- <member name="P:Tao.Platform.Windows.SimpleOpenGlControl.DepthBits">
- <summary>
- Gets and sets the OpenGL control's depth buffer (Z-buffer) depth.
- </summary>
- </member>
- <member name="P:Tao.Platform.Windows.SimpleOpenGlControl.StencilBits">
- <summary>
- Gets and sets the OpenGL control's stencil buffer depth.
- </summary>
- </member>
- <member name="P:Tao.Platform.Windows.SimpleOpenGlControl.AutoCheckErrors">
- <summary>
- Gets and sets the OpenGL control's automatic sending of a glGetError command
- after drawing.
- </summary>
- </member>
- <member name="P:Tao.Platform.Windows.SimpleOpenGlControl.AutoFinish">
- <summary>
- Gets and sets the OpenGL control's automatic sending of a glFinish command
- after drawing.
- </summary>
- </member>
- <member name="P:Tao.Platform.Windows.SimpleOpenGlControl.AutoMakeCurrent">
- <summary>
- Gets and sets the OpenGL control's automatic forcing of the rendering context to
- be current before drawing.
- </summary>
- </member>
- <member name="P:Tao.Platform.Windows.SimpleOpenGlControl.AutoSwapBuffers">
- <summary>
- Gets and sets the OpenGL control's automatic sending of a SwapBuffers command
- after drawing.
- </summary>
- </member>
- <member name="P:Tao.Platform.Windows.SimpleOpenGlControl.CreateParams">
- <summary>
- Overrides the control's class style parameters.
- </summary>
- </member>
- <member name="T:Tao.OpenGl.Gl">
- <summary>
- OpenGL binding for .NET, implementing OpenGL 2.1, plus extensions.
- </summary>
- <remarks>
- <para>
- This class contains all OpenGL enums and functions defined in the 2.1 specification.
- The official .spec files can be found at: http://opengl.org/registry/.
- </para>
- <para>
- We rely on static initialization to obtain the entry points for OpenGL functions.
- Please ensure that a valid OpenGL context has been made current in the pertinent thread <b>before</b>
- any OpenGL functions are called (toolkits like GLUT, SDL or GLFW will automatically take care of
- the context initialization process). Without a valid OpenGL context, we will only be able
- to retrieve statically exported entry points (typically corresponding to OpenGL version 1.1 under Windows,
- 1.3 under Linux and 1.4 under Windows Vista), and extension methods will need to be loaded manually.
- </para>
- <para>
- If you prefer to have more control on extension loading, you can use the
- ReloadFunctions or ReloadFunction methods to manually force the initialisation of OpenGL entry points.
- The ReloadFunctions method should be called whenever you change an existing visual or pixelformat. This
- generally happens when you change the color/stencil/depth buffer associated with a window (but probably
- not the resolution). This may or may not be necessary under Linux/MacOS, but is generally required for
- Windows.
- </para>
- <para>
- You can use the Gl.IsExtensionSupported method to check whether any given category of extension functions
- exists in the current OpenGL context. The results can be cached to speed up future searches.
- Keep in mind that different OpenGL contexts may support different extensions, and under different entry
- points. Always check if all required extensions are still supported when changing visuals or pixel
- formats.
- </para>
- <para>
- You may retrieve the entry point for an OpenGL function using the Gl.GetDelegate method.
- </para>
- <para>
- <see href="http://opengl.org/registry/"/>
- <seealso cref="M:Tao.OpenGl.Gl.IsExtensionSupported(System.String)"/>
- <seealso cref="M:Tao.OpenGl.Gl.GetDelegate(System.String,System.Type)"/>
- <seealso cref="M:Tao.OpenGl.Gl.ReloadFunctions"/>
- </para>
- </remarks>
- </member>
- <member name="M:Tao.OpenGl.Gl.IsExtensionSupported(System.String)">
- <summary>
- Determines whether the specified OpenGL extension category is available in
- the current OpenGL context. Equivalent to IsExtensionSupported(name, true)
- </summary>
- <param name="name">The string for the OpenGL extension category (eg. "GL_ARB_multitexture")</param>
- <returns>True if the specified extension is available, false otherwise.</returns>
- </member>
- <member name="M:Tao.OpenGl.Gl.GetDelegate(System.String,System.Type)">
- <summary>
- Creates a System.Delegate that can be used to call an OpenGL function, core or extension.
- </summary>
- <param name="name">The name of the OpenGL function (eg. "glNewList")</param>
- <param name="signature">The signature of the OpenGL function.</param>
- <returns>
- A System.Delegate that can be used to call this OpenGL function, or null if the specified
- function name did not correspond to an OpenGL function.
- </returns>
- </member>
- <member name="M:Tao.OpenGl.Gl.ReloadFunctions">
- <summary>
- Loads all OpenGL functions (core and extensions).
- </summary>
- <remarks>
- <para>
- This function will be automatically called the first time you use any opengl function. There is
- </para>
- <para>
- Call this function manually whenever you need to update OpenGL entry points.
- This need may arise if you change the pixelformat/visual, or in case you cannot
- (or do not want) to use the automatic initialization of the GL class.
- </para>
- </remarks>
- </member>
- <member name="M:Tao.OpenGl.Gl.Load(System.String)">
- <summary>
- Tries to reload the given OpenGL function (core or extension).
- </summary>
- <param name="function">The name of the OpenGL function (i.e. glShaderSource)</param>
- <returns>True if the function was found and reloaded, false otherwise.</returns>
- <remarks>
- <para>
- Use this function if you require greater granularity when loading OpenGL entry points.
- </para>
- <para>
- While the automatic initialisation will load all OpenGL entry points, in some cases
- the initialisation can take place before an OpenGL Context has been established.
- In this case, use this function to load the entry points for the OpenGL functions
- you will need, or use ReloadFunctions() to load all available entry points.
- </para>
- <para>
- This function returns true if the given OpenGL function is supported, false otherwise.
- </para>
- <para>
- To query for supported extensions use the IsExtensionSupported() function instead.
- </para>
- </remarks>
- </member>
- <member name="M:Tao.OpenGl.Gl.BuildExtensionList">
- <summary>
- Builds a cache of all supported extensions.
- </summary>
- </member>
- <member name="M:Tao.OpenGl.Gl.GetAddress(System.String)">
- <summary>
- Retrieves the entry point for a dynamically exported OpenGL function.
- </summary>
- <param name="function">The function string for the OpenGL function (eg. "glNewList")</param>
- <returns>
- An IntPtr contaning the address for the entry point, or IntPtr.Zero if the specified
- OpenGL function is not dynamically exported.
- </returns>
- <remarks>
- <para>
- The Marshal.GetDelegateForFunctionPointer method can be used to turn the return value
- into a call-able delegate.
- </para>
- <para>
- This function is cross-platform. It determines the underlying platform and uses the
- correct wgl, glx or agl GetAddress function to retrieve the function pointer.
- </para>
- <see cref="M:System.Runtime.InteropServices.Marshal.GetDelegateForFunctionPointer(System.IntPtr,System.Type)"/>
- </remarks>
- </member>
- <member name="M:Tao.OpenGl.Gl.DetectUnixKernel">
- <summary>
- Executes "uname" which returns a string representing the name of the
- underlying Unix kernel.
- </summary>
- <returns>"Unix", "Linux", "Darwin" or null.</returns>
- <remarks>Source code from "Mono: A Developer's Notebook"</remarks>
- </member>
- <member name="M:Tao.OpenGl.Gl.GetExtensionDelegate(System.String,System.Type)">
- <summary>
- Creates a System.Delegate that can be used to call a dynamically exported OpenGL function.
- </summary>
- <param name="name">The name of the OpenGL function (eg. "glNewList")</param>
- <param name="signature">The signature of the OpenGL function.</param>
- <returns>
- A System.Delegate that can be used to call this OpenGL function or null
- if the function is not available in the current OpenGL context.
- </returns>
- </member>
- <member name="T:Tao.OpenGl.Gl.Imports">
- <summary>
- Contains DllImports for the core OpenGL functions.
- </summary>
- </member>
- <member name="F:Tao.OpenGl.Gl.Imports.FunctionMap">
- <summary>
- Build a string->MethodInfo map to speed up extension loading.
- </summary>
- </member>
- <member name="M:OpenTK.Graphics.Text.Glyph.#ctor(System.Char,System.Drawing.Font)">
- <summary>
- Constructs a new Glyph that represents the given character and Font.
- </summary>
- <param name="c">The character to represent.</param>
- <param name="font">The Font of the character.</param>
- </member>
- <member name="M:OpenTK.Graphics.Text.Glyph.Equals(System.Object)">
- <summary>
- Checks whether the given object is equal (memberwise) to the current Glyph.
- </summary>
- <param name="obj">The obj to check.</param>
- <returns>True, if the object is identical to the current Glyph.</returns>
- </member>
- <member name="M:OpenTK.Graphics.Text.Glyph.ToString">
- <summary>
- Describes this Glyph object.
- </summary>
- <returns>Returns a System.String describing this Glyph.</returns>
- </member>
- <member name="M:OpenTK.Graphics.Text.Glyph.GetHashCode">
- <summary>
- Calculates the hashcode for this Glyph.
- </summary>
- <returns>A System.Int32 containing a hashcode that uniquely identifies this Glyph.</returns>
- </member>
- <member name="P:OpenTK.Graphics.Text.Glyph.Character">
- <summary>
- Gets the character represented by this Glyph.
- </summary>
- </member>
- <member name="P:OpenTK.Graphics.Text.Glyph.Font">
- <summary>
- Gets the Font of this Glyph.
- </summary>
- </member>
- <member name="T:OpenTK.Graphics.IGraphicsResource">
- <summary>
- Defines a common interface to all OpenGL resources.
- </summary>
- </member>
- <member name="P:OpenTK.Graphics.IGraphicsResource.Context">
- <summary>
- Gets the GraphicsContext that owns this resource.
- </summary>
- </member>
- <member name="P:OpenTK.Graphics.IGraphicsResource.Id">
- <summary>
- Gets the Id of this IGraphicsResource.
- </summary>
- </member>
- <member name="P:OpenTK.Graphics.Texture2D.Width">
- <summary>Gets the width of the texture.</summary>
- </member>
- <member name="P:OpenTK.Graphics.Texture2D.Height">
- <summary>Gets the height of the texture.</summary>
- </member>
- <member name="T:OpenTK.Compatibility.Properties.Resources">
- <summary>
- A strongly-typed resource class, for looking up localized strings, etc.
- </summary>
- </member>
- <member name="P:OpenTK.Compatibility.Properties.Resources.ResourceManager">
- <summary>
- Returns the cached ResourceManager instance used by this class.
- </summary>
- </member>
- <member name="P:OpenTK.Compatibility.Properties.Resources.Culture">
- <summary>
- Overrides the current thread's CurrentUICulture property for all
- resource lookups using this strongly typed resource class.
- </summary>
- </member>
- <member name="T:Tao.OpenGl.Glu">
- <summary>
- GLU (OpenGL Utility) binding for .NET, implementing GLU 1.3.
- </summary>
- <remarks>
- <para>
- Binds functions and definitions in glu32.dll or libGLU.so.
- </para>
- <para>
- The OpenGL Utility (GLU) library contains several groups of functions that
- complement the core OpenGL interface by providing support for auxiliary features.
- These features include: mipmapping, matrix manipulation, polygon tessellation,
- ...
[truncated message content] |
|
From: <ka...@us...> - 2009-11-24 07:05:27
|
Revision: 1117
http://agate.svn.sourceforge.net/agate/?rev=1117&view=rev
Author: kanato
Date: 2009-11-24 07:05:13 +0000 (Tue, 24 Nov 2009)
Log Message:
-----------
Implement FrameBuffer.
Modified Paths:
--------------
trunk/AgateLib/DisplayLib/Display.cs
trunk/AgateLib/DisplayLib/DisplayWindow.cs
trunk/AgateLib/DisplayLib/FrameBuffer.cs
trunk/AgateLib/DisplayLib/Surface.cs
trunk/AgateLib/Drivers/TypeID.cs
trunk/AgateLib/ImplementationBase/DisplayImpl.cs
trunk/AgateLib/ImplementationBase/DisplayWindowImpl.cs
trunk/AgateLib/ImplementationBase/FrameBufferImpl.cs
trunk/AgateLib/ImplementationBase/SurfaceImpl.cs
trunk/Drivers/AgateDrawing/AgateDrawing.csproj
trunk/Drivers/AgateDrawing/Drawing_Display.cs
trunk/Drivers/AgateDrawing/Drawing_DisplayWindow.cs
trunk/Drivers/AgateDrawing/Drawing_FontSurface.cs
trunk/Drivers/AgateDrawing/Drawing_FrameBuffer.cs
trunk/Drivers/AgateDrawing/Drawing_Surface.cs
trunk/Drivers/AgateOTK/AgateOTK.csproj
trunk/Drivers/AgateOTK/GL_Display.cs
trunk/Drivers/AgateOTK/GL_DisplayControl.cs
trunk/Drivers/AgateOTK/GL_GameWindow.cs
trunk/Drivers/AgateOTK/GL_Surface.cs
trunk/Drivers/AgateSDX/AgateSDX.csproj
trunk/Drivers/AgateSDX/D3DDevice.cs
trunk/Drivers/AgateSDX/SDX_Display.cs
trunk/Drivers/AgateSDX/SDX_DisplayWindow.cs
trunk/Drivers/AgateSDX/SDX_FrameBuffer.cs
trunk/Drivers/AgateSDX/SDX_Surface.cs
trunk/Tests/DisplayTests/MultipleWindows/MultipleWindowTest.cs
trunk/Tests/DisplayTests/ScreenCapture.cs
Added Paths:
-----------
trunk/Drivers/AgateOTK/ContextFB.cs
trunk/Drivers/AgateOTK/GL3/
trunk/Drivers/AgateOTK/GL3/FrameBuffer.cs
trunk/Drivers/AgateOTK/GL_FrameBuffer.cs
trunk/Drivers/AgateOTK/Legacy/
trunk/Drivers/AgateOTK/Legacy/ArbShader.cs
trunk/Drivers/AgateOTK/Legacy/ArbShaderCompiler.cs
trunk/Drivers/AgateOTK/Legacy/FrameBufferExt.cs
trunk/Drivers/AgateOTK/Legacy/FrameBufferReadPixels.cs
trunk/Drivers/AgateOTK/Shaders/GlslFragmentProgram.cs
trunk/Drivers/AgateOTK/Shaders/GlslShader.cs
trunk/Drivers/AgateOTK/Shaders/GlslShaderCompiler.cs
trunk/Drivers/AgateOTK/Shaders/GlslVertexProgram.cs
trunk/Drivers/AgateOTK/Shaders/OtkShader.cs
trunk/Drivers/AgateSDX/FrameBufferSurface.cs
trunk/Drivers/AgateSDX/FrameBufferWindow.cs
Removed Paths:
-------------
trunk/Drivers/AgateDrawing/Drawing_IRenderTarget.cs
trunk/Drivers/AgateOTK/ArbShader.cs
trunk/Drivers/AgateOTK/ArbShaderCompiler.cs
trunk/Drivers/AgateOTK/GLState.cs
trunk/Drivers/AgateOTK/GL_FrameBuffer.cs
trunk/Drivers/AgateOTK/GL_IRenderTarget.cs
trunk/Drivers/AgateOTK/GlslFragmentProgram.cs
trunk/Drivers/AgateOTK/GlslShader.cs
trunk/Drivers/AgateOTK/GlslShaderCompiler.cs
trunk/Drivers/AgateOTK/GlslVertexProgram.cs
trunk/Drivers/AgateOTK/OtkShader.cs
Modified: trunk/AgateLib/DisplayLib/Display.cs
===================================================================
--- trunk/AgateLib/DisplayLib/Display.cs 2009-11-24 01:36:58 UTC (rev 1116)
+++ trunk/AgateLib/DisplayLib/Display.cs 2009-11-24 07:05:13 UTC (rev 1117)
@@ -189,7 +189,7 @@
/// Must be called outside of BeginFrame..EndFrame blocks
/// (usually just before BeginFrame).
/// </summary>
- public static IRenderTarget RenderTarget
+ public static FrameBuffer RenderTarget
{
get
{
@@ -202,17 +202,19 @@
impl.RenderTarget = value;
- if (value is DisplayWindow)
- mCurrentWindow = (DisplayWindow)value;
-
+ // TODO: replace this with an ActiveWindow property.
+ //if (value is DisplayWindow)
+ // mCurrentWindow = (DisplayWindow)value;
}
}
+
/// <summary>
/// Gets the last render target used which was a DisplayWindow.
/// </summary>
public static DisplayWindow CurrentWindow
{
get { return mCurrentWindow; }
+ internal set { mCurrentWindow = value; }
}
/// <summary>
Modified: trunk/AgateLib/DisplayLib/DisplayWindow.cs
===================================================================
--- trunk/AgateLib/DisplayLib/DisplayWindow.cs 2009-11-24 01:36:58 UTC (rev 1116)
+++ trunk/AgateLib/DisplayLib/DisplayWindow.cs 2009-11-24 07:05:13 UTC (rev 1117)
@@ -35,9 +35,10 @@
///
/// Alternatively, a control may be specified to render into.
/// </remarks>
- public sealed class DisplayWindow : IRenderTarget, IDisposable
+ public sealed class DisplayWindow : IDisposable
{
DisplayWindowImpl impl;
+ FrameBuffer frameBuffer;
/// <summary>
/// Constructs a DisplayWindow from a resource.
@@ -85,8 +86,11 @@
impl = Display.Impl.CreateDisplayWindow(windowParams);
- Display.RenderTarget = this;
+ Display.RenderTarget = FrameBuffer;
Display.DisposeDisplay += new Display.DisposeDisplayHandler(Dispose);
+
+ // TODO: Fix this hack
+ Display.CurrentWindow = this;
}
#region --- Static Creation Methods ---
@@ -169,6 +173,25 @@
#endregion
+ public FrameBuffer FrameBuffer
+ {
+ get
+ {
+ if (frameBuffer == null || frameBuffer.Impl != Impl.FrameBuffer)
+ {
+ frameBuffer = new FrameBuffer(Impl.FrameBuffer);
+ }
+
+ return frameBuffer;
+ }
+ }
+
+ [Obsolete]
+ public static implicit operator FrameBuffer(DisplayWindow wind)
+ {
+ return wind.FrameBuffer;
+ }
+
/// <summary>
/// Disposes of unmanaged resources.
/// </summary>
@@ -309,12 +332,6 @@
get { return Matrix4x4.Ortho(new RectangleF(0, 0, Width, Height), -1, 1); }
}
- #region --- IRenderTarget Members ---
-
- IRenderTargetImpl IRenderTarget.Impl
- {
- get { return impl; }
- }
/// <summary>
/// Event raised when the window is resized by the user.
/// </summary>
@@ -326,6 +343,5 @@
Resize(this, EventArgs.Empty);
}
- #endregion
}
}
\ No newline at end of file
Modified: trunk/AgateLib/DisplayLib/FrameBuffer.cs
===================================================================
--- trunk/AgateLib/DisplayLib/FrameBuffer.cs 2009-11-24 01:36:58 UTC (rev 1116)
+++ trunk/AgateLib/DisplayLib/FrameBuffer.cs 2009-11-24 07:05:13 UTC (rev 1117)
@@ -27,5 +27,48 @@
{
get { return impl; }
}
+
+ public Size Size
+ {
+ get { return Impl.Size; }
+ }
+ public int Height
+ {
+ get { return Impl.Height; }
+ }
+ public int Width
+ {
+ get { return Impl.Width; }
+ }
+
+ public void BeginRender()
+ {
+ }
+ public void EndRender()
+ { }
+
+ public bool CanAccessBackBuffer
+ {
+ get { return Impl.CanAccessBackBuffer; }
+ }
+
+ Surface mBackBuffer;
+
+ public Surface BackBuffer
+ {
+ get
+ {
+ if (mBackBuffer != null && mBackBuffer.Impl != Impl.BackBuffer)
+ {
+ mBackBuffer.Dispose();
+ mBackBuffer = null;
+ }
+
+ if (mBackBuffer == null)
+ mBackBuffer = new Surface(Impl.BackBuffer);
+
+ return mBackBuffer;
+ }
+ }
}
}
Modified: trunk/AgateLib/DisplayLib/Surface.cs
===================================================================
--- trunk/AgateLib/DisplayLib/Surface.cs 2009-11-24 01:36:58 UTC (rev 1116)
+++ trunk/AgateLib/DisplayLib/Surface.cs 2009-11-24 07:05:13 UTC (rev 1117)
@@ -88,7 +88,7 @@
/// </code>
/// </example>
/// </summary>
- public sealed class Surface : IRenderTarget, IDisposable, ISurface
+ public sealed class Surface : IDisposable, ISurface
{
SurfaceImpl impl;
SurfaceState mState = new SurfaceState();
@@ -232,37 +232,6 @@
#region --- Surface properties ---
/// <summary>
- /// Gets or sets how many times this surface should be broken down
- /// when drawn. A TesselateFactor of 2 indicates that each time
- /// this surface is drawn, it's drawn in 4 (2x2) chunks.
- /// </summary>
- /// <remarks>
- /// This property is used to divide a surface drawn up into smaller
- /// surfaces which are drawn independently. The reason to do this is
- /// lighting calculations (without using shaders) are done on a per-vertex
- /// basis. When a light source is close to a large surface, this will create
- /// noticably bad lighting, because only the lighting properties at the
- /// corners are calculated, and then the lighting is interpolated between
- /// the end points.
- /// <para>
- /// Changing this value while using gradients can result in ugly transitions between
- /// different tesselation values. The reason is AgateLib will interpolate the gradient
- /// color to the vertices used, and then this is capped to integer values. So avoid
- /// doing this.</para>
- /// <para>
- /// Setting this value high may have a significant impact on performance.
- /// For each time a Surface.Draw() overload is called, the number of triangles
- /// which are calculated and sent to the rasterizer is 2 * TesselateFactor<sup>2</sup>.
- /// </para>
- /// </remarks>
- ///
- [Obsolete("Use shaders for lighting effects.")]
- public int TesselateFactor
- {
- get { return impl.TesselateFactor; }
- set { impl.TesselateFactor = value; }
- }
- /// <summary>
/// Gets or sets a bool value that indicates whether or not this surface
/// should be included in a call to Display.PackAllSurfaces.
/// </summary>
@@ -900,48 +869,5 @@
{
get { return impl; }
}
-
- #region --- IRenderTarget Members ---
-
- IRenderTargetImpl IRenderTarget.Impl
- {
- get { return impl; }
- }
-
- Size IRenderTarget.Size
- {
- get { return SurfaceSize; }
- }
-
- EventHandler ResizeEventHandlers;
-
- event EventHandler IRenderTarget.Resize
- {
- add { ResizeEventHandlers += value; }
- remove { ResizeEventHandlers -= value; }
- }
-
- internal void OnResize()
- {
- if (ResizeEventHandlers != null)
- {
- ResizeEventHandlers(this, EventArgs.Empty);
- }
- }
-
-
- int IRenderTarget.Width
- {
- get { return SurfaceWidth; }
- }
-
- int IRenderTarget.Height
- {
- get { return SurfaceHeight; }
- }
-
- #endregion
-
-
}
}
Modified: trunk/AgateLib/Drivers/TypeID.cs
===================================================================
--- trunk/AgateLib/Drivers/TypeID.cs 2009-11-24 01:36:58 UTC (rev 1116)
+++ trunk/AgateLib/Drivers/TypeID.cs 2009-11-24 07:05:13 UTC (rev 1117)
@@ -43,12 +43,13 @@
AutoSelect = 0,
/// <summary>
- /// The reference driver is implemented using System.Drawing. This is useful for
+ /// The software System.Drawing driver. This is useful for
/// debugging the development of a new driver, as it should behave exactly like the
- /// reference driver (but hopefully be much faster).
+ /// reference driver for 2D drawing.
/// </summary>
+ Drawing = 1,
Reference = 1,
-
+
/// <summary>
/// Driver Implementation using SlimDX.
/// </summary>
@@ -72,8 +73,9 @@
/// <summary>
/// Driver implementation using SDL. SDL.NET does not support many of the basic features
- /// of this library (notably);}} rotation of images) so is not considered an adequate driver
- /// for general purpose use.
+ /// of this library (notably, rotation of images) so is not considered an adequate driver
+ /// for general purpose use. However it may be the only driver available for certain target
+ /// platforms.
/// </summary>
SDL = 0x300,
Modified: trunk/AgateLib/ImplementationBase/DisplayImpl.cs
===================================================================
--- trunk/AgateLib/ImplementationBase/DisplayImpl.cs 2009-11-24 01:36:58 UTC (rev 1116)
+++ trunk/AgateLib/ImplementationBase/DisplayImpl.cs 2009-11-24 07:05:13 UTC (rev 1117)
@@ -36,7 +36,7 @@
{
private double mAlphaThreshold = 5.0 / 255.0;
- private IRenderTarget mRenderTarget;
+ private FrameBuffer mRenderTarget;
public abstract bool Supports(DisplayBoolCaps caps);
public abstract Size CapsSize(DisplaySizeCaps displaySizeCaps);
@@ -48,7 +48,7 @@
/// <summary>
/// Gets or sets the current render target.
/// </summary>
- public IRenderTarget RenderTarget
+ public FrameBuffer RenderTarget
{
get
{
@@ -62,7 +62,7 @@
if (mInFrame)
throw new AgateException("Cannot change render target between BeginFrame and EndFrame");
- IRenderTarget old = mRenderTarget;
+ FrameBuffer old = mRenderTarget;
mRenderTarget = value;
OnRenderTargetChange(old);
@@ -78,7 +78,7 @@
/// Event raised when the current render target is changed.
/// </summary>
/// <param name="oldRenderTarget"></param>
- protected abstract void OnRenderTargetChange(IRenderTarget oldRenderTarget);
+ protected abstract void OnRenderTargetChange(FrameBuffer oldRenderTarget);
/// <summary>
/// Event raised when the render target is resized.
/// </summary>
Modified: trunk/AgateLib/ImplementationBase/DisplayWindowImpl.cs
===================================================================
--- trunk/AgateLib/ImplementationBase/DisplayWindowImpl.cs 2009-11-24 01:36:58 UTC (rev 1116)
+++ trunk/AgateLib/ImplementationBase/DisplayWindowImpl.cs 2009-11-24 07:05:13 UTC (rev 1117)
@@ -28,7 +28,7 @@
/// <summary>
/// Implementation of DisplayWindow class.
/// </summary>
- public abstract class DisplayWindowImpl : IRenderTargetImpl, IDisposable
+ public abstract class DisplayWindowImpl : IDisposable
{
/// <summary>
/// Disposes of unmanaged resources.
@@ -46,37 +46,12 @@
public abstract bool IsFullScreen { get; }
/// <summary>
- /// Toggles windowed/fullscreen.
- /// If this is unsupported, this method should silently return
- /// (do not throw an error).
+ /// Returns the frame buffer that is rendered to for rendering to this
+ /// window.
/// </summary>
- public void ToggleFullScreen()
- {
- if (IsFullScreen)
- SetWindowed();
- else
- SetFullScreen();
- }
+ public abstract FrameBufferImpl FrameBuffer { get; }
/// <summary>
- /// Toggles windowed/fullscreen.
- /// If this is unsupported, this method should silently return
- /// (do not throw an error).
- ///
- /// Attempts to match width, height and bpp as best as possible.
- /// </summary>
- /// <param name="width"></param>
- /// <param name="height"></param>
- /// <param name="bpp"></param>
- public void ToggleFullScreen(int width, int height, int bpp)
- {
- if (IsFullScreen)
- SetWindowed();
- else
- SetFullScreen(width, height, bpp);
- }
-
- /// <summary>
/// Sets the display to windowed. Does nothing if the display is already
/// windowed. The DisplayWindow retains the same height and width as the
/// previous full screen resolution.
@@ -134,21 +109,5 @@
/// </summary>
public abstract Point MousePosition { get; set; }
- #region --- IRenderTargetImpl Members ---
-
- /// <summary>
- /// Utility function which may be called by the DisplayImpl when
- /// rendering begins.
- /// </summary>
- public abstract void BeginRender();
- /// <summary>
- /// Utility function which may be called by the DisplayImpl when
- /// rendering is done.
- /// </summary>
- public abstract void EndRender();
-
- #endregion
-
}
-
}
\ No newline at end of file
Modified: trunk/AgateLib/ImplementationBase/FrameBufferImpl.cs
===================================================================
--- trunk/AgateLib/ImplementationBase/FrameBufferImpl.cs 2009-11-24 01:36:58 UTC (rev 1116)
+++ trunk/AgateLib/ImplementationBase/FrameBufferImpl.cs 2009-11-24 07:05:13 UTC (rev 1117)
@@ -8,9 +8,6 @@
{
public abstract class FrameBufferImpl : IDisposable
{
- bool mIsDisposed = false;
-
-
public abstract void Dispose();
public abstract Size Size { get; }
@@ -18,5 +15,16 @@
public int Width { get { return Size.Width; } }
public int Height { get { return Size.Height; } }
+ public abstract void BeginRender();
+ public abstract void EndRender();
+
+ public virtual bool CanAccessBackBuffer
+ {
+ get { return false; }
+ }
+ public virtual SurfaceImpl BackBuffer
+ {
+ get { throw new NotImplementedException(); }
+ }
}
}
Modified: trunk/AgateLib/ImplementationBase/SurfaceImpl.cs
===================================================================
--- trunk/AgateLib/ImplementationBase/SurfaceImpl.cs 2009-11-24 01:36:58 UTC (rev 1116)
+++ trunk/AgateLib/ImplementationBase/SurfaceImpl.cs 2009-11-24 07:05:13 UTC (rev 1117)
@@ -28,15 +28,13 @@
/// <summary>
/// Base class for implementing a Surface structure.
/// </summary>
- public abstract class SurfaceImpl : IRenderTargetImpl, IDisposable
+ public abstract class SurfaceImpl : IDisposable
{
#region --- Private Fields ---
private bool mIsDisposed = false;
private bool mShouldBePacked = true;
- private int mTesselate = 1;
-
#endregion
#region --- Creation / Destruction ---
@@ -135,19 +133,6 @@
set { mInterpolationHint = value; }
}
/// <summary>
- /// Gets or sets how many squares the surface should be broken into when drawn.
- /// </summary>
- public int TesselateFactor
- {
- get { return mTesselate; }
- set
- {
- if (value < 1) value = 1;
-
- mTesselate = value;
- }
- }
- /// <summary>
/// Returns true if Dispose() has been called on this surface.
/// </summary>
public bool IsDisposed
@@ -263,38 +248,5 @@
}
#endregion
-
-
-
- #region --- IRenderTargetImpl Members ---
-
- /// <summary>
- /// Utility function which can be called by BeginFrame to begin
- /// a render pass.
- /// </summary>
- public abstract void BeginRender();
- /// <summary>
- /// Utility function which can be called by EndFrame to end a render pass.
- /// </summary>
- public abstract void EndRender();
-
- Size IRenderTargetImpl.Size
- {
- get { return SurfaceSize; }
- }
-
- int IRenderTargetImpl.Width
- {
- get { return SurfaceWidth; }
- }
-
- int IRenderTargetImpl.Height
- {
- get { return SurfaceHeight; }
- }
-
- #endregion
-
};
-
}
Modified: trunk/Drivers/AgateDrawing/AgateDrawing.csproj
===================================================================
--- trunk/Drivers/AgateDrawing/AgateDrawing.csproj 2009-11-24 01:36:58 UTC (rev 1116)
+++ trunk/Drivers/AgateDrawing/AgateDrawing.csproj 2009-11-24 07:05:13 UTC (rev 1117)
@@ -96,9 +96,6 @@
<Compile Include="Drawing_FontSurface.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="Drawing_IRenderTarget.cs">
- <SubType>Code</SubType>
- </Compile>
<Compile Include="Drawing_Reporter.cs">
<SubType>Code</SubType>
</Compile>
Modified: trunk/Drivers/AgateDrawing/Drawing_Display.cs
===================================================================
--- trunk/Drivers/AgateDrawing/Drawing_Display.cs 2009-11-24 01:36:58 UTC (rev 1116)
+++ trunk/Drivers/AgateDrawing/Drawing_Display.cs 2009-11-24 07:05:13 UTC (rev 1117)
@@ -43,7 +43,7 @@
#region --- Private variables ---
private Graphics mGraphics;
- private Drawing_IRenderTarget mRenderTarget;
+ private Drawing_FrameBuffer mRenderTarget;
private bool mInFrame = false;
@@ -51,7 +51,7 @@
#region --- Events and Event Handlers ---
- protected override void OnRenderTargetChange(IRenderTarget oldRenderTarget)
+ protected override void OnRenderTargetChange(FrameBuffer oldRenderTarget)
{
if (mInFrame)
throw new AgateException(
@@ -59,7 +59,7 @@
System.Diagnostics.Debug.Assert(mGraphics == null);
- mRenderTarget = RenderTarget.Impl as Drawing_IRenderTarget;
+ mRenderTarget = RenderTarget.Impl as Drawing_FrameBuffer;
OnRenderTargetResize();
}
@@ -206,14 +206,14 @@
protected override void OnBeginFrame()
{
- mGraphics = Graphics.FromImage(mRenderTarget.BackBuffer);
+ mGraphics = Graphics.FromImage(mRenderTarget.BackBufferBitmap);
}
protected override void OnEndFrame()
{
mGraphics.Dispose();
mGraphics = null;
- Drawing_IRenderTarget renderTarget = RenderTarget.Impl as Drawing_IRenderTarget;
+ Drawing_FrameBuffer renderTarget = RenderTarget.Impl as Drawing_FrameBuffer;
renderTarget.EndRender();
}
Modified: trunk/Drivers/AgateDrawing/Drawing_DisplayWindow.cs
===================================================================
--- trunk/Drivers/AgateDrawing/Drawing_DisplayWindow.cs 2009-11-24 01:36:58 UTC (rev 1116)
+++ trunk/Drivers/AgateDrawing/Drawing_DisplayWindow.cs 2009-11-24 07:05:13 UTC (rev 1117)
@@ -32,11 +32,12 @@
namespace AgateDrawing
{
- class Drawing_DisplayWindow : DisplayWindowImpl, Drawing_IRenderTarget
+ class Drawing_DisplayWindow : DisplayWindowImpl
{
Form frm;
Control mRenderTarget;
bool mIsClosed = false;
+ Drawing_FrameBuffer mFrameBuffer;
Icon mIcon;
Bitmap mBackBuffer;
@@ -75,12 +76,24 @@
// and create the back buffer
OnResize();
}
+
+ mFrameBuffer = new Drawing_FrameBuffer(mBackBuffer);
+ mFrameBuffer.EndRenderEvent += new EventHandler(mFrameBuffer_EndRenderEvent);
}
- public Drawing_DisplayWindow(Control renderTarget)
+
+ void mFrameBuffer_EndRenderEvent(object sender, EventArgs e)
{
+ Graphics g = RenderTarget.CreateGraphics();
+ g.DrawImage(BackBuffer, new Rectangle(new Point(0, 0), BackBuffer.Size));
+ g.Dispose();
}
+ public override FrameBufferImpl FrameBuffer
+ {
+ get { return mFrameBuffer; }
+ }
+
private void AttachEvents()
{
mRenderTarget.Resize += new EventHandler(frm_Resize);
@@ -280,19 +293,9 @@
get { return false; }
}
- public override void BeginRender()
- {
- }
- public override void EndRender()
- {
- Graphics g = RenderTarget.CreateGraphics();
- g.DrawImage(BackBuffer, new Rectangle(new Point(0, 0), BackBuffer.Size));
- g.Dispose();
- }
-
public override string Title
{
get
Modified: trunk/Drivers/AgateDrawing/Drawing_FontSurface.cs
===================================================================
--- trunk/Drivers/AgateDrawing/Drawing_FontSurface.cs 2009-11-24 01:36:58 UTC (rev 1116)
+++ trunk/Drivers/AgateDrawing/Drawing_FontSurface.cs 2009-11-24 07:05:13 UTC (rev 1117)
@@ -89,9 +89,8 @@
if (g == null)
{
+ g = Graphics.FromImage((disp.RenderTarget.Impl as Drawing_FrameBuffer).BackBufferBitmap);
- g = Graphics.FromImage((disp.RenderTarget.Impl as Drawing_IRenderTarget).BackBuffer);
-
disposeGraphics = true;
}
Modified: trunk/Drivers/AgateDrawing/Drawing_FrameBuffer.cs
===================================================================
--- trunk/Drivers/AgateDrawing/Drawing_FrameBuffer.cs 2009-11-24 01:36:58 UTC (rev 1116)
+++ trunk/Drivers/AgateDrawing/Drawing_FrameBuffer.cs 2009-11-24 07:05:13 UTC (rev 1117)
@@ -2,16 +2,25 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
+using System.Drawing;
using AgateLib.Geometry;
using AgateLib.ImplementationBase;
+using Size = AgateLib.Geometry.Size;
namespace AgateDrawing
{
class Drawing_FrameBuffer: FrameBufferImpl
{
+ Bitmap backBuffer;
+
public Drawing_FrameBuffer(Size size)
{
+ backBuffer = new Bitmap(size.Width, size.Height);
}
+ public Drawing_FrameBuffer(Bitmap bmp)
+ {
+ backBuffer = bmp;
+ }
public override void Dispose()
{
@@ -20,7 +29,35 @@
public override Size Size
{
- get { throw new NotImplementedException(); }
+ get { return AgateLib.WinForms.Interop.Convert(backBuffer.Size); }
}
+
+ public System.Drawing.Bitmap BackBufferBitmap
+ {
+ get { return backBuffer; }
+ }
+
+ public override void BeginRender()
+ {
+ }
+ public override void EndRender()
+ {
+ if (EndRenderEvent != null)
+ EndRenderEvent(this, EventArgs.Empty);
+ }
+ public override bool CanAccessBackBuffer
+ {
+ get
+ {
+ return true;
+ }
+ }
+ public override SurfaceImpl BackBuffer
+ {
+ get { return new Drawing_Surface(backBuffer, new System.Drawing.Rectangle(System.Drawing.Point.Empty, backBuffer.Size)); }
+ }
+
+
+ public event EventHandler EndRenderEvent;
}
}
Deleted: trunk/Drivers/AgateDrawing/Drawing_IRenderTarget.cs
===================================================================
--- trunk/Drivers/AgateDrawing/Drawing_IRenderTarget.cs 2009-11-24 01:36:58 UTC (rev 1116)
+++ trunk/Drivers/AgateDrawing/Drawing_IRenderTarget.cs 2009-11-24 07:05:13 UTC (rev 1117)
@@ -1,31 +0,0 @@
-// The contents of this file are subject to the Mozilla Public License
-// Version 1.1 (the "License"); you may not use this file except in
-// compliance with the License. You may obtain a copy of the License at
-// http://www.mozilla.org/MPL/
-//
-// Software distributed under the License is distributed on an "AS IS"
-// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
-// License for the specific language governing rights and limitations
-// under the License.
-//
-// The Original Code is AgateLib.
-//
-// The Initial Developer of the Original Code is Erik Ylvisaker.
-// Portions created by Erik Ylvisaker are Copyright (C) 2006-2009.
-// All Rights Reserved.
-//
-// Contributor(s): Erik Ylvisaker
-//
-using System;
-using System.Collections.Generic;
-using System.Drawing;
-using System.Text;
-using AgateLib.ImplementationBase;
-
-namespace AgateDrawing
-{
- public interface Drawing_IRenderTarget : IRenderTargetImpl
- {
- Bitmap BackBuffer { get; }
- }
-}
Modified: trunk/Drivers/AgateDrawing/Drawing_Surface.cs
===================================================================
--- trunk/Drivers/AgateDrawing/Drawing_Surface.cs 2009-11-24 01:36:58 UTC (rev 1116)
+++ trunk/Drivers/AgateDrawing/Drawing_Surface.cs 2009-11-24 07:05:13 UTC (rev 1117)
@@ -34,7 +34,7 @@
namespace AgateDrawing
{
- class Drawing_Surface : SurfaceImpl, Drawing_IRenderTarget
+ class Drawing_Surface : SurfaceImpl
{
#region --- Private variables ---
@@ -330,23 +330,5 @@
}
#endregion
-
- #region --- Drawing_IRenderTarget Members ---
-
- public override void BeginRender()
- {
- }
-
- public override void EndRender()
- {
- }
-
- public Bitmap BackBuffer
- {
- get { return mImage; }
- }
-
- #endregion
-
}
}
\ No newline at end of file
Modified: trunk/Drivers/AgateOTK/AgateOTK.csproj
===================================================================
--- trunk/Drivers/AgateOTK/AgateOTK.csproj 2009-11-24 01:36:58 UTC (rev 1116)
+++ trunk/Drivers/AgateOTK/AgateOTK.csproj 2009-11-24 07:05:13 UTC (rev 1117)
@@ -107,12 +107,14 @@
<Compile Include="AL_Audio.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="ArbShader.cs">
+ <Compile Include="GL3\FrameBuffer.cs" />
+ <Compile Include="Legacy\ArbShader.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="ArbShaderCompiler.cs">
+ <Compile Include="Legacy\ArbShaderCompiler.cs">
<SubType>Code</SubType>
</Compile>
+ <Compile Include="ContextFB.cs" />
<Compile Include="frmFullScreen.cs">
<SubType>Form</SubType>
</Compile>
@@ -124,43 +126,39 @@
<Compile Include="GLDrawBuffer.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="GlslFragmentProgram.cs">
+ <Compile Include="Shaders\GlslFragmentProgram.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="GlslShader.cs">
+ <Compile Include="Shaders\GlslShader.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="GlslShaderCompiler.cs">
+ <Compile Include="Shaders\GlslShaderCompiler.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="GlslVertexProgram.cs">
+ <Compile Include="Shaders\GlslVertexProgram.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="GLState.cs">
- <SubType>Code</SubType>
- </Compile>
<Compile Include="GL_Display.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="GL_DisplayControl.cs">
<SubType>Code</SubType>
</Compile>
+ <Compile Include="Legacy\FrameBufferExt.cs" />
<Compile Include="GL_GameWindow.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="GL_IndexBuffer.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="GL_IRenderTarget.cs">
- <SubType>Code</SubType>
- </Compile>
<Compile Include="GL_Surface.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="GL_VertexBuffer.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="OtkShader.cs">
+ <Compile Include="Legacy\FrameBufferReadPixels.cs" />
+ <Compile Include="Shaders\OtkShader.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Otk_Reporter.cs">
Deleted: trunk/Drivers/AgateOTK/ArbShader.cs
===================================================================
--- trunk/Drivers/AgateOTK/ArbShader.cs 2009-11-24 01:36:58 UTC (rev 1116)
+++ trunk/Drivers/AgateOTK/ArbShader.cs 2009-11-24 07:05:13 UTC (rev 1117)
@@ -1,65 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using AgateLib.DisplayLib.Shaders;
-using OpenTK.Graphics.OpenGL;
-
-namespace AgateOTK
-{
- class ArbShader : OtkShader
- {
- int programHandle;
- Dictionary<string, int> mUniforms = new Dictionary<string, int>();
-
- public ArbShader(int handle, GlslVertexProgram vert, GlslFragmentProgram frag)
- {
- programHandle = handle;
- this.vertex = vert;
- this.pixel = frag;
- }
-
- GlslVertexProgram vertex;
- GlslFragmentProgram pixel;
-
- public GlslFragmentProgram PixelShader
- {
- get { return pixel; }
- }
- public GlslVertexProgram VertexShader
- {
- get { return vertex; }
- }
-
- public override int Handle
- {
- get { return programHandle; }
- }
-
- private int GetUniformLocation(string name)
- {
- if (mUniforms.ContainsKey(name))
- return mUniforms[name];
-
- return GL.Arb.GetUniformLocation(programHandle, name);
- }
-
- public void SetUniform(string name, params float[] v)
- {
- int loc = GetUniformLocation(name);
-
- }
- public void SetUniform(string name, params int[] v)
- {
- }
-
- public void SetUniform(string name, AgateLib.Geometry.Matrix4x4 matrix)
- {
- }
-
- public void Render<T>(RenderHandler<T> handler, T obj)
- {
- throw new NotImplementedException();
- }
- }
-}
Deleted: trunk/Drivers/AgateOTK/ArbShaderCompiler.cs
===================================================================
--- trunk/Drivers/AgateOTK/ArbShaderCompiler.cs 2009-11-24 01:36:58 UTC (rev 1116)
+++ trunk/Drivers/AgateOTK/ArbShaderCompiler.cs 2009-11-24 07:05:13 UTC (rev 1117)
@@ -1,75 +0,0 @@
-...
[truncated message content] |
|
From: <ka...@us...> - 2009-11-24 18:21:14
|
Revision: 1124
http://agate.svn.sourceforge.net/agate/?rev=1124&view=rev
Author: kanato
Date: 2009-11-24 18:21:02 +0000 (Tue, 24 Nov 2009)
Log Message:
-----------
Change Lighting2D to use a list instead of an array.
Modified Paths:
--------------
trunk/AgateLib/DisplayLib/Shaders/Implementation/Lighting2DImpl.cs
trunk/AgateLib/DisplayLib/Shaders/Lighting2D.cs
trunk/Drivers/AgateOTK/Shaders/FixedFunction/OTK_FF_Lighting2D.cs
trunk/Examples/BallBuster.Net/BallBuster.Net.csproj
trunk/Examples/BallBuster.Net/main.cs
Modified: trunk/AgateLib/DisplayLib/Shaders/Implementation/Lighting2DImpl.cs
===================================================================
--- trunk/AgateLib/DisplayLib/Shaders/Implementation/Lighting2DImpl.cs 2009-11-24 17:35:24 UTC (rev 1123)
+++ trunk/AgateLib/DisplayLib/Shaders/Implementation/Lighting2DImpl.cs 2009-11-24 18:21:02 UTC (rev 1124)
@@ -8,7 +8,13 @@
{
public abstract class Lighting2DImpl : AgateShaderImpl
{
- public abstract Light[] Lights { get; }
+ public Lighting2DImpl()
+ {
+ Lights = new List<Light>();
+ }
+
+ public abstract int MaxActiveLights { get; }
+ public List<Light> Lights { get; private set; }
public abstract Color AmbientLight { get; set; }
}
Modified: trunk/AgateLib/DisplayLib/Shaders/Lighting2D.cs
===================================================================
--- trunk/AgateLib/DisplayLib/Shaders/Lighting2D.cs 2009-11-24 17:35:24 UTC (rev 1123)
+++ trunk/AgateLib/DisplayLib/Shaders/Lighting2D.cs 2009-11-24 18:21:02 UTC (rev 1124)
@@ -19,19 +19,23 @@
get { return (Lighting2DImpl)base.Impl; }
}
- public Light[] Lights
+ public List<Light> Lights
{
get { return Impl.Lights; }
}
public Color AmbientLight
{
get { return Impl.AmbientLight; }
+ set { Impl.AmbientLight = value; }
}
+ public int MaxActiveLights
+ {
+ get { return Impl.MaxActiveLights; }
+ }
-
public void AddLight(Light ptLight)
{
- for (int i = 0; i < Lights.Length; i++)
+ for (int i = 0; i < Lights.Count; i++)
{
if (Lights[i] == null)
{
@@ -40,7 +44,7 @@
}
}
- for (int i = 0; i < Lights.Length; i++)
+ for (int i = 0; i < Lights.Count; i++)
{
if (Lights[i].Enabled == false)
{
Modified: trunk/Drivers/AgateOTK/Shaders/FixedFunction/OTK_FF_Lighting2D.cs
===================================================================
--- trunk/Drivers/AgateOTK/Shaders/FixedFunction/OTK_FF_Lighting2D.cs 2009-11-24 17:35:24 UTC (rev 1123)
+++ trunk/Drivers/AgateOTK/Shaders/FixedFunction/OTK_FF_Lighting2D.cs 2009-11-24 18:21:02 UTC (rev 1124)
@@ -11,31 +11,21 @@
{
class OTK_FF_Lighting2D : Lighting2DImpl
{
- Light[] mLights;
Color mAmbientLight;
public OTK_FF_Lighting2D()
{
}
- public override Light[] Lights
+ public override int MaxActiveLights
{
get
{
- if (mLights == null)
- InitializeLightsArray();
-
- return mLights;
+ int maxLights;
+ GL.GetInteger(GetPName.MaxLights, out maxLights);
+ return maxLights;
}
}
- private void InitializeLightsArray()
- {
- int maxLights;
- GL.GetInteger(GetPName.MaxLights, out maxLights);
-
- mLights = new Light[maxLights];
- }
-
public override Color AmbientLight
{
get { return mAmbientLight; }
@@ -71,12 +61,13 @@
GL.ColorMaterial(MaterialFace.FrontAndBack,
ColorMaterialParameter.AmbientAndDiffuse);
- for (int i = 0; i < mLights.Length; i++)
+ int i;
+ for (i = 0; i < Lights.Count && i < MaxActiveLights; i++)
{
EnableCap lightID = (EnableCap)((int)EnableCap.Light0 + i);
LightName lightName = (LightName)((int)LightName.Light0 + i);
- if (mLights[i] == null || mLights[i].Enabled == false)
+ if (Lights[i] == null || Lights[i].Enabled == false)
{
GL.Disable(lightID);
continue;
@@ -84,19 +75,24 @@
GL.Enable(lightID);
- SetArray(array, mLights[i].DiffuseColor);
+ SetArray(array, Lights[i].DiffuseColor);
GL.Light(lightName, LightParameter.Diffuse, array);
//SetArray(array, mLights[i]);
//GL.Lightv(lightName, LightParameter.Ambient, array);
- SetArray(array, mLights[i].Position);
+ SetArray(array, Lights[i].Position);
GL.Light(lightName, LightParameter.Position, array);
- GL.Light(lightName, LightParameter.ConstantAttenuation, mLights[i].AttenuationConstant);
- GL.Light(lightName, LightParameter.LinearAttenuation, mLights[i].AttenuationLinear);
- GL.Light(lightName, LightParameter.QuadraticAttenuation, mLights[i].AttenuationQuadratic);
+ GL.Light(lightName, LightParameter.ConstantAttenuation, Lights[i].AttenuationConstant);
+ GL.Light(lightName, LightParameter.LinearAttenuation, Lights[i].AttenuationLinear);
+ GL.Light(lightName, LightParameter.QuadraticAttenuation, Lights[i].AttenuationQuadratic);
}
+ for (; i < MaxActiveLights; i++)
+ {
+ EnableCap lightID = (EnableCap)((int)EnableCap.Light0 + i);
+ GL.Disable(lightID);
+ }
}
public override void BeginPass(int passIndex)
Modified: trunk/Examples/BallBuster.Net/BallBuster.Net.csproj
===================================================================
--- trunk/Examples/BallBuster.Net/BallBuster.Net.csproj 2009-11-24 17:35:24 UTC (rev 1123)
+++ trunk/Examples/BallBuster.Net/BallBuster.Net.csproj 2009-11-24 18:21:02 UTC (rev 1124)
@@ -95,24 +95,6 @@
<Compile Include="World.cs" />
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="..\..\AgateLib\AgateLib.csproj">
- <Project>{D62BD453-79AC-4A8D-8E75-F85FFF533E4D}</Project>
- <Name>AgateLib</Name>
- </ProjectReference>
- <ProjectReference Include="..\..\Drivers\AgateDrawing\AgateDrawing.csproj">
- <Project>{27BF4286-BD36-4E2A-B565-EB2A2D73E63B}</Project>
- <Name>AgateDrawing</Name>
- </ProjectReference>
- <ProjectReference Include="..\..\drivers\AgateOTK\AgateOTK.csproj">
- <Project>{B8476DD4-981E-47CD-A8C2-9E28E84A156D}</Project>
- <Name>AgateOTK</Name>
- </ProjectReference>
- <ProjectReference Include="..\..\Drivers\AgateSDL\AgateSDL.csproj">
- <Project>{FDA3969A-9EAA-4C15-A8CC-3D8DDAF705AE}</Project>
- <Name>AgateSDL</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
<Visible>False</Visible>
<ProductName>.NET Framework 2.0 %28x86%29</ProductName>
@@ -129,6 +111,20 @@
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\AgateLib\AgateLib.csproj">
+ <Project>{9490B719-829E-43A7-A5FE-8001F8A81759}</Project>
+ <Name>AgateLib</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\Drivers\AgateOTK\AgateOTK.csproj">
+ <Project>{9E095F03-BA3F-4EAD-A905-2A2647CE4405}</Project>
+ <Name>AgateOTK</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\Drivers\AgateSDL\AgateSDL.csproj">
+ <Project>{00C7FA95-98F4-43D9-9B63-34122B1DB003}</Project>
+ <Name>AgateSDL</Name>
+ </ProjectReference>
+ </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Modified: trunk/Examples/BallBuster.Net/main.cs
===================================================================
--- trunk/Examples/BallBuster.Net/main.cs 2009-11-24 17:35:24 UTC (rev 1123)
+++ trunk/Examples/BallBuster.Net/main.cs 2009-11-24 18:21:02 UTC (rev 1124)
@@ -25,6 +25,7 @@
using AgateLib;
using AgateLib.DisplayLib;
+using AgateLib.DisplayLib.Shaders;
using AgateLib.Geometry;
using AgateLib.Sprites;
using AgateLib.InputLib;
@@ -37,7 +38,6 @@
const float maxPaddleImbueV = 1000.0f;
const float minPaddleImbueV = 200.0f;
- LightManager lights = new LightManager();
bool doLighting = true;
public BBX()
@@ -285,7 +285,7 @@
return 0;
if (Display.Caps.IsHardwareAccelerated == false ||
- Display.Caps.SupportsLighting == false)
+ AgateBuiltInShaders.Lighting2D == null)
doLighting = false;
bool fulls = true;
@@ -612,7 +612,7 @@
resetPowerups = true;
}
- lights.Ambient = w.light;
+ AgateBuiltInShaders.Lighting2D.AmbientLight = w.light;
file = "lvls/" + worlds[world].lvls[level] + ".lvl";
@@ -702,29 +702,43 @@
Display.Clear(Color.FromArgb(128, 0, 0, 128));
- //lights.Ambient = Color.FromArgb(25, 25, 25);
- lights.Clear();
+ var shader = AgateBuiltInShaders.Lighting2D;
- for (int i = 0; i < balls.Count && i < Display.Caps.MaxLights; i++)
- {
+ while (shader.Lights.Count > balls.Count)
+ shader.Lights.RemoveAt(shader.Lights.Count-1);
+
+ for (int i = 0; i < balls.Count; i++)
+ {
+ Light light;
+
+ if (i < shader.Lights.Count)
+ light = shader.Lights[i];
+ else
+ {
+ light = new Light();
+ shader.Lights.Add(light);
+ }
+
if (balls[i].fireball)
{
- lights.AddPointLight(new Vector3(
- balls[i].ballx, balls[i].bally, -1), Color.FromArgb(255, 255, 0), Color.FromArgb(64, 32, 0));
+ light.Position = new Vector3(balls[i].ballx, balls[i].bally, -1);
+ light.DiffuseColor = Color.FromArgb(255, 255, 0);
+ light.AmbientColor = Color.FromArgb(64, 32, 0);
- lights[i].AttenuationConstant = 0.01f;
- lights[i].AttenuationLinear = 0.01f;
- lights[i].AttenuationQuadratic = 0.000001f;
-
+ light.AttenuationConstant = 0.01f;
+ light.AttenuationLinear = 0.005f;
+ light.AttenuationQuadratic = 0.000001f;
+
}
else
{
- lights.AddPointLight(new Vector3(
- balls[i].ballx, balls[i].bally, -1), Color.FromArgb(200, 200, 200));
+ light.Position = new Vector3(balls[i].ballx, balls[i].bally, -1);
+ light.DiffuseColor = Color.FromArgb(200, 200, 200);
+ light.AmbientColor = Color.Black;
- lights[i].AttenuationConstant = 0.01f;
- lights[i].AttenuationLinear = 0;
- lights[i].AttenuationQuadratic = 0.00001f;
+ light.AttenuationConstant = 0.01f;
+ light.AttenuationLinear = 0;
+ light.AttenuationQuadratic = 0.00001f;
}
}
@@ -739,7 +753,7 @@
if (doLighting)
{
- lights.DoLighting();
+ shader.Activate();
}
// Draw blocks and Update their animations...
@@ -755,7 +769,7 @@
if (doLighting)
{
- Display.DisableLighting();
+ AgateBuiltInShaders.Basic2DShader.Activate();
}
// Draw paddle, other stuff, and lastly the balls.
@@ -4074,7 +4088,6 @@
img.arrow.Color = Color.White;
- lights.Ambient = Color.White;
editorState.brush = 'r';
while (Keyboard.Keys[KeyCode.Escape] == false && Display.CurrentWindow.IsClosed == false)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2009-11-24 20:45:26
|
Revision: 1125
http://agate.svn.sourceforge.net/agate/?rev=1125&view=rev
Author: kanato
Date: 2009-11-24 20:45:10 +0000 (Tue, 24 Nov 2009)
Log Message:
-----------
Merge in gui branch.
Not working in OpenGL or Direct3D yet.
Modified Paths:
--------------
trunk/AgateLib/AgateGame.cs
trunk/AgateLib/AgateLib.csproj
trunk/AgateLib/BitmapFont/BitmapFontImpl.cs
trunk/AgateLib/DisplayLib/Display.cs
trunk/AgateLib/DisplayLib/FontSurface.cs
trunk/AgateLib/DisplayLib/FrameBuffer.cs
trunk/AgateLib/ImplementationBase/FontSurfaceImpl.cs
trunk/AgateLib/InternalResources/Data.cs
trunk/AgateLib/InternalResources/DataResources.Designer.cs
trunk/AgateLib/InternalResources/DataResources.resx
trunk/AgateLib/Resources/AgateResourceCollection.cs
trunk/AgateLib/Utility/ZipFileProvider.cs
trunk/Drivers/AgateDrawing/Drawing_Display.cs
trunk/Drivers/AgateDrawing/Drawing_FontSurface.cs
trunk/Drivers/AgateLib.WinForms/BitmapFontUtil.cs
trunk/Drivers/AgateOTK/GL_Display.cs
trunk/Drivers/AgateSDX/FrameBufferWindow.cs
trunk/Drivers/AgateSDX/SDX_Display.cs
trunk/Drivers/AgateSDX/SDX_DisplayWindow.cs
trunk/Tests/Tests.csproj
trunk/Tests/frmLauncher.Designer.cs
Added Paths:
-----------
trunk/AgateLib/Gui/
trunk/AgateLib/Gui/AgateGuiException.cs
trunk/AgateLib/Gui/Button.cs
trunk/AgateLib/Gui/Cache/
trunk/AgateLib/Gui/Cache/WidgetCache.cs
trunk/AgateLib/Gui/CheckBox.cs
trunk/AgateLib/Gui/ComboBox.cs
trunk/AgateLib/Gui/Container.cs
trunk/AgateLib/Gui/GuiRoot.cs
trunk/AgateLib/Gui/IGuiThemeEngine.cs
trunk/AgateLib/Gui/ILayoutPerformer.cs
trunk/AgateLib/Gui/Label.cs
trunk/AgateLib/Gui/Layout/
trunk/AgateLib/Gui/Layout/BoxLayoutBase.cs
trunk/AgateLib/Gui/Layout/Grid.cs
trunk/AgateLib/Gui/Layout/HorizontalBox.cs
trunk/AgateLib/Gui/Layout/VerticalBox.cs
trunk/AgateLib/Gui/LayoutExpand.cs
trunk/AgateLib/Gui/ListBox.cs
trunk/AgateLib/Gui/Panel.cs
trunk/AgateLib/Gui/RadioButton.cs
trunk/AgateLib/Gui/TextBox.cs
trunk/AgateLib/Gui/ThemeEngines/
trunk/AgateLib/Gui/ThemeEngines/Mercury/
trunk/AgateLib/Gui/ThemeEngines/Mercury/Cache/
trunk/AgateLib/Gui/ThemeEngines/Mercury/Cache/TextBoxCache.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/Mercury.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryScheme.cs
trunk/AgateLib/Gui/Widget.cs
trunk/AgateLib/Gui/WidgetList.cs
trunk/AgateLib/Gui/Window.cs
trunk/AgateLib/InternalResources/Fonts.zip
trunk/AgateLib/InternalResources/agate-black-gui.zip
trunk/Tests/Fonts/Builtin.cs
trunk/Tests/GuiTests/
trunk/Tests/GuiTests/RenderGui.cs
trunk/Tests/GuiTests/Textboxes.cs
Removed Paths:
-------------
trunk/AgateLib/Gui/AgateGuiException.cs
trunk/AgateLib/Gui/Button.cs
trunk/AgateLib/Gui/Cache/
trunk/AgateLib/Gui/Cache/WidgetCache.cs
trunk/AgateLib/Gui/CheckBox.cs
trunk/AgateLib/Gui/ComboBox.cs
trunk/AgateLib/Gui/Container.cs
trunk/AgateLib/Gui/GuiRoot.cs
trunk/AgateLib/Gui/IGuiThemeEngine.cs
trunk/AgateLib/Gui/ILayoutPerformer.cs
trunk/AgateLib/Gui/Label.cs
trunk/AgateLib/Gui/Layout/
trunk/AgateLib/Gui/Layout/BoxLayoutBase.cs
trunk/AgateLib/Gui/Layout/Grid.cs
trunk/AgateLib/Gui/Layout/HorizontalBox.cs
trunk/AgateLib/Gui/Layout/VerticalBox.cs
trunk/AgateLib/Gui/LayoutExpand.cs
trunk/AgateLib/Gui/ListBox.cs
trunk/AgateLib/Gui/Panel.cs
trunk/AgateLib/Gui/RadioButton.cs
trunk/AgateLib/Gui/TextBox.cs
trunk/AgateLib/Gui/ThemeEngines/
trunk/AgateLib/Gui/ThemeEngines/Mercury/
trunk/AgateLib/Gui/ThemeEngines/Mercury/Cache/
trunk/AgateLib/Gui/ThemeEngines/Mercury/Cache/TextBoxCache.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/Mercury.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryScheme.cs
trunk/AgateLib/Gui/Widget.cs
trunk/AgateLib/Gui/WidgetList.cs
trunk/AgateLib/Gui/Window.cs
trunk/AgateLib/PlatformSpecific/
trunk/Tests/GuiTests/RenderGui.cs
trunk/Tests/GuiTests/Textboxes.cs
Property Changed:
----------------
trunk/
trunk/AgateLib/
trunk/AgateLib/AgateFileProvider.cs
trunk/AgateLib/AgateSetup.cs
trunk/AgateLib/AudioLib/
trunk/AgateLib/AudioLib/Audio.cs
trunk/AgateLib/BitmapFont/FontMetrics.cs
trunk/AgateLib/BitmapFont/GlyphMetrics.cs
trunk/AgateLib/Core.cs
trunk/AgateLib/DisplayLib/
trunk/AgateLib/DisplayLib/Display.cs
trunk/AgateLib/DisplayLib/StringTransformer.cs
trunk/AgateLib/Drivers/AgateDriverReporter.cs
trunk/AgateLib/Drivers/IDesktopDriver.cs
trunk/AgateLib/ImplementationBase/
trunk/AgateLib/ImplementationBase/AudioImpl.cs
trunk/AgateLib/InputLib/
trunk/AgateLib/Resources/AgateResourceCollection.cs
trunk/AgateLib/Resources/AgateResourceLoader.cs
trunk/AgateLib/Resources/BitmapFontResource.cs
trunk/AgateLib/Sprites/Sprite.cs
trunk/AgateLib/Sprites/SpriteFrame.cs
trunk/AgateLib/Timing.cs
trunk/AgateLib/Utility/Platform.cs
trunk/Drivers/
trunk/Drivers/AgateDrawing/Drawing_Reporter.cs
trunk/Drivers/AgateLib.WinForms/
trunk/Drivers/AgateOTK/GL3/
trunk/Drivers/AgateOTK/GL3/DrawBuffer.cs
trunk/Drivers/AgateOTK/GL3/FrameBuffer.cs
trunk/Drivers/AgateOTK/GL3/GLPrimitiveRenderer.cs
trunk/Drivers/AgateOTK/GL3/GLVertexBuffer.cs
trunk/Drivers/AgateOTK/Legacy/
trunk/Drivers/AgateOTK/Legacy/ArbShader.cs
trunk/Drivers/AgateOTK/Legacy/ArbShaderCompiler.cs
trunk/Drivers/AgateOTK/Legacy/FrameBufferExt.cs
trunk/Drivers/AgateOTK/Legacy/FrameBufferReadPixels.cs
trunk/Drivers/AgateOTK/Legacy/LegacyDrawBuffer.cs
trunk/Drivers/AgateOTK/Legacy/LegacyPrimitiveRenderer.cs
trunk/Drivers/AgateOTK/Legacy/LegacyVertexBuffer.cs
trunk/Drivers/AgateSDL/
trunk/Drivers/AgateSDL/Audio/SDL_Audio.cs
trunk/Drivers/AgateSDL/Audio/SDL_Music.cs
trunk/Drivers/AgateSDL/Audio/SDL_SoundBuffer.cs
trunk/Drivers/AgateSDL/Audio/SDL_SoundBufferSession.cs
trunk/Drivers/AgateSDL/Input/SDL_Input.cs
trunk/Drivers/AgateSDL/Reporter.cs
trunk/Examples/BallBuster.Net/OpenTK.dll.config
trunk/Examples/ShootTheTraps/Properties/
trunk/Examples/ShootTheTraps/Properties/AssemblyInfo.cs
trunk/Tests/CoreTests/
trunk/Tests/DisplayTests/SurfaceTester/SurfaceTester.cs
trunk/Tests/DisplayTests/TestPacker/TestPacker.cs
trunk/Tests/DisplayTests/TestPacker/frmTestPacker.Designer.cs
trunk/Tests/DisplayTests/TestPacker/frmTestPacker.cs
trunk/Tests/DisplayTests/TestPacker/frmTestPacker.resx
trunk/Tests/DisplayTests/TileTester/TileTester.cs
trunk/Tests/DisplayTests/TileTester/frmTileTester.Designer.cs
trunk/Tests/DisplayTests/TileTester/frmTileTester.cs
trunk/Tests/DisplayTests/TileTester/frmTileTester.resx
trunk/Tests/InputTests/Input/
trunk/Tests/InputTests/Input/InputTester.cs
trunk/Tests/InputTests/Input/frmInputTester.Designer.cs
trunk/Tests/InputTests/Input/frmInputTester.cs
trunk/Tests/InputTests/InputState/
trunk/Tests/InputTests/InputState/InputStateTester.cs
trunk/Tools/FontCreator/CreateFont.Designer.cs
trunk/Tools/FontCreator/CreateFont.cs
trunk/Tools/FontCreator/CreateFont.resx
trunk/Tools/FontCreator/EditGlyphs.Designer.cs
trunk/Tools/FontCreator/EditGlyphs.cs
trunk/Tools/FontCreator/EditGlyphs.resx
trunk/Tools/FontCreator/SaveFont.Designer.cs
trunk/Tools/FontCreator/SaveFont.cs
trunk/Tools/FontCreator/SaveFont.resx
trunk/Tools/FontCreator/frmFontCreator.Designer.cs
trunk/Tools/FontCreator/frmFontCreator.cs
trunk/Tools/FontCreator/frmFontCreator.resx
trunk/Tools/PackedSpriteCreator/SpriteEditor.Designer.cs
trunk/Tools/PackedSpriteCreator/SpriteEditor.cs
trunk/Tools/PackedSpriteCreator/SpriteEditor.resx
trunk/Tools/PackedSpriteCreator/SpritePacker.cs
Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate-3d:629-702,840-864
/branches/agate3d-3.2:923-1034
/branches/build:424-517,1081-1084
/branches/font:778-916
/branches/merge-tests:806-810
/branches/otkupdate:1068-1076
/branches/registrar:595-599
/branches/shaders:1087-1111
/branches/sprites:463-513
+ /branches/agate-3d:629-702,840-864
/branches/agate3d-3.2:923-1034
/branches/build:424-517,1081-1084
/branches/font:778-916
/branches/gui-3.2:881-1019
/branches/merge-tests:806-810
/branches/otkupdate:1068-1076
/branches/registrar:595-599
/branches/shaders:1087-1111
/branches/sprites:463-513
Property changes on: trunk/AgateLib
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate-3d/AgateLib:629-702,840-864
/branches/agate3d-3.2/AgateLib:923-1034
/branches/build/AgateLib:447-448,501-517,1081-1084
/branches/font/AgateLib:778-916
/branches/merge-tests/AgateLib:806-810
/branches/otkupdate/AgateLib:1068-1076
/branches/registrar/AgateLib:595-599
/branches/shaders/AgateLib:1087-1111
/branches/sprites/AgateLib:463-513
+ /branches/agate-3d/AgateLib:629-702,840-864
/branches/agate3d-3.2/AgateLib:923-1034
/branches/build/AgateLib:447-448,501-517,1081-1084
/branches/font/AgateLib:778-916
/branches/gui-3.2/AgateLib:881-1019
/branches/merge-tests/AgateLib:806-810
/branches/otkupdate/AgateLib:1068-1076
/branches/registrar/AgateLib:595-599
/branches/shaders/AgateLib:1087-1111
/branches/sprites/AgateLib:463-513
Property changes on: trunk/AgateLib/AgateFileProvider.cs
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate3d-3.2/AgateLib/AgateFileProvider.cs:923-1034
/branches/build/AgateLib/AgateFileProvider.cs:1081-1084
/branches/build/AgateLib/Utility/AgateFileProvider.cs:447-517
/branches/font/AgateLib/AgateFileProvider.cs:778-916
/branches/merge-tests/AgateLib/AgateFileProvider.cs:806-810
/branches/otkupdate/AgateLib/AgateFileProvider.cs:1068-1076
/branches/registrar/AgateLib/Utility/AgateFileProvider.cs:595-599
/branches/shaders/AgateLib/AgateFileProvider.cs:1087-1111
/branches/sprites/AgateLib/Utility/AgateFileProvider.cs:463-513
+ /branches/agate3d-3.2/AgateLib/AgateFileProvider.cs:923-1034
/branches/build/AgateLib/AgateFileProvider.cs:1081-1084
/branches/build/AgateLib/Utility/AgateFileProvider.cs:447-517
/branches/font/AgateLib/AgateFileProvider.cs:778-916
/branches/gui-3.2/AgateLib/AgateFileProvider.cs:881-1019
/branches/merge-tests/AgateLib/AgateFileProvider.cs:806-810
/branches/otkupdate/AgateLib/AgateFileProvider.cs:1068-1076
/branches/registrar/AgateLib/Utility/AgateFileProvider.cs:595-599
/branches/shaders/AgateLib/AgateFileProvider.cs:1087-1111
/branches/sprites/AgateLib/Utility/AgateFileProvider.cs:463-513
Modified: trunk/AgateLib/AgateGame.cs
===================================================================
--- trunk/AgateLib/AgateGame.cs 2009-11-24 18:21:02 UTC (rev 1124)
+++ trunk/AgateLib/AgateGame.cs 2009-11-24 20:45:10 UTC (rev 1125)
@@ -45,6 +45,7 @@
DisplayWindow mWindow;
AppInitParameters mInitParams;
FontSurface font;
+ Gui.GuiRoot mGui;
double totalSplashTime = 0;
bool splashFadeDone = false;
@@ -82,7 +83,7 @@
CreateDisplayWindow();
- font = new FontSurface("Arial", 12.0f);
+ font = FontSurface.Gentium12;
if (InitParams.ShowSplashScreen)
{
@@ -95,11 +96,17 @@
{
Update(Display.DeltaTime);
+ if (GuiRoot != null)
+ GuiRoot.DoUpdate();
+
Display.RenderTarget = mWindow;
Display.BeginFrame();
Render();
+ if (GuiRoot != null)
+ GuiRoot.Draw();
+
Display.EndFrame();
Core.KeepAlive();
}
@@ -112,7 +119,11 @@
{
get
{
- mInitParams = mInitParams ?? GetAppInitParameters();
+ if (mInitParams == null)
+ {
+ mInitParams = GetAppInitParameters();
+ AdjustAppInitParameters(ref mInitParams);
+ }
return mInitParams;
}
}
@@ -237,7 +248,7 @@
Surface powered = InternalResources.Data.PoweredBy;
Size size = powered.SurfaceSize;
- int left = (int)(totalSplashTime * size.Width - size.Width)+1;
+ int left = (int)(totalSplashTime * size.Width - size.Width) + 1;
Rectangle gradientRect = new Rectangle(left, MainWindow.Height - size.Height,
size.Width, size.Height);
@@ -277,11 +288,20 @@
/// Gets the initialization parameters.
/// </summary>
/// <returns></returns>
+ [Obsolete("Override AdjustAppInitParameters")]
protected virtual AppInitParameters GetAppInitParameters()
{
return new AppInitParameters();
}
+ /// <summary>
+ /// Adjusts the initialization parameters.
+ /// </summary>
+ /// <param name="initParams"></param>
+ protected virtual void AdjustAppInitParameters(ref AppInitParameters initParams)
+ {
+ }
+
protected virtual Size WindowSize { get { return new Size(800, 600); } }
protected virtual bool FullScreen { get { return false; } }
@@ -296,6 +316,24 @@
get { return mWindow; }
}
+ public Gui.GuiRoot GuiRoot
+ {
+ get { return mGui; }
+ set
+ {
+ if (value == null && mGui == null)
+ return;
+
+ if (mGui != null)
+ mGui.EnableInteraction = false;
+
+ mGui = value;
+
+ if (mGui != null)
+ mGui.EnableInteraction = true;
+ }
+ }
+
#endregion
/// <summary>
Modified: trunk/AgateLib/AgateLib.csproj
===================================================================
--- trunk/AgateLib/AgateLib.csproj 2009-11-24 18:21:02 UTC (rev 1124)
+++ trunk/AgateLib/AgateLib.csproj 2009-11-24 20:45:10 UTC (rev 1125)
@@ -110,6 +110,31 @@
<Compile Include="DisplayLib\Shaders\Lighting2D.cs" />
<Compile Include="DisplayLib\Shaders\Lighting3D.cs" />
<Compile Include="Geometry\VertexTypes\PositionTextureColorNormal.cs" />
+ <Compile Include="Gui\AgateGuiException.cs" />
+ <Compile Include="Gui\Button.cs" />
+ <Compile Include="Gui\Cache\WidgetCache.cs" />
+ <Compile Include="Gui\CheckBox.cs" />
+ <Compile Include="Gui\ComboBox.cs" />
+ <Compile Include="Gui\Container.cs" />
+ <Compile Include="Gui\GuiRoot.cs" />
+ <Compile Include="Gui\IGuiThemeEngine.cs" />
+ <Compile Include="Gui\ILayoutPerformer.cs" />
+ <Compile Include="Gui\Label.cs" />
+ <Compile Include="Gui\LayoutExpand.cs" />
+ <Compile Include="Gui\Layout\BoxLayoutBase.cs" />
+ <Compile Include="Gui\Layout\Grid.cs" />
+ <Compile Include="Gui\Layout\HorizontalBox.cs" />
+ <Compile Include="Gui\Layout\VerticalBox.cs" />
+ <Compile Include="Gui\ListBox.cs" />
+ <Compile Include="Gui\Panel.cs" />
+ <Compile Include="Gui\RadioButton.cs" />
+ <Compile Include="Gui\TextBox.cs" />
+ <Compile Include="Gui\ThemeEngines\Mercury\Cache\TextBoxCache.cs" />
+ <Compile Include="Gui\ThemeEngines\Mercury\Mercury.cs" />
+ <Compile Include="Gui\ThemeEngines\Mercury\MercuryScheme.cs" />
+ <Compile Include="Gui\Widget.cs" />
+ <Compile Include="Gui\WidgetList.cs" />
+ <Compile Include="Gui\Window.cs" />
<Compile Include="IFileProvider.cs">
<SubType>Code</SubType>
</Compile>
@@ -525,6 +550,11 @@
<LastGenOutput>DataResources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
+ <ItemGroup>
+ <None Include="InternalResources\agate-black-gui.zip" />
+ <None Include="InternalResources\Fonts.zip" />
+ <None Include="InternalResources\images.tar.gz" />
+ </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
<PropertyGroup>
<PreBuildEvent>
Property changes on: trunk/AgateLib/AgateSetup.cs
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate-3d/AgateLib/AgateSetup.cs:629-702,840-864
/branches/agate3d-3.2/AgateLib/AgateSetup.cs:923-1034
/branches/build/AgateLib/AgateSetup.cs:501-517,1081-1084
/branches/font/AgateLib/AgateSetup.cs:778-916
/branches/merge-tests/AgateLib/AgateSetup.cs:806-810
/branches/otkupdate/AgateLib/AgateSetup.cs:1068-1076
/branches/registrar/AgateLib/AgateSetup.cs:595-599
/branches/shaders/AgateLib/AgateSetup.cs:1087-1111
/branches/sprites/AgateLib/AgateSetup.cs:463-513
+ /branches/agate-3d/AgateLib/AgateSetup.cs:629-702,840-864
/branches/agate3d-3.2/AgateLib/AgateSetup.cs:923-1034
/branches/build/AgateLib/AgateSetup.cs:501-517,1081-1084
/branches/font/AgateLib/AgateSetup.cs:778-916
/branches/gui-3.2/AgateLib/AgateSetup.cs:881-1019
/branches/merge-tests/AgateLib/AgateSetup.cs:806-810
/branches/otkupdate/AgateLib/AgateSetup.cs:1068-1076
/branches/registrar/AgateLib/AgateSetup.cs:595-599
/branches/shaders/AgateLib/AgateSetup.cs:1087-1111
/branches/sprites/AgateLib/AgateSetup.cs:463-513
Property changes on: trunk/AgateLib/AudioLib
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate-3d/AgateLib/AudioLib:629-702,840-864
/branches/agate3d-3.2/AgateLib/AudioLib:923-1034
/branches/build/AgateLib/AudioLib:1081-1084
/branches/font/AgateLib/AudioLib:778-916
/branches/merge-tests/AgateLib/AudioLib:806-810
/branches/otkupdate/AgateLib/AudioLib:1068-1076
/branches/registrar/AgateLib/AudioLib:595-599
/branches/shaders/AgateLib/AudioLib:1087-1111
/branches/sprites/AgateLib/AudioLib:463-513
+ /branches/agate-3d/AgateLib/AudioLib:629-702,840-864
/branches/agate3d-3.2/AgateLib/AudioLib:923-1034
/branches/build/AgateLib/AudioLib:1081-1084
/branches/font/AgateLib/AudioLib:778-916
/branches/gui-3.2/AgateLib/AudioLib:881-1019
/branches/merge-tests/AgateLib/AudioLib:806-810
/branches/otkupdate/AgateLib/AudioLib:1068-1076
/branches/registrar/AgateLib/AudioLib:595-599
/branches/shaders/AgateLib/AudioLib:1087-1111
/branches/sprites/AgateLib/AudioLib:463-513
Property changes on: trunk/AgateLib/AudioLib/Audio.cs
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate-3d/AgateLib/AudioLib/Audio.cs:629-702,840-864
/branches/agate3d-3.2/AgateLib/AudioLib/Audio.cs:923-1034
/branches/build/AgateLib/AudioLib/Audio.cs:501-517,1081-1084
/branches/font/AgateLib/AudioLib/Audio.cs:778-916
/branches/merge-tests/AgateLib/AudioLib/Audio.cs:806-810
/branches/otkupdate/AgateLib/AudioLib/Audio.cs:1068-1076
/branches/registrar/AgateLib/AudioLib/Audio.cs:595-599
/branches/shaders/AgateLib/AudioLib/Audio.cs:1087-1111
/branches/sprites/AgateLib/AudioLib/Audio.cs:463-513
+ /branches/agate-3d/AgateLib/AudioLib/Audio.cs:629-702,840-864
/branches/agate3d-3.2/AgateLib/AudioLib/Audio.cs:923-1034
/branches/build/AgateLib/AudioLib/Audio.cs:501-517,1081-1084
/branches/font/AgateLib/AudioLib/Audio.cs:778-916
/branches/gui-3.2/AgateLib/AudioLib/Audio.cs:881-1019
/branches/merge-tests/AgateLib/AudioLib/Audio.cs:806-810
/branches/otkupdate/AgateLib/AudioLib/Audio.cs:1068-1076
/branches/registrar/AgateLib/AudioLib/Audio.cs:595-599
/branches/shaders/AgateLib/AudioLib/Audio.cs:1087-1111
/branches/sprites/AgateLib/AudioLib/Audio.cs:463-513
Modified: trunk/AgateLib/BitmapFont/BitmapFontImpl.cs
===================================================================
--- trunk/AgateLib/BitmapFont/BitmapFontImpl.cs 2009-11-24 18:21:02 UTC (rev 1124)
+++ trunk/AgateLib/BitmapFont/BitmapFontImpl.cs 2009-11-24 20:45:10 UTC (rev 1125)
@@ -86,6 +86,7 @@
/// <param name="characterSize"></param>
public BitmapFontImpl(string filename, Size characterSize)
{
+ FontName = System.IO.Path.GetFileNameWithoutExtension(filename);
mFontMetrics = new FontMetrics();
mSurface = new Surface(filename);
@@ -101,8 +102,9 @@
/// <param name="surface">Surface which contains the image data for the font glyphs.</param>
/// <param name="fontMetrics">FontMetrics structure which describes how characters
/// are laid out.</param>
- public BitmapFontImpl(Surface surface, FontMetrics fontMetrics)
+ public BitmapFontImpl(Surface surface, FontMetrics fontMetrics, string name)
{
+ FontName = name;
mFontMetrics = (FontMetrics)((ICloneable)fontMetrics).Clone();
float maxHeight = 0;
@@ -179,7 +181,7 @@
mAverageCharWidth = total / (double)count;
}
- public override Size StringDisplaySize(FontState state, string text)
+ public override Size MeasureString(FontState state, string text)
{
if (string.IsNullOrEmpty(text))
return Size.Empty;
@@ -197,6 +199,9 @@
for (int j = 0; j < line.Length; j++)
{
+ if (mFontMetrics.ContainsKey(line[j]) == false)
+ continue;
+
lineWidth += mFontMetrics[line[j]].Width;
}
@@ -262,6 +267,10 @@
break;
default:
+ if (mFontMetrics.ContainsKey(text[i]) == false)
+ {
+ break;
+ }
GlyphMetrics glyph = mFontMetrics[text[i]];
destX = Math.Max(0, destX - glyph.LeftOverhang * ScaleWidth);
@@ -332,7 +341,7 @@
if (state.DisplayAlignment != OriginAlignment.TopLeft)
{
Point value = Origin.Calc(state.DisplayAlignment,
- StringDisplaySize(state, state.Text));
+ MeasureString(state, state.Text));
dest.X -= value.X;
dest.Y -= value.Y;
Property changes on: trunk/AgateLib/BitmapFont/FontMetrics.cs
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate-3d/AgateLib/BitmapFont/FontMetrics.cs:629-702,840-864
/branches/agate3d-3.2/AgateLib/BitmapFont/FontMetrics.cs:923-1034
/branches/build/AgateLib/BitmapFont/FontMetrics.cs:1081-1084
/branches/font/AgateLib/BitmapFont/FontMetrics.cs:778-916
/branches/merge-tests/AgateLib/BitmapFont/FontMetrics.cs:806-810
/branches/otkupdate/AgateLib/BitmapFont/FontMetrics.cs:1068-1076
/branches/shaders/AgateLib/BitmapFont/FontMetrics.cs:1087-1111
+ /branches/agate-3d/AgateLib/BitmapFont/FontMetrics.cs:629-702,840-864
/branches/agate3d-3.2/AgateLib/BitmapFont/FontMetrics.cs:923-1034
/branches/build/AgateLib/BitmapFont/FontMetrics.cs:1081-1084
/branches/font/AgateLib/BitmapFont/FontMetrics.cs:778-916
/branches/gui-3.2/AgateLib/BitmapFont/FontMetrics.cs:881-1019
/branches/merge-tests/AgateLib/BitmapFont/FontMetrics.cs:806-810
/branches/otkupdate/AgateLib/BitmapFont/FontMetrics.cs:1068-1076
/branches/shaders/AgateLib/BitmapFont/FontMetrics.cs:1087-1111
Property changes on: trunk/AgateLib/BitmapFont/GlyphMetrics.cs
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate-3d/AgateLib/BitmapFont/GlyphMetrics.cs:629-702,840-864
/branches/agate3d-3.2/AgateLib/BitmapFont/GlyphMetrics.cs:923-1034
/branches/build/AgateLib/BitmapFont/GlyphMetrics.cs:1081-1084
/branches/build/AgateLib/Resources/GlyphMetrics.cs:447-517
/branches/font/AgateLib/BitmapFont/GlyphMetrics.cs:778-916
/branches/merge-tests/AgateLib/BitmapFont/GlyphMetrics.cs:806-810
/branches/otkupdate/AgateLib/BitmapFont/GlyphMetrics.cs:1068-1076
/branches/registrar/AgateLib/Resources/GlyphMetrics.cs:595-599
/branches/shaders/AgateLib/BitmapFont/GlyphMetrics.cs:1087-1111
/branches/sprites/AgateLib/Resources/GlyphMetrics.cs:463-513
+ /branches/agate-3d/AgateLib/BitmapFont/GlyphMetrics.cs:629-702,840-864
/branches/agate3d-3.2/AgateLib/BitmapFont/GlyphMetrics.cs:923-1034
/branches/build/AgateLib/BitmapFont/GlyphMetrics.cs:1081-1084
/branches/build/AgateLib/Resources/GlyphMetrics.cs:447-517
/branches/font/AgateLib/BitmapFont/GlyphMetrics.cs:778-916
/branches/gui-3.2/AgateLib/BitmapFont/GlyphMetrics.cs:881-1019
/branches/merge-tests/AgateLib/BitmapFont/GlyphMetrics.cs:806-810
/branches/otkupdate/AgateLib/BitmapFont/GlyphMetrics.cs:1068-1076
/branches/registrar/AgateLib/Resources/GlyphMetrics.cs:595-599
/branches/shaders/AgateLib/BitmapFont/GlyphMetrics.cs:1087-1111
/branches/sprites/AgateLib/Resources/GlyphMetrics.cs:463-513
Property changes on: trunk/AgateLib/Core.cs
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate-3d/AgateLib/Core.cs:629-702,840-864
/branches/agate3d-3.2/AgateLib/Core.cs:923-1034
/branches/build/AgateLib/Core.cs:501-517,1081-1084
/branches/font/AgateLib/Core.cs:778-916
/branches/merge-tests/AgateLib/Core.cs:806-810
/branches/otkupdate/AgateLib/Core.cs:1068-1076
/branches/registrar/AgateLib/Core.cs:595-599
/branches/shaders/AgateLib/Core.cs:1087-1111
/branches/sprites/AgateLib/Core.cs:463-513
+ /branches/agate-3d/AgateLib/Core.cs:629-702,840-864
/branches/agate3d-3.2/AgateLib/Core.cs:923-1034
/branches/build/AgateLib/Core.cs:501-517,1081-1084
/branches/font/AgateLib/Core.cs:778-916
/branches/gui-3.2/AgateLib/Core.cs:881-1019
/branches/merge-tests/AgateLib/Core.cs:806-810
/branches/otkupdate/AgateLib/Core.cs:1068-1076
/branches/registrar/AgateLib/Core.cs:595-599
/branches/shaders/AgateLib/Core.cs:1087-1111
/branches/sprites/AgateLib/Core.cs:463-513
Property changes on: trunk/AgateLib/DisplayLib
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate-3d/AgateLib/DisplayLib:629-702,840-864
/branches/agate3d-3.2/AgateLib/DisplayLib:923-1034
/branches/build/AgateLib/DisplayLib:1081-1084
/branches/font/AgateLib/DisplayLib:778-916
/branches/merge-tests/AgateLib/DisplayLib:806-810
/branches/otkupdate/AgateLib/DisplayLib:1068-1076
/branches/registrar/AgateLib/DisplayLib:595-599
/branches/shaders/AgateLib/DisplayLib:1087-1111
/branches/sprites/AgateLib/DisplayLib:463-513
+ /branches/agate-3d/AgateLib/DisplayLib:629-702,840-864
/branches/agate3d-3.2/AgateLib/DisplayLib:923-1034
/branches/build/AgateLib/DisplayLib:1081-1084
/branches/font/AgateLib/DisplayLib:778-916
/branches/gui-3.2/AgateLib/DisplayLib:881-1019
/branches/merge-tests/AgateLib/DisplayLib:806-810
/branches/otkupdate/AgateLib/DisplayLib:1068-1076
/branches/registrar/AgateLib/DisplayLib:595-599
/branches/shaders/AgateLib/DisplayLib:1087-1111
/branches/sprites/AgateLib/DisplayLib:463-513
Modified: trunk/AgateLib/DisplayLib/Display.cs
===================================================================
--- trunk/AgateLib/DisplayLib/Display.cs 2009-11-24 18:21:02 UTC (rev 1124)
+++ trunk/AgateLib/DisplayLib/Display.cs 2009-11-24 20:45:10 UTC (rev 1125)
@@ -412,8 +412,6 @@
return impl.EnumScreenModes();
}
-
-
/// <summary>
/// Event fired when PackAllSurfacesEvent
/// </summary>
Property changes on: trunk/AgateLib/DisplayLib/Display.cs
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/agate-3d/AgateLib/DisplayLib/Display.cs:629-702,840-864
/branches/agate3d-3.2/AgateLib/DisplayLib/Display.cs:923-1034
/branches/build/AgateLib/DisplayLib/Display.cs:501-517,1081-1084
/branches/font/AgateLib/DisplayLib/Display.cs:778-916
/branches/merge-tests/AgateLib/DisplayLib/Display.cs:806-810
/branches/otkupdate/AgateLib/DisplayLib/Display.cs:1068-1076
/branches/registrar/AgateLib/DisplayLib/Display.cs:595-599
/branches/shaders/AgateLib/DisplayLib/Display.cs:1087-1111
/branches/sprites/AgateLib/DisplayLib/Display.cs:463-513
+ /branches/agate-3d/AgateLib/DisplayLib/Display.cs:629-702,840-864
/branches/agate3d-3.2/AgateLib/DisplayLib/Display.cs:923-1034
/branches/build/AgateLib/DisplayLib/Display.cs:501-517,1081-1084
/branches/font/AgateLib/DisplayLib/Display.cs:778-916
/branches/gui-3.2/AgateLib/DisplayLib/Display.cs:881-1019
/branches/merge-tests/AgateLib/DisplayLib/Display.cs:806-810
/branches/otkupdate/AgateLib/DisplayLib/Display.cs:1068-1076
/branches/registrar/AgateLib/DisplayLib/Display.cs:595-599
/branches/shaders/AgateLib/DisplayLib/Display.cs:1087-1111
/branches/sprites/AgateLib/DisplayLib/Display.cs:463-513
Modified: trunk/AgateLib/DisplayLib/FontSurface.cs
===================================================================
--- trunk/AgateLib/DisplayLib/FontSurface.cs 2009-11-24 18:21:02 UTC (rev 1124)
+++ trunk/AgateLib/DisplayLib/FontSurface.cs 2009-11-24 20:45:10 UTC (rev 1125)
@@ -94,6 +94,8 @@
impl = Display.Impl.CreateFont(fontFamily, sizeInPoints, style);
Display.DisposeDisplay += new Display.DisposeDisplayHandler(Dispose);
+
+ System.Diagnostics.Debug.Assert(impl != null);
}
/// <summary>
/// Constructs a FontSurface object from a resource.
@@ -107,14 +109,16 @@
if (res is BitmapFontResource)
{
- Surface surf = new Surface(bmpFont.Image);
+ Surface surf = new Surface(resources.FileProvider, bmpFont.Image);
- impl = new BitmapFontImpl(surf, bmpFont.FontMetrics);
+ impl = new BitmapFontImpl(surf, bmpFont.FontMetrics, resourceName);
}
else
throw new AgateResourceException(string.Format(
"The resource {0} is of type {1} which cannot be used to construct a font.",
resourceName, res.GetType().Name));
+
+ System.Diagnostics.Debug.Assert(impl != null);
}
/// <summary>
/// Creates a bitmap font using the options passed in. The Display driver
@@ -126,14 +130,23 @@
impl = Display.Impl.CreateFont(bitmapOptions);
Display.DisposeDisplay += new Display.DisposeDisplayHandler(Dispose);
+
+ System.Diagnostics.Debug.Assert(impl != null);
}
+ public string FontName
+ {
+ get { return impl.FontName; }
+ }
/// <summary>
/// Private initializer to tell it what impl to use.
/// </summary>
/// <param name="implToUse"></param>
private FontSurface(FontSurfaceImpl implToUse)
{
+ if (implToUse == null)
+ throw new ArgumentNullException("implToUse");
+
impl = implToUse;
}
@@ -272,6 +285,7 @@
/// </summary>
/// <param name="text"></param>
/// <returns></returns>
+ [Obsolete]
public int StringDisplayWidth(string text)
{
return StringDisplaySize(text).Width;
@@ -281,6 +295,7 @@
/// </summary>
/// <param name="text"></param>
/// <returns></returns>
+ [Obsolete]
public int StringDisplayHeight(string text)
{
return StringDisplaySize(text).Height;
@@ -290,21 +305,32 @@
/// </summary>
/// <param name="text"></param>
/// <returns></returns>
+ [Obsolete]
public Size StringDisplaySize(string text)
{
- return impl.StringDisplaySize(mState, text);
+ return impl.MeasureString(mState, text);
}
+
/// <summary>
- /// Measures the display size of the specified string, using the specified state information.
+ /// Measures the display size of the specified string.
/// </summary>
- /// <param name="state"></param>
/// <param name="text"></param>
+ /// <param name="length"></param>
/// <returns></returns>
- public Size StringDisplaySize(Fon...
[truncated message content] |
|
From: <ka...@us...> - 2009-11-25 01:57:18
|
Revision: 1126
http://agate.svn.sourceforge.net/agate/?rev=1126&view=rev
Author: kanato
Date: 2009-11-25 01:57:08 +0000 (Wed, 25 Nov 2009)
Log Message:
-----------
Rename DisplayImp.Supports to DisplayImpl.CapsBool.
Correct query of MaxSurfaceSize with OPenGL.
Modified Paths:
--------------
trunk/AgateLib/DisplayLib/DisplayCapsInfo.cs
trunk/AgateLib/ImplementationBase/DisplayImpl.cs
trunk/Drivers/AgateDrawing/Drawing_Display.cs
trunk/Drivers/AgateOTK/GL_Display.cs
trunk/Drivers/AgateSDX/SDX_Display.cs
trunk/Tests/GuiTests/Textboxes.cs
trunk/Tests/Tests.csproj
Added Paths:
-----------
trunk/Tests/DisplayTests/Capabilities/
trunk/Tests/DisplayTests/Capabilities/Capabilities.cs
trunk/Tests/DisplayTests/Capabilities/frmCapabilities.Designer.cs
trunk/Tests/DisplayTests/Capabilities/frmCapabilities.cs
trunk/Tests/DisplayTests/Capabilities/frmCapabilities.resx
Modified: trunk/AgateLib/DisplayLib/DisplayCapsInfo.cs
===================================================================
--- trunk/AgateLib/DisplayLib/DisplayCapsInfo.cs 2009-11-24 20:45:10 UTC (rev 1125)
+++ trunk/AgateLib/DisplayLib/DisplayCapsInfo.cs 2009-11-25 01:57:08 UTC (rev 1126)
@@ -20,7 +20,7 @@
/// </summary>
public bool SupportsFullScreen
{
- get { return Display.Impl.Supports(DisplayBoolCaps.FullScreen); }
+ get { return Display.Impl.CapsBool(DisplayBoolCaps.FullScreen); }
}
/// <summary>
/// Indicates whether or not the screen resolution can be changed.
@@ -30,28 +30,28 @@
/// </summary>
public bool SupportsFullScreenModeSwitching
{
- get { return Display.Impl.Supports(DisplayBoolCaps.FullScreenModeSwitching); }
+ get { return Display.Impl.CapsBool(DisplayBoolCaps.FullScreenModeSwitching); }
}
/// <summary>
/// Indicates whether setting Surface.SetScale has any visible effect.
/// </summary>
public bool SupportsScaling
{
- get { return Display.Impl.Supports(DisplayBoolCaps.Scaling); }
+ get { return Display.Impl.CapsBool(DisplayBoolCaps.Scaling); }
}
/// <summary>
/// Indicates whether setting Surface.RotationAngle has any visible effect.
/// </summary>
public bool SupportsRotation
{
- get { return Display.Impl.Supports(DisplayBoolCaps.Rotation); }
+ get { return Display.Impl.CapsBool(DisplayBoolCaps.Rotation); }
}
/// <summary>
/// Indicates whether setting Surface.Color has any visible effect.
/// </summary>
public bool SupportsColor
{
- get { return Display.Impl.Supports(DisplayBoolCaps.Color); }
+ get { return Display.Impl.CapsBool(DisplayBoolCaps.Color); }
}
/// <summary>
/// Indicates whether Surface gradients are supported. If not, then setting Surface.ColorGradient
@@ -60,51 +60,35 @@
/// </summary>
public bool SupportsGradient
{
- get { return Display.Impl.Supports(DisplayBoolCaps.Gradient); }
+ get { return Display.Impl.CapsBool(DisplayBoolCaps.Gradient); }
}
/// <summary>
/// Indicates whether setting Surface.Alpha has any visible effect.
/// </summary>
public bool SupportsSurfaceAlpha
{
- get { return Display.Impl.Supports(DisplayBoolCaps.SurfaceAlpha); }
+ get { return Display.Impl.CapsBool(DisplayBoolCaps.SurfaceAlpha); }
}
/// <summary>
/// Indicates whether the alpha channel in surface pixels is used.
/// </summary>
public bool SupportsPixelAlpha
{
- get { return Display.Impl.Supports(DisplayBoolCaps.PixelAlpha); }
+ get { return Display.Impl.CapsBool(DisplayBoolCaps.PixelAlpha); }
}
/// <summary>
- /// Indicates whether or not lighting is supported.
- /// </summary>
- [Obsolete]
- public bool SupportsLighting
- {
- get { return Display.Impl.Supports(DisplayBoolCaps.Lighting); }
- }
- /// <summary>
- /// Indicates the maximum number of lights which can be used.
- /// </summary>
- [Obsolete]
- public int MaxLights
- {
- get { return 8; }
- }
- /// <summary>
/// Indicates whether there is hardware acceleration available for 2D and 3D drawing.
/// </summary>
public bool IsHardwareAccelerated
{
- get { return Display.Impl.Supports(DisplayBoolCaps.IsHardwareAccelerated); }
+ get { return Display.Impl.CapsBool(DisplayBoolCaps.IsHardwareAccelerated); }
}
/// <summary>
/// Indicates whether or not vertex/pixel shaders are supported.
/// </summary>
public bool SupportsCustomShaders
{
- get { return Display.Impl.Supports(DisplayBoolCaps.CustomShaders); }
+ get { return Display.Impl.CapsBool(DisplayBoolCaps.CustomShaders); }
}
/// <summary>
/// Indicates which shader language is supported.
@@ -119,7 +103,7 @@
/// </summary>
public bool CanCreateBitmapFont
{
- get { return Display.Impl.Supports(DisplayBoolCaps.CanCreateBitmapFont); }
+ get { return Display.Impl.CapsBool(DisplayBoolCaps.CanCreateBitmapFont); }
}
public Size MaxSurfaceSize
@@ -172,11 +156,6 @@
/// </summary>
PixelAlpha,
/// <summary>
- /// Indicates whether or not lighting is supported.
- /// </summary>
- [Obsolete]
- Lighting,
- /// <summary>
/// Indicates whether there is hardware acceleration available for 2D and 3D drawing.
/// </summary>
IsHardwareAccelerated,
Modified: trunk/AgateLib/ImplementationBase/DisplayImpl.cs
===================================================================
--- trunk/AgateLib/ImplementationBase/DisplayImpl.cs 2009-11-24 20:45:10 UTC (rev 1125)
+++ trunk/AgateLib/ImplementationBase/DisplayImpl.cs 2009-11-25 01:57:08 UTC (rev 1126)
@@ -38,9 +38,13 @@
private FrameBuffer mRenderTarget;
- public abstract bool Supports(DisplayBoolCaps caps);
+ #region --- Capabilities Reporting ---
+
+ public abstract bool CapsBool(DisplayBoolCaps caps);
public abstract Size CapsSize(DisplaySizeCaps displaySizeCaps);
+ #endregion
+
public abstract IEnumerable<DisplayLib.Shaders.ShaderLanguage> SupportedShaderLanguages { get; }
private static AgateShader mShader;
Modified: trunk/Drivers/AgateDrawing/Drawing_Display.cs
===================================================================
--- trunk/Drivers/AgateDrawing/Drawing_Display.cs 2009-11-24 20:45:10 UTC (rev 1125)
+++ trunk/Drivers/AgateDrawing/Drawing_Display.cs 2009-11-25 01:57:08 UTC (rev 1126)
@@ -288,7 +288,7 @@
#region --- IDisplayCaps Members ---
- public override bool Supports(DisplayBoolCaps caps)
+ public override bool CapsBool(DisplayBoolCaps caps)
{
switch (caps)
{
Modified: trunk/Drivers/AgateOTK/GL_Display.cs
===================================================================
--- trunk/Drivers/AgateOTK/GL_Display.cs 2009-11-24 20:45:10 UTC (rev 1125)
+++ trunk/Drivers/AgateOTK/GL_Display.cs 2009-11-25 01:57:08 UTC (rev 1126)
@@ -391,7 +391,7 @@
protected override ShaderCompilerImpl CreateShaderCompiler()
{
- if (this.Supports(DisplayBoolCaps.CustomShaders))
+ if (this.CapsBool(DisplayBoolCaps.CustomShaders))
{
if (mGLVersion < 2.0m)
return new ArbShaderCompiler();
@@ -485,7 +485,7 @@
#region --- Display Capabilities ---
- public override bool Supports(DisplayBoolCaps caps)
+ public override bool CapsBool(DisplayBoolCaps caps)
{
switch (caps)
{
@@ -508,7 +508,11 @@
{
switch (displaySizeCaps)
{
- case DisplaySizeCaps.MaxSurfaceSize: return new Size(1024, 1024);
+ case DisplaySizeCaps.MaxSurfaceSize:
+ int val;
+ GL.GetInteger(GetPName.MaxTextureSize, out val);
+
+ return new Size(val, val);
}
return new Size(0, 0);
Modified: trunk/Drivers/AgateSDX/SDX_Display.cs
===================================================================
--- trunk/Drivers/AgateSDX/SDX_Display.cs 2009-11-24 20:45:10 UTC (rev 1125)
+++ trunk/Drivers/AgateSDX/SDX_Display.cs 2009-11-25 01:57:08 UTC (rev 1126)
@@ -879,7 +879,7 @@
#region --- IDisplayCaps Members ---
- public override bool Supports(DisplayBoolCaps caps)
+ public override bool CapsBool(DisplayBoolCaps caps)
{
switch (caps)
{
Added: trunk/Tests/DisplayTests/Capabilities/Capabilities.cs
===================================================================
--- trunk/Tests/DisplayTests/Capabilities/Capabilities.cs (rev 0)
+++ trunk/Tests/DisplayTests/Capabilities/Capabilities.cs 2009-11-25 01:57:08 UTC (rev 1126)
@@ -0,0 +1,37 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Tests.DisplayTests.Capabilities
+{
+ class Capabilities : IAgateTest
+ {
+ #region IAgateTest Members
+
+ public string Name
+ {
+ get { return "Capabilities"; }
+ }
+
+ public string Category
+ {
+ get { return "Display"; }
+ }
+
+ public void Main(string[] args)
+ {
+ using (AgateLib.AgateSetup setup = new AgateLib.AgateSetup())
+ {
+ setup.AskUser = true;
+ setup.Initialize(true, false, false);
+ if (setup.WasCanceled)
+ return;
+
+ new frmCapabilities().ShowDialog();
+ }
+ }
+
+ #endregion
+ }
+}
Added: trunk/Tests/DisplayTests/Capabilities/frmCapabilities.Designer.cs
===================================================================
--- trunk/Tests/DisplayTests/Capabilities/frmCapabilities.Designer.cs (rev 0)
+++ trunk/Tests/DisplayTests/Capabilities/frmCapabilities.Designer.cs 2009-11-25 01:57:08 UTC (rev 1126)
@@ -0,0 +1,60 @@
+namespace Tests.DisplayTests.Capabilities
+{
+ partial class frmCapabilities
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.propertyGrid1 = new System.Windows.Forms.PropertyGrid();
+ this.SuspendLayout();
+ //
+ // propertyGrid1
+ //
+ this.propertyGrid1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.propertyGrid1.Location = new System.Drawing.Point(12, 12);
+ this.propertyGrid1.Name = "propertyGrid1";
+ this.propertyGrid1.Size = new System.Drawing.Size(495, 385);
+ this.propertyGrid1.TabIndex = 0;
+ //
+ // frmCapabilities
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(519, 409);
+ this.Controls.Add(this.propertyGrid1);
+ this.Name = "frmCapabilities";
+ this.Text = "Capabilities";
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.PropertyGrid propertyGrid1;
+ }
+}
\ No newline at end of file
Added: trunk/Tests/DisplayTests/Capabilities/frmCapabilities.cs
===================================================================
--- trunk/Tests/DisplayTests/Capabilities/frmCapabilities.cs (rev 0)
+++ trunk/Tests/DisplayTests/Capabilities/frmCapabilities.cs 2009-11-25 01:57:08 UTC (rev 1126)
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+
+namespace Tests.DisplayTests.Capabilities
+{
+ public partial class frmCapabilities : Form
+ {
+ public frmCapabilities()
+ {
+ InitializeComponent();
+
+ Text += AgateLib.Drivers.Registrar.DisplayDrivers[0].FriendlyName;
+ propertyGrid1.SelectedObject = AgateLib.DisplayLib.Display.Caps;
+ }
+ }
+}
Added: trunk/Tests/DisplayTests/Capabilities/frmCapabilities.resx
===================================================================
--- trunk/Tests/DisplayTests/Capabilities/frmCapabilities.resx (rev 0)
+++ trunk/Tests/DisplayTests/Capabilities/frmCapabilities.resx 2009-11-25 01:57:08 UTC (rev 1126)
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root>
\ No newline at end of file
Modified: trunk/Tests/GuiTests/Textboxes.cs
===================================================================
--- trunk/Tests/GuiTests/Textboxes.cs 2009-11-24 20:45:10 UTC (rev 1125)
+++ trunk/Tests/GuiTests/Textboxes.cs 2009-11-25 01:57:08 UTC (rev 1126)
@@ -37,7 +37,7 @@
this.GuiRoot = new GuiRoot();
Window wind = new Window("Textboxes test");
- wind.Size = new AgateLib.Geometry.Size(500, 400);
+ wind.Size = new AgateLib.Geometry.Size(320, 240);
TextBox b = new TextBox();
b.Text = "This is a single line textbox.";
Modified: trunk/Tests/Tests.csproj
===================================================================
--- trunk/Tests/Tests.csproj 2009-11-24 20:45:10 UTC (rev 1125)
+++ trunk/Tests/Tests.csproj 2009-11-25 01:57:08 UTC (rev 1126)
@@ -95,6 +95,13 @@
<DependentUpon>PlatformDetection.cs</DependentUpon>
</Compile>
<Compile Include="CoreTests\PlatformDetection\PlatformDetector.cs" />
+ <Compile Include="DisplayTests\Capabilities\Capabilities.cs" />
+ <Compile Include="DisplayTests\Capabilities\frmCapabilities.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="DisplayTests\Capabilities\frmCapabilities.Designer.cs">
+ <DependentUpon>frmCapabilities.cs</DependentUpon>
+ </Compile>
<Compile Include="DisplayTests\ClipRect.cs" />
<Compile Include="Fonts\Builtin.cs" />
<Compile Include="frmLauncher.cs">
@@ -326,6 +333,9 @@
<EmbeddedResource Include="CoreTests\PlatformDetection\PlatformDetection.resx">
<DependentUpon>PlatformDetection.cs</DependentUpon>
</EmbeddedResource>
+ <EmbeddedResource Include="DisplayTests\Capabilities\frmCapabilities.resx">
+ <DependentUpon>frmCapabilities.cs</DependentUpon>
+ </EmbeddedResource>
<EmbeddedResource Include="frmLauncher.resx">
<SubType>Designer</SubType>
<DependentUpon>frmLauncher.cs</DependentUpon>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2009-12-01 17:59:35
|
Revision: 1136
http://agate.svn.sourceforge.net/agate/?rev=1136&view=rev
Author: kanato
Date: 2009-12-01 17:59:26 +0000 (Tue, 01 Dec 2009)
Log Message:
-----------
Implement scrollbar-mouse interaction for vertical scrollbar.
Add documentation and license information to GUI and DisplayLib files.
Modified Paths:
--------------
trunk/AgateLib/DisplayLib/Display.cs
trunk/AgateLib/DisplayLib/IndexBuffer.cs
trunk/AgateLib/DisplayLib/Shaders/AgateBuiltInShaders.cs
trunk/AgateLib/DisplayLib/Shaders/Basic2DShader.cs
trunk/AgateLib/DisplayLib/Shaders/Implementation/Basic2DImpl.cs
trunk/AgateLib/DisplayLib/Shaders/Implementation/Lighting2DImpl.cs
trunk/AgateLib/DisplayLib/Shaders/Implementation/Lighting3DImpl.cs
trunk/AgateLib/DisplayLib/Shaders/Lighting2D.cs
trunk/AgateLib/DisplayLib/Shaders/Lighting3D.cs
trunk/AgateLib/DisplayLib/Surface.cs
trunk/AgateLib/DisplayLib/SurfaceState.cs
trunk/AgateLib/DisplayLib/TextLayout.cs
trunk/AgateLib/DisplayLib/VertexBuffer.cs
trunk/AgateLib/Gui/AgateGuiException.cs
trunk/AgateLib/Gui/Button.cs
trunk/AgateLib/Gui/Cache/WidgetCache.cs
trunk/AgateLib/Gui/CheckBox.cs
trunk/AgateLib/Gui/ComboBox.cs
trunk/AgateLib/Gui/Container.cs
trunk/AgateLib/Gui/GuiRoot.cs
trunk/AgateLib/Gui/IGuiThemeEngine.cs
trunk/AgateLib/Gui/ILayoutPerformer.cs
trunk/AgateLib/Gui/Label.cs
trunk/AgateLib/Gui/Layout/BoxLayoutBase.cs
trunk/AgateLib/Gui/Layout/Grid.cs
trunk/AgateLib/Gui/Layout/HorizontalBox.cs
trunk/AgateLib/Gui/Layout/VerticalBox.cs
trunk/AgateLib/Gui/LayoutExpand.cs
trunk/AgateLib/Gui/ListBox.cs
trunk/AgateLib/Gui/Panel.cs
trunk/AgateLib/Gui/RadioButton.cs
trunk/AgateLib/Gui/ScrollBar.cs
trunk/AgateLib/Gui/TextBox.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/Cache/ScrollBarCache.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/Cache/TextBoxCache.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/Mercury.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryButton.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryCheckBox.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryGuiRoot.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryLabel.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryListBox.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryPanel.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryScheme.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryScrollBar.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryTextBox.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryWidget.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryWindow.cs
trunk/AgateLib/Gui/Widget.cs
trunk/AgateLib/Gui/WidgetList.cs
trunk/AgateLib/Gui/Window.cs
trunk/Tests/Tests.csproj
Modified: trunk/AgateLib/DisplayLib/Display.cs
===================================================================
--- trunk/AgateLib/DisplayLib/Display.cs 2009-12-01 07:06:38 UTC (rev 1135)
+++ trunk/AgateLib/DisplayLib/Display.cs 2009-12-01 17:59:26 UTC (rev 1136)
@@ -144,13 +144,6 @@
}
}
- [Obsolete]
- public static Shaders.Effect Effect
- {
- get { return null; }
- set { throw new Exception(); }
- }
-
public static Shaders.AgateShader Shader
{
get { return impl.Shader; }
Modified: trunk/AgateLib/DisplayLib/IndexBuffer.cs
===================================================================
--- trunk/AgateLib/DisplayLib/IndexBuffer.cs 2009-12-01 07:06:38 UTC (rev 1135)
+++ trunk/AgateLib/DisplayLib/IndexBuffer.cs 2009-12-01 17:59:26 UTC (rev 1136)
@@ -1,4 +1,22 @@
-using System;
+// The contents of this file are subject to the Mozilla Public License
+// Version 1.1 (the "License"); you may not use this file except in
+// compliance with the License. You may obtain a copy of the License at
+// http://www.mozilla.org/MPL/
+//
+// Software distributed under the License is distributed on an "AS IS"
+// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+// License for the specific language governing rights and limitations
+// under the License.
+//
+// The Original Code is AgateLib.
+//
+// The Initial Developer of the Original Code is Erik Ylvisaker.
+// Portions created by Erik Ylvisaker are Copyright (C) 2006-2009.
+// All Rights Reserved.
+//
+// Contributor(s): Erik Ylvisaker
+//
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
Modified: trunk/AgateLib/DisplayLib/Shaders/AgateBuiltInShaders.cs
===================================================================
--- trunk/AgateLib/DisplayLib/Shaders/AgateBuiltInShaders.cs 2009-12-01 07:06:38 UTC (rev 1135)
+++ trunk/AgateLib/DisplayLib/Shaders/AgateBuiltInShaders.cs 2009-12-01 17:59:26 UTC (rev 1136)
@@ -1,3 +1,21 @@
+// The contents of this file are subject to the Mozilla Public License
+// Version 1.1 (the "License"); you may not use this file except in
+// compliance with the License. You may obtain a copy of the License at
+// http://www.mozilla.org/MPL/
+//
+// Software distributed under the License is distributed on an "AS IS"
+// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+// License for the specific language governing rights and limitations
+// under the License.
+//
+// The Original Code is AgateLib.
+//
+// The Initial Developer of the Original Code is Erik Ylvisaker.
+// Portions created by Erik Ylvisaker are Copyright (C) 2006-2009.
+// All Rights Reserved.
+//
+// Contributor(s): Erik Ylvisaker
+//
using System;
using System.Collections.Generic;
using System.Linq;
@@ -5,6 +23,9 @@
namespace AgateLib.DisplayLib.Shaders
{
+ /// <summary>
+ /// Static class containing AgateLib built in shaders.
+ /// </summary>
public static class AgateBuiltInShaders
{
internal static void InitializeShaders()
Modified: trunk/AgateLib/DisplayLib/Shaders/Basic2DShader.cs
===================================================================
--- trunk/AgateLib/DisplayLib/Shaders/Basic2DShader.cs 2009-12-01 07:06:38 UTC (rev 1135)
+++ trunk/AgateLib/DisplayLib/Shaders/Basic2DShader.cs 2009-12-01 17:59:26 UTC (rev 1136)
@@ -25,13 +25,22 @@
namespace AgateLib.DisplayLib.Shaders
{
+ /// <summary>
+ /// The default 2D shader. This shader supports no effects, and must be implemented
+ /// by every AgateLib display driver.
+ /// </summary>
public class Basic2DShader : AgateInternalShader
{
+ /// <summary>
+ /// Constructs a 2D shader.
+ /// </summary>
public Basic2DShader()
{
}
-
+ /// <summary>
+ /// Returns the implementation.
+ /// </summary>
protected new Basic2DImpl Impl
{
get { return (Basic2DImpl)base.Impl; }
@@ -42,6 +51,11 @@
get { return BuiltInShader.Basic2DShader; }
}
+ /// <summary>
+ /// Gets or sets the coordinate system used for drawing.
+ /// The default for any render target is to use a one-to-one
+ /// mapping for pixels.
+ /// </summary>
public Rectangle CoordinateSystem
{
get { return Impl.CoordinateSystem; }
Modified: trunk/AgateLib/DisplayLib/Shaders/Implementation/Basic2DImpl.cs
===================================================================
--- trunk/AgateLib/DisplayLib/Shaders/Implementation/Basic2DImpl.cs 2009-12-01 07:06:38 UTC (rev 1135)
+++ trunk/AgateLib/DisplayLib/Shaders/Implementation/Basic2DImpl.cs 2009-12-01 17:59:26 UTC (rev 1136)
@@ -1,4 +1,22 @@
-using System;
+// The contents of this file are subject to the Mozilla Public License
+// Version 1.1 (the "License"); you may not use this file except in
+// compliance with the License. You may obtain a copy of the License at
+// http://www.mozilla.org/MPL/
+//
+// Software distributed under the License is distributed on an "AS IS"
+// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+// License for the specific language governing rights and limitations
+// under the License.
+//
+// The Original Code is AgateLib.
+//
+// The Initial Developer of the Original Code is Erik Ylvisaker.
+// Portions created by Erik Ylvisaker are Copyright (C) 2006-2009.
+// All Rights Reserved.
+//
+// Contributor(s): Erik Ylvisaker
+//
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
Modified: trunk/AgateLib/DisplayLib/Shaders/Implementation/Lighting2DImpl.cs
===================================================================
--- trunk/AgateLib/DisplayLib/Shaders/Implementation/Lighting2DImpl.cs 2009-12-01 07:06:38 UTC (rev 1135)
+++ trunk/AgateLib/DisplayLib/Shaders/Implementation/Lighting2DImpl.cs 2009-12-01 17:59:26 UTC (rev 1136)
@@ -1,3 +1,21 @@
+// The contents of this file are subject to the Mozilla Public License
+// Version 1.1 (the "License"); you may not use this file except in
+// compliance with the License. You may obtain a copy of the License at
+// http://www.mozilla.org/MPL/
+//
+// Software distributed under the License is distributed on an "AS IS"
+// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+// License for the specific language governing rights and limitations
+// under the License.
+//
+// The Original Code is AgateLib.
+//
+// The Initial Developer of the Original Code is Erik Ylvisaker.
+// Portions created by Erik Ylvisaker are Copyright (C) 2006-2009.
+// All Rights Reserved.
+//
+// Contributor(s): Erik Ylvisaker
+//
using System;
using System.Collections.Generic;
using System.Linq;
Modified: trunk/AgateLib/DisplayLib/Shaders/Implementation/Lighting3DImpl.cs
===================================================================
--- trunk/AgateLib/DisplayLib/Shaders/Implementation/Lighting3DImpl.cs 2009-12-01 07:06:38 UTC (rev 1135)
+++ trunk/AgateLib/DisplayLib/Shaders/Implementation/Lighting3DImpl.cs 2009-12-01 17:59:26 UTC (rev 1136)
@@ -1,4 +1,22 @@
-using System;
+// The contents of this file are subject to the Mozilla Public License
+// Version 1.1 (the "License"); you may not use this file except in
+// compliance with the License. You may obtain a copy of the License at
+// http://www.mozilla.org/MPL/
+//
+// Software distributed under the License is distributed on an "AS IS"
+// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+// License for the specific language governing rights and limitations
+// under the License.
+//
+// The Original Code is AgateLib.
+//
+// The Initial Developer of the Original Code is Erik Ylvisaker.
+// Portions created by Erik Ylvisaker are Copyright (C) 2006-2009.
+// All Rights Reserved.
+//
+// Contributor(s): Erik Ylvisaker
+//
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
Modified: trunk/AgateLib/DisplayLib/Shaders/Lighting2D.cs
===================================================================
--- trunk/AgateLib/DisplayLib/Shaders/Lighting2D.cs 2009-12-01 07:06:38 UTC (rev 1135)
+++ trunk/AgateLib/DisplayLib/Shaders/Lighting2D.cs 2009-12-01 17:59:26 UTC (rev 1136)
@@ -1,3 +1,21 @@
+// The contents of this file are subject to the Mozilla Public License
+// Version 1.1 (the "License"); you may not use this file except in
+// compliance with the License. You may obtain a copy of the License at
+// http://www.mozilla.org/MPL/
+//
+// Software distributed under the License is distributed on an "AS IS"
+// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+// License for the specific language governing rights and limitations
+// under the License.
+//
+// The Original Code is AgateLib.
+//
+// The Initial Developer of the Original Code is Erik Ylvisaker.
+// Portions created by Erik Ylvisaker are Copyright (C) 2006-2009.
+// All Rights Reserved.
+//
+// Contributor(s): Erik Ylvisaker
+//
using System;
using System.Collections.Generic;
using System.Linq;
@@ -7,6 +25,9 @@
namespace AgateLib.DisplayLib.Shaders
{
+ /// <summary>
+ /// Lighting2D is the Basic2DShader with lighting effects added.
+ /// </summary>
public class Lighting2D : AgateInternalShader
{
protected override BuiltInShader BuiltInShaderType
@@ -19,20 +40,32 @@
get { return (Lighting2DImpl)base.Impl; }
}
+ /// <summary>
+ /// Gets the list of lights.
+ /// </summary>
public List<Light> Lights
{
get { return Impl.Lights; }
}
+ /// <summary>
+ /// Gets or sets the ambient light value.
+ /// </summary>
public Color AmbientLight
{
get { return Impl.AmbientLight; }
set { Impl.AmbientLight = value; }
}
+ /// <summary>
+ /// Gets the maximum number of active lights.
+ /// </summary>
public int MaxActiveLights
{
get { return Impl.MaxActiveLights; }
}
-
+ /// <summary>
+ /// Adds a light to the list.
+ /// </summary>
+ /// <param name="ptLight"></param>
public void AddLight(Light ptLight)
{
for (int i = 0; i < Lights.Count; i++)
Modified: trunk/AgateLib/DisplayLib/Shaders/Lighting3D.cs
===================================================================
--- trunk/AgateLib/DisplayLib/Shaders/Lighting3D.cs 2009-12-01 07:06:38 UTC (rev 1135)
+++ trunk/AgateLib/DisplayLib/Shaders/Lighting3D.cs 2009-12-01 17:59:26 UTC (rev 1136)
@@ -1,4 +1,22 @@
-using System;
+// The contents of this file are subject to the Mozilla Public License
+// Version 1.1 (the "License"); you may not use this file except in
+// compliance with the License. You may obtain a copy of the License at
+// http://www.mozilla.org/MPL/
+//
+// Software distributed under the License is distributed on an "AS IS"
+// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+// License for the specific language governing rights and limitations
+// under the License.
+//
+// The Original Code is AgateLib.
+//
+// The Initial Developer of the Original Code is Erik Ylvisaker.
+// Portions created by Erik Ylvisaker are Copyright (C) 2006-2009.
+// All Rights Reserved.
+//
+// Contributor(s): Erik Ylvisaker
+//
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -7,19 +25,37 @@
namespace AgateLib.DisplayLib.Shaders
{
+ /// <summary>
+ /// Lighting3D is the basic 3D shader. Any driver with support for 3D must implement
+ /// this shader.
+ /// </summary>
public class Lighting3D : Implementation.AgateInternalShader
{
protected override BuiltInShader BuiltInShaderType
{
get { return BuiltInShader.Lighting3D; }
}
-
+ /// <summary>
+ /// Returns the implementation.
+ /// </summary>
protected new Lighting3DImpl Impl { get { return (Lighting3DImpl)base.Impl;}}
+ /// <summary>
+ /// Projection matrix for 3D view. Best obtained by Matrix4x4.Projection.
+ /// </summary>
public Matrix4x4 Projection { get { return Impl.Projection; } set { Impl.Projection = value; } }
+ /// <summary>
+ /// View matrix for 3D view. Best obtained by Matrix4x4.ViewLookAt.
+ /// </summary>
public Matrix4x4 View { get { return Impl.View; } set { Impl.View = value; } }
+ /// <summary>
+ /// World matrix for 3D view.
+ /// </summary>
public Matrix4x4 World { get { return Impl.World; } set { Impl.World= value; } }
+ /// <summary>
+ /// Set to true to enable lighting effects.
+ /// </summary>
public bool EnableLighting { get { return Impl.EnableLighting; } set { Impl.EnableLighting = value; } }
public Light[] Lights { get { return Impl.Lights; } }
public Color AmbientLight { get { return Impl.AmbientLight; } set { Impl.AmbientLight = value; } }
Modified: trunk/AgateLib/DisplayLib/Surface.cs
===================================================================
--- trunk/AgateLib/DisplayLib/Surface.cs 2009-12-01 07:06:38 UTC (rev 1135)
+++ trunk/AgateLib/DisplayLib/Surface.cs 2009-12-01 17:59:26 UTC (rev 1136)
@@ -50,12 +50,22 @@
Tga,
}
+ /// <summary>
+ /// Enum for indicating the sampling mode used when stretching or shrinking surfaces.
+ /// </summary>
public enum InterpolationMode
{
+ /// <summary>
+ /// Use whatever the driver default is.
+ /// </summary>
Default,
-
+ /// <summary>
+ /// Use the fastest method, usually nearest neighbor pixel sampling.
+ /// </summary>
Fastest,
-
+ /// <summary>
+ /// Use the nicest method, usually bilinear sampling.
+ /// </summary>
Nicest,
}
/// <summary>
@@ -114,7 +124,7 @@
/// <summary>
/// Creates a surface object, from the specified image file.
/// </summary>
- /// <param name="filename"></param>
+ /// <param name="filename">Path and file name for the image file to load.</param>
public Surface(string filename)
: this(AgateFileProvider.Images, filename)
{
@@ -122,8 +132,8 @@
/// <summary>
/// Creates a surface object using the specified file provider to open the image file.
/// </summary>
- /// <param name="filename"></param>
- /// <param name="fileProvider"></param>
+ /// <param name="filename">Path and file name for the image file to load.</param>
+ /// <param name="fileProvider">The IFileProvider object which will resolve the filename and open the stream</param>
public Surface(IFileProvider fileProvider, string filename)
{
if (Display.Impl == null)
@@ -140,7 +150,7 @@
/// <summary>
/// Creates a surface object from the data in the specified stream.
/// </summary>
- /// <param name="st"></param>
+ /// <param name="st">Stream from which to load the surface data from.</param>
public Surface(Stream st)
{
if (Display.Impl == null)
@@ -152,10 +162,11 @@
Display.PackAllSurfacesEvent += new EventHandler(Display_PackAllSurfacesEvent);
}
/// <summary>
- /// Creates a surface object of the specified size.
+ /// Creates a surface object of the specified size.
+ /// The surface is initialized to contain pixels with ARGB = (0,0,0,0).
/// </summary>
- /// <param name="width"></param>
- /// <param name="height"></param>
+ /// <param name="width">Width of the newly created surface.</param>
+ /// <param name="height">Height of the newly created surface.</param>
public Surface(int width, int height)
: this(new Size(width, height))
{
@@ -163,8 +174,9 @@
}
/// <summary>
/// Creates a surface object of the specified size.
+ /// The surface is initialized to contain pixels with ARGB = (0,0,0,0).
/// </summary>
- /// <param name="size"></param>
+ /// <param name="size">Size of the newly created surface.</param>
public Surface(Size size)
{
if (Display.Impl == null)
@@ -178,7 +190,7 @@
/// <summary>
/// Constructs a surface object from the specified PixelBuffer object.
/// </summary>
- /// <param name="pixels"></param>
+ /// <param name="pixels">The PixelBuffer containing the pixel data to use.</param>
public Surface(PixelBuffer pixels)
: this(pixels.Size)
{
@@ -254,6 +266,14 @@
/// </summary>
public Size SurfaceSize { get { return impl.SurfaceSize; } }
+ /// <summary>
+ /// Gets or sets a value indicating how to sample points from this surface.
+ /// </summary>
+ public InterpolationMode InterpolationHint
+ {
+ get { return impl.InterpolationHint; }
+ set { impl.InterpolationHint = value; }
+ }
/// <summary>
/// Gets or sets the state of the surface.
@@ -458,8 +478,8 @@
/// using all the state information defined in the properties
/// of this surface.
/// </summary>
- /// <param name="destX"></param>
- /// <param name="destY"></param>
+ /// <param name="destX">X position to draw to.</param>
+ /// <param name="destY">Y position to draw to.</param>
public void Draw(int destX, int destY)
{
mState.DrawInstances.SetCount(1);
@@ -472,8 +492,8 @@
/// using all the state information defined in the properties
/// of this surface.
/// </summary>
- /// <param name="destX"></param>
- /// <param name="destY"></param>
+ /// <param name="destX">X position to draw to.</param>
+ /// <param name="destY">Y position to draw to.</param>
public void Draw(float destX, float destY)
{
mState.DrawInstances.SetCount(1);
@@ -486,7 +506,7 @@
/// using all the state information defined in the properties
/// of this surface.
/// </summary>
- /// <param name="destPt"></param>
+ /// <param name="destPt">Destination point to draw to.</param>
public void Draw(Point destPt)
{
Draw(destPt.X, destPt.Y);
@@ -496,7 +516,7 @@
/// using all the state information defined in the properties
/// of this surface.
/// </summary>
- /// <param name="destPt"></param>
+ /// <param name="destPt">Destination point to draw to.</param>
public void Draw(Vector2 destPt)
{
Draw(destPt.X, destPt.Y);
@@ -506,7 +526,7 @@
/// using all the state information defined in the properties
/// of this surface.
/// </summary>
- /// <param name="destPt"></param>
+ /// <param name="destPt">Destination point to draw to.</param>
public void Draw(PointF destPt)
{
Draw(destPt.X, destPt.Y);
@@ -518,7 +538,7 @@
/// Ignores the value of RotationCenter and uses the specified
/// point to rotate around instead.
/// </summary>
- /// <param name="destPt"></param>
+ /// <param name="destPt">Destination point to draw to.</param>
/// <param name="rotationCenter">Center of rotation to use, relative
/// to the top-left of the surface.</param>
public void Draw(PointF destPt, PointF rotationCenter)
@@ -554,9 +574,12 @@
State.RotationCenter = oldrotation;
}
+ /// <summary>
+ /// Draws the surface using the parameters in the specified state object.
+ /// </summary>
+ /// <param name="state">The surface state information to use when drawing.</param>
public void Draw(SurfaceState state)
{
- // TODO: fix this
impl.Draw(state);
}
@@ -569,8 +592,8 @@
/// DisplayAlignment and Scaling. Color and alpha values
/// are still used.
/// </summary>
- /// <param name="srcRect"></param>
- /// <param name="destRect"></param>
+ /// <param name="srcRect">Source rectangle on the surface to draw from.</param>
+ /// <param name="destRect">Destination rectangle in the render target to draw to.</param>
public void Draw(Rectangle srcRect, Rectangle destRect)
{
if (rectState == null)
@@ -599,7 +622,7 @@
/// DisplayAlignment and Scaling. Color and alpha values
/// are still used.
/// </summary>
- /// <param name="destRect"></param>
+ /// <param name="destRect">Destination rectangle in the render target to draw to.</param>
public void Draw(Rectangle destRect)
{
Draw(new Rectangle(0, 0, SurfaceWidth, SurfaceHeight), destRect);
@@ -691,11 +714,6 @@
#region --- Surface Data Manipulation ---
- public InterpolationMode InterpolationHint
- {
- get { return impl.InterpolationHint; }
- set { impl.InterpolationHint = value; }
- }
/// <summary>
/// Saves the surface to the specified file.
@@ -704,7 +722,7 @@
/// is no extension present or it is unrecognized, PNG is
/// assumed.
/// </summary>
- /// <param name="filename"></param>
+ /// <param name="filename">File name to save to.</param>
public void SaveTo(string filename)
{
SaveTo(filename, FormatFromExtension(filename));
@@ -715,8 +733,8 @@
/// ".bmp" than the SaveTo(string) overload is prefered, as it
/// chooses a file format which is consistent with the extension.
/// </summary>
- /// <param name="filename"></param>
- /// <param name="format"></param>
+ /// <param name="filename">File name to save to.</param>
+ /// <param name="format">Image format for the target file.</param>
public void SaveTo(string filename, ImageFileFormat format)
{
impl.SaveTo(filename, format);
@@ -860,8 +878,8 @@
/// <summary>
/// Gets the object which does actual rendering of this surface.
/// This may be cast to a surface object in whatever rendering library
- /// is being used (eg. if using the MDX_1_1 library, this can be cast
- /// to an MDX1_Surface object). You only need to use this if you
+ /// is being used (eg. if using the SDX library, this can be cast
+ /// to an SDX_Surface object). You only need to use this if you
/// want to access features which are specific to the graphics library
/// you're using.
/// </summary>
Modified: trunk/AgateLib/DisplayLib/SurfaceState.cs
===================================================================
--- trunk/AgateLib/DisplayLib/SurfaceState.cs 2009-12-01 07:06:38 UTC (rev 1135)
+++ trunk/AgateLib/DisplayLib/SurfaceState.cs 2009-12-01 17:59:26 UTC (rev 1136)
@@ -25,6 +25,9 @@
namespace AgateLib.DisplayLib
{
+ /// <summary>
+ /// Surface state data used for drawing.
+ /// </summary>
public class SurfaceState
{
private SurfaceStateCache mCache;
Modified: trunk/AgateLib/DisplayLib/TextLayout.cs
===================================================================
--- trunk/AgateLib/DisplayLib/TextLayout.cs 2009-12-01 07:06:38 UTC (rev 1135)
+++ trunk/AgateLib/DisplayLib/TextLayout.cs 2009-12-01 17:59:26 UTC (rev 1136)
@@ -1,4 +1,22 @@
-using System;
+// The contents of this file are subject to the Mozilla Public License
+// Version 1.1 (the "License"); you may not use this file except in
+// compliance with the License. You may obtain a copy of the License at
+// http://www.mozilla.org/MPL/
+//
+// Software distributed under the License is distributed on an "AS IS"
+// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+// License for the specific language governing rights and limitations
+// under the License.
+//
+// The Original Code is AgateLib.
+//
+// The Initial Developer of the Original Code is Erik Ylvisaker.
+// Portions created by Erik Ylvisaker are Copyright (C) 2006-2009.
+// All Rights Reserved.
+//
+// Contributor(s): Erik Ylvisaker
+//
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
Modified: trunk/AgateLib/DisplayLib/VertexBuffer.cs
===================================================================
--- trunk/AgateLib/DisplayLib/VertexBuffer.cs 2009-12-01 07:06:38 UTC (rev 1135)
+++ trunk/AgateLib/DisplayLib/VertexBuffer.cs 2009-12-01 17:59:26 UTC (rev 1136)
@@ -1,4 +1,22 @@
-using System;
+// The contents of this file are subject to the Mozilla Public License
+// Version 1.1 (the "License"); you may not use this file except in
+// compliance with the License. You may obtain a copy of the License at
+// http://www.mozilla.org/MPL/
+//
+// Software distributed under the License is distributed on an "AS IS"
+// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+// License for the specific language governing rights and limitations
+// under the License.
+//
+// The Original Code is AgateLib.
+//
+// The Initial Developer of the Original Code is Erik Ylvisaker.
+// Portions created by Erik Ylvisaker are Copyright (C) 2006-2009.
+// All Rights Reserved.
+//
+// Contributor(s): Erik Ylvisaker
+//
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
Modified: trunk/AgateLib/Gui/AgateGuiException.cs
===================================================================
--- trunk/AgateLib/Gui/AgateGuiException.cs 2009-12-01 07:06:38 UTC (rev 1135)
+++ trunk/AgateLib/Gui/AgateGuiException.cs 2009-12-01 17:59:26 UTC (rev 1136)
@@ -1,4 +1,22 @@
-using System;
+// The contents of this file are subject to the Mozilla Public License
+// Version 1.1 (the "License"); you may not use this file except in
+// compliance with the License. You may obtain a copy of the License at
+// http://www.mozilla.org/MPL/
+//
+// Software distributed under the License is distributed on an "AS IS"
+// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+// License for the specific language governing rights and limitations
+// under the License.
+//
+// The Original Code is AgateLib.
+//
+// The Initial Developer of the Original Code is Erik Ylvisaker.
+// Portions created by Erik Ylvisaker are Copyright (C) 2006-2009.
+// All Rights Reserved.
+//
+// Contributor(s): Erik Ylvisaker
+//
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -6,19 +24,32 @@
namespace AgateLib.Gui
{
+ /// <summary>
+ /// Exception which is thrown when there is an error in the AgateLib Gui.
+ /// </summary>
[global::System.Serializable]
public class AgateGuiException : AgateException
{
- //
- // For guidelines regarding the creation of new exception types, see
- // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconerrorraisinghandlingguidelines.asp
- // and
- // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncscol/html/csharp07192001.asp
- //
-
+ /// <summary>
+ /// Constructs a new AgateGuiException.
+ /// </summary>
public AgateGuiException() { }
+ /// <summary>
+ /// Constructs a new AgateGuiException.
+ /// </summary>
+ /// <param name="message"></param>
public AgateGuiException(string message) : base(message) { }
+ /// <summary>
+ /// Constructs a new AgateGuiException.
+ /// </summary>
+ /// <param name="message"></param>
+ /// <param name="inner"></param>
public AgateGuiException(string message, Exception inner) : base(message, inner) { }
+ /// <summary>
+ /// Constructs a new AgateGuiException.
+ /// </summary>
+ /// <param name="info"></param>
+ /// <param name="context"></param>
protected AgateGuiException(
System.Runtime.Serialization.SerializationInfo info,
System.Runtime.Serialization.StreamingContext context)
Modified: trunk/AgateLib/Gui/Button.cs
===================================================================
--- trunk/AgateLib/Gui/Button.cs 2009-12-01 07:06:38 UTC (rev 1135)
+++ trunk/AgateLib/Gui/Button.cs 2009-12-01 17:59:26 UTC (rev 1136)
@@ -1,4 +1,22 @@
-using System;
+// The contents of this file are subject to the Mozilla Public License
+// Version 1.1 (the "License"); you may not use this file except in
+// compliance with ...
[truncated message content] |
|
From: <ka...@us...> - 2009-12-02 16:43:01
|
Revision: 1138
http://agate.svn.sourceforge.net/agate/?rev=1138&view=rev
Author: kanato
Date: 2009-12-02 16:42:48 +0000 (Wed, 02 Dec 2009)
Log Message:
-----------
Add documentation.
Modified Paths:
--------------
trunk/AgateLib/AgateGame.cs
trunk/AgateLib/AgateSetup.cs
trunk/AgateLib/AppInitParameters.cs
trunk/AgateLib/BitmapFont/BitmapFontImpl.cs
trunk/AgateLib/DisplayLib/Display.cs
trunk/AgateLib/DisplayLib/DisplayWindow.cs
trunk/AgateLib/DisplayLib/FontSurface.cs
trunk/AgateLib/DisplayLib/FrameBuffer.cs
trunk/AgateLib/DisplayLib/RenderStateAdapter.cs
trunk/AgateLib/DisplayLib/Shaders/Implementation/ShaderCompiler.cs
trunk/AgateLib/DisplayLib/Shaders/Implementation/ShaderLanguage.cs
trunk/AgateLib/DisplayLib/Shaders/Implementation/Technique.cs
trunk/AgateLib/Geometry/Builders/Cube.cs
trunk/AgateLib/Geometry/Builders/Terrain.cs
trunk/AgateLib/Geometry/VertexTypes/PositionColor.cs
trunk/AgateLib/Geometry/VertexTypes/PositionTextureColor.cs
trunk/AgateLib/Geometry/VertexTypes/PositionTextureColorNormal.cs
trunk/AgateLib/Geometry/VertexTypes/PositionTextureNTB.cs
trunk/AgateLib/Geometry/VertexTypes/PositionTextureNormal.cs
trunk/AgateLib/Geometry/VertexTypes/PositionTextureNormalTangent.cs
trunk/AgateLib/Geometry/VertexTypes/VertexLayout.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/Cache/TextBoxCache.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryGuiRoot.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryTextBox.cs
trunk/AgateLib/ImplementationBase/DisplayImpl.cs
trunk/AgateLib/ImplementationBase/FrameBufferImpl.cs
trunk/AgateLib/ImplementationBase/IndexBufferImpl.cs
trunk/AgateLib/ImplementationBase/ShaderCompilerImpl.cs
trunk/AgateLib/ImplementationBase/VertexBufferImpl.cs
trunk/AgateLib/Particles/Particles/SpriteParticle.cs
trunk/AgateLib/Utility/ZipFileProvider.cs
trunk/Drivers/AgateDrawing/Drawing_FrameBuffer.cs
trunk/Drivers/AgateOTK/GL3/FrameBuffer.cs
trunk/Drivers/AgateOTK/Legacy/FrameBufferExt.cs
trunk/Drivers/AgateOTK/Legacy/FrameBufferReadPixels.cs
trunk/Drivers/AgateSDX/D3DDevice.cs
trunk/Drivers/AgateSDX/DrawBuffer.cs
trunk/Drivers/AgateSDX/FrameBufferSurface.cs
trunk/Drivers/AgateSDX/HlslCompiler.cs
trunk/Drivers/AgateSDX/HlslEffect.cs
trunk/Drivers/AgateSDX/SDX_Display.cs
trunk/Drivers/AgateSDX/SDX_Input.cs
trunk/Drivers/AgateSDX/SDX_Surface.cs
trunk/Drivers/AgateSDX/SDX_VertexBuffer.cs
trunk/Tests/AudioTests/AudioPlayer/frmAudioPlayer.cs
trunk/Tests/CoreTests/App.cs
trunk/Tests/CoreTests/Performance/Performance.cs
trunk/Tests/DisplayTests/MultipleWindows/MultipleWindowTest.cs
trunk/Tests/DisplayTests/ParticleTests/ParticleTests.cs
trunk/Tests/DisplayTests/ScreenCapture.cs
trunk/Tests/DisplayTests/SpriteTester/frmSpriteTester.cs
trunk/Tests/Fonts/Builtin.cs
trunk/Tests/Fonts/FontLineTester.cs
trunk/Tests/Fonts/Fonts.cs
Modified: trunk/AgateLib/AgateGame.cs
===================================================================
--- trunk/AgateLib/AgateGame.cs 2009-12-01 18:01:28 UTC (rev 1137)
+++ trunk/AgateLib/AgateGame.cs 2009-12-02 16:42:48 UTC (rev 1138)
@@ -99,7 +99,7 @@
if (GuiRoot != null)
GuiRoot.DoUpdate();
- Display.RenderTarget = mWindow;
+ Display.RenderTarget = mWindow.FrameBuffer;
Display.BeginFrame();
Render();
@@ -121,7 +121,7 @@
{
if (mInitParams == null)
{
- mInitParams = GetAppInitParameters();
+ mInitParams = new AppInitParameters();
AdjustAppInitParameters(ref mInitParams);
}
return mInitParams;
@@ -288,7 +288,7 @@
/// Gets the initialization parameters.
/// </summary>
/// <returns></returns>
- [Obsolete("Override AdjustAppInitParameters")]
+ [Obsolete("Override AdjustAppInitParameters", true)]
protected virtual AppInitParameters GetAppInitParameters()
{
return new AppInitParameters();
Modified: trunk/AgateLib/AgateSetup.cs
===================================================================
--- trunk/AgateLib/AgateSetup.cs 2009-12-01 18:01:28 UTC (rev 1137)
+++ trunk/AgateLib/AgateSetup.cs 2009-12-02 16:42:48 UTC (rev 1138)
@@ -170,8 +170,7 @@
/// Automatically selects the driver to use, or asks the user which
/// driver to use if appropriate.
/// </summary>
- [Obsolete("Use Initialize(bool, bool, bool) overload instead.")]
- public void InitializeDisplay()
+ private void InitializeDisplay()
{
DoAskUser();
InitializeDisplay(mSelectDisplay);
@@ -192,8 +191,7 @@
/// Initializes the Audio subsystem.
/// Automatically picks which driver to use.
/// </summary>
- [Obsolete("Use Initialize(bool, bool, bool) overload instead.")]
- public void InitializeAudio()
+ private void InitializeAudio()
{
DoAskUser();
InitializeAudio(mSelectAudio);
@@ -214,8 +212,7 @@
/// Initializes the Input subsystem.
/// Automatically picks which driver to use.
/// </summary>
- [Obsolete("Use Initialize(bool, bool, bool) overload instead.")]
- public void InitializeInput()
+ private void InitializeInput()
{
DoAskUser();
InitializeInput(mSelectInput);
Modified: trunk/AgateLib/AppInitParameters.cs
===================================================================
--- trunk/AgateLib/AppInitParameters.cs 2009-12-01 18:01:28 UTC (rev 1137)
+++ trunk/AgateLib/AppInitParameters.cs 2009-12-02 16:42:48 UTC (rev 1138)
@@ -6,8 +6,14 @@
namespace AgateLib
{
+ /// <summary>
+ /// Class which contains the parameters for initializing the application.
+ /// </summary>
public class AppInitParameters
{
+ /// <summary>
+ /// Constructs an AppInitParameters object.
+ /// </summary>
public AppInitParameters()
{
InitializeAudio = true;
@@ -16,16 +22,43 @@
ShowSplashScreen = true;
}
+ /// <summary>
+ /// Gets or sets a value indicating whether to show the splash screen on startup.
+ /// </summary>
public bool ShowSplashScreen { get; set; }
+ /// <summary>
+ /// Gets or sets a value indicating whether the main window should be user resizable.
+ /// </summary>
public bool AllowResize { get; set; }
+ /// <summary>
+ /// Gets or sets a file name which points to an icon file to use for the main window.
+ /// </summary>
public string IconFile { get; set; }
+ /// <summary>
+ /// Gets or sets a boolean value indicating whether to initialize the display or not.
+ /// </summary>
public bool InitializeDisplay { get; set; }
+ /// <summary>
+ /// Gets or sets a boolean value indicating whether to initialize the audio system or not.
+ /// </summary>
public bool InitializeAudio { get; set; }
+ /// <summary>
+ /// Gets or sets a boolean value indicating whether to initialize the joystick system or not.
+ /// </summary>
public bool InitializeJoysticks { get; set; }
+ /// <summary>
+ /// Gets or sets the preferred display driver.
+ /// </summary>
public Drivers.DisplayTypeID PreferredDisplay { get; set; }
+ /// <summary>
+ /// Gets or sets the preferred audio driver.
+ /// </summary>
public Drivers.AudioTypeID PreferredAudio { get; set; }
+ /// <summary>
+ /// Gets or sets the preferred input driver.
+ /// </summary>
public Drivers.InputTypeID PreferredInput { get; set; }
}
Modified: trunk/AgateLib/BitmapFont/BitmapFontImpl.cs
===================================================================
--- trunk/AgateLib/BitmapFont/BitmapFontImpl.cs 2009-12-01 18:01:28 UTC (rev 1137)
+++ trunk/AgateLib/BitmapFont/BitmapFontImpl.cs 2009-12-02 16:42:48 UTC (rev 1138)
@@ -82,8 +82,8 @@
/// Constructs a BitmapFontImpl, assuming the characters in the given file
/// are all the same size, and are in their ASCII order.
/// </summary>
- /// <param name="filename"></param>
- /// <param name="characterSize"></param>
+ /// <param name="filename">Path to the file which contains the image data for the font glyphs.</param>
+ /// <param name="characterSize">Size of each character in the image.</param>
public BitmapFontImpl(string filename, Size characterSize)
{
FontName = System.IO.Path.GetFileNameWithoutExtension(filename);
@@ -102,6 +102,7 @@
/// <param name="surface">Surface which contains the image data for the font glyphs.</param>
/// <param name="fontMetrics">FontMetrics structure which describes how characters
/// are laid out.</param>
+ /// <param name="name">The name of the font.</param>
public BitmapFontImpl(Surface surface, FontMetrics fontMetrics, string name)
{
FontName = name;
Modified: trunk/AgateLib/DisplayLib/Display.cs
===================================================================
--- trunk/AgateLib/DisplayLib/Display.cs 2009-12-01 18:01:28 UTC (rev 1137)
+++ trunk/AgateLib/DisplayLib/Display.cs 2009-12-02 16:42:48 UTC (rev 1138)
@@ -106,6 +106,7 @@
get { return mRenderState; }
}
+ [Obsolete]
private static ShaderCompilerImpl CreateShaderCompiler()
{
return impl.CreateShaderCompiler();
Modified: trunk/AgateLib/DisplayLib/DisplayWindow.cs
===================================================================
--- trunk/AgateLib/DisplayLib/DisplayWindow.cs 2009-12-01 18:01:28 UTC (rev 1137)
+++ trunk/AgateLib/DisplayLib/DisplayWindow.cs 2009-12-02 16:42:48 UTC (rev 1138)
@@ -69,7 +69,7 @@
impl = Display.Impl.CreateDisplayWindow(par);
}
- Display.RenderTarget = this;
+ Display.RenderTarget = FrameBuffer;
Display.DisposeDisplay += new Display.DisposeDisplayHandler(Dispose);
}
/// <summary>
Modified: trunk/AgateLib/DisplayLib/FontSurface.cs
===================================================================
--- trunk/AgateLib/DisplayLib/FontSurface.cs 2009-12-01 18:01:28 UTC (rev 1137)
+++ trunk/AgateLib/DisplayLib/FontSurface.cs 2009-12-02 16:42:48 UTC (rev 1138)
@@ -305,7 +305,7 @@
/// </summary>
/// <param name="text"></param>
/// <returns></returns>
- [Obsolete]
+ [Obsolete("Use MeasureString instead.", true)]
public Size StringDisplaySize(string text)
{
return impl.MeasureString(mState, text);
Modified: trunk/AgateLib/DisplayLib/FrameBuffer.cs
===================================================================
--- trunk/AgateLib/DisplayLib/FrameBuffer.cs 2009-12-01 18:01:28 UTC (rev 1137)
+++ trunk/AgateLib/DisplayLib/FrameBuffer.cs 2009-12-02 16:42:48 UTC (rev 1138)
@@ -7,72 +7,111 @@
namespace AgateLib.DisplayLib
{
+ /// <summary>
+ /// Class which represents a render target. This can either be a render target for
+ /// an area on screen with an associated DisplayWindow object,
+ /// or a render target in memory which can be used as a Surface object
+ /// after rendering to it. For the most part, FrameBuffers which are associated with
+ /// a DisplayWindow cannot be used as Surfaces.
+ /// </summary>
public class FrameBuffer : IDisposable
{
FrameBufferImpl impl;
+ Surface mRenderTarget;
+ /// <summary>
+ /// Constructs a frame buffer to be used as a render target. FrameBuffers constructed
+ /// with this constructor can be used as surfaces after drawing to them is complete.
+ /// </summary>
+ /// <param name="size"></param>
public FrameBuffer(Size size)
{
impl = Display.Impl.CreateFrameBuffer(size);
}
+ /// <summary>
+ /// Constructs a frame buffer to be used as a render target. FrameBuffers constructed
+ /// with this constructor can be used as surfaces after drawing to them is complete.
+ /// </summary>
+ /// <param name="width"></param>
+ /// <param name="height"></param>
public FrameBuffer(int width, int height)
: this(new Size(width, height))
{ }
- public FrameBuffer(FrameBufferImpl impl)
+ /// <summary>
+ /// Constructs a FrameBuffer from a FrameBufferImpl object. Application code
+ /// should not need to use this constructor ever.
+ /// </summary>
+ /// <param name="impl"></param>
+ internal FrameBuffer(FrameBufferImpl impl)
{
this.impl = impl;
}
-
+ /// <summary>
+ /// Disposes of unmanaged resources.
+ /// </summary>
public void Dispose()
{
impl.Dispose();
}
+ /// <summary>
+ /// Gets the implementation object of the FrameBuffer.
+ /// </summary>
public FrameBufferImpl Impl
{
get { return impl; }
}
+ /// <summary>
+ /// Size in pixels of the render target.
+ /// </summary>
public Size Size
{
get { return Impl.Size; }
}
- public int Height
- {
- get { return Impl.Height; }
- }
+ /// <summary>
+ /// Width in pixels of the render target.
+ /// </summary>
public int Width
{
get { return Impl.Width; }
}
-
- public void BeginRender()
+ /// <summary>
+ /// Height in pixels of the render target.
+ /// </summary>
+ public int Height
{
+ get { return Impl.Height; }
}
- public void EndRender()
- { }
- public bool CanAccessBackBuffer
+ /// <summary>
+ /// Returns true if the RenderTarget property is readable, and this surface that is
+ /// rendered to can be used to draw from.
+ /// </summary>
+ public bool CanAccessRenderTarget
{
- get { return Impl.CanAccessBackBuffer; }
+ get { return Impl.CanAccessRenderTarget; }
}
- Surface mBackBuffer;
-
- public Surface BackBuffer
+ /// <summary>
+ /// Gets the Surface object that was rendered to, if it is available.
+ /// If the CanAccessRenderTarget property is false, then this will throw
+ /// an exception.
+ /// </summary>
+ public Surface RenderTarget
{
get
{
- if (mBackBuffer != null && mBackBuffer.Impl != Impl.BackBuffer)
+ if (mRenderTarget != null && mRenderTarget.Impl != Impl.RenderTarget)
{
- mBackBuffer.Dispose();
- mBackBuffer = null;
+ mRenderTarget.Dispose();
+ mRenderTarget = null;
}
- if (mBackBuffer == null)
- mBackBuffer = new Surface(Impl.BackBuffer);
+ if (mRenderTarget == null)
+ mRenderTarget = new Surface(Impl.RenderTarget);
- return mBackBuffer;
+ return mRenderTarget;
}
}
}
Modified: trunk/AgateLib/DisplayLib/RenderStateAdapter.cs
===================================================================
--- trunk/AgateLib/DisplayLib/RenderStateAdapter.cs 2009-12-01 18:01:28 UTC (rev 1137)
+++ trunk/AgateLib/DisplayLib/RenderStateAdapter.cs 2009-12-02 16:42:48 UTC (rev 1138)
@@ -5,6 +5,9 @@
namespace AgateLib.DisplayLib
{
+ /// <summary>
+ /// Class which gets or sets render states for the Display.
+ /// </summary>
public sealed class RenderStateAdapter
{
void CheckDisplayInitialized()
@@ -13,6 +16,9 @@
throw new AgateException("Display has not been initialized.");
}
+ /// <summary>
+ /// Gets or sets whether the vertical blank should be waited for on each frame.
+ /// </summary>
public bool WaitForVerticalBlank
{
get
@@ -26,7 +32,9 @@
Display.Impl.SetRenderState(RenderStateBool.WaitForVerticalBlank, value);
}
}
-
+ /// <summary>
+ /// Gets or sets whether alpha blending is enabled.
+ /// </summary>
public bool AlphaBlend
{
get
@@ -40,7 +48,9 @@
Display.Impl.SetRenderState(RenderStateBool.AlphaBlend, value);
}
}
-
+ /// <summary>
+ /// Gets or sets whether to test the z-buffer when writing pixels, if it is available.
+ /// </summary>
public bool ZBufferTest
{
get
@@ -54,6 +64,9 @@
Display.Impl.SetRenderState(RenderStateBool.ZBufferTest, value);
}
}
+ /// <summary>
+ /// Gets or sets whether to write to the z-buffer when writing pixels, if it is available.
+ /// </summary>
public bool ZBufferWrite
{
get
@@ -67,6 +80,9 @@
Display.Impl.SetRenderState(RenderStateBool.ZBufferWrite, value);
}
}
+ /// <summary>
+ /// Gets or sets whether to test the stencil buffer when writing pixels.
+ /// </summary>
public bool StencilBufferTest
{
get
@@ -82,15 +98,30 @@
}
}
+ /// <summary>
+ /// Enum describing boolean render state values.
+ /// </summary>
public enum RenderStateBool
{
+ /// <summary>
+ /// VSync
+ /// </summary>
WaitForVerticalBlank,
-
+ /// <summary>
+ /// Alpha blending
+ /// </summary>
AlphaBlend,
-
+ /// <summary>
+ /// Z Buffer Testing
+ /// </summary>
ZBufferTest,
+ /// <summary>
+ /// Z buffer writing
+ /// </summary>
ZBufferWrite,
-
+ /// <summary>
+ /// Stencil buffer testing
+ /// </summary>
StencilBufferTest,
}
}
Modified: trunk/AgateLib/DisplayLib/Shaders/Implementation/ShaderCompiler.cs
===================================================================
--- trunk/AgateLib/DisplayLib/Shaders/Implementation/ShaderCompiler.cs 2009-12-01 18:01:28 UTC (rev 1137)
+++ trunk/AgateLib/DisplayLib/Shaders/Implementation/ShaderCompiler.cs 2009-12-02 16:42:48 UTC (rev 1138)
@@ -24,6 +24,7 @@
namespace AgateLib.DisplayLib.Shaders
{
+ [Obsolete]
public static class ShaderCompiler
{
static ShaderCompilerImpl impl;
Modified: trunk/AgateLib/DisplayLib/Shaders/Implementation/ShaderLanguage.cs
===================================================================
--- trunk/AgateLib/DisplayLib/Shaders/Implementation/ShaderLanguage.cs 2009-12-01 18:01:28 UTC (rev 1137)
+++ trunk/AgateLib/DisplayLib/Shaders/Implementation/ShaderLanguage.cs 2009-12-02 16:42:48 UTC (rev 1138)
@@ -23,11 +23,23 @@
namespace AgateLib.DisplayLib.Shaders
{
+ /// <summary>
+ /// Enum indicating an industry standard shading language.
+ /// </summary>
public enum ShaderLanguage
{
+ /// <summary>
+ /// No shading language is used.
+ /// </summary>
None,
+ /// <summary>
+ /// OpenGL's GLSL language.
+ /// </summary>
Glsl,
+ /// <summary>
+ /// Direct3D's HLSL language.
+ /// </summary>
Hlsl,
// Cg,
Modified: trunk/AgateLib/DisplayLib/Shaders/Implementation/Technique.cs
===================================================================
--- trunk/AgateLib/DisplayLib/Shaders/Implementation/Technique.cs 2009-12-01 18:01:28 UTC (rev 1137)
+++ trunk/AgateLib/DisplayLib/Shaders/Implementation/Technique.cs 2009-12-02 16:42:48 UTC (rev 1138)
@@ -23,6 +23,10 @@
namespace AgateLib.DisplayLib.Shaders
{
+ /// <summary>
+ ///
+ /// </summary>
+ [Obsolete]
public class Technique
{
}
Modified: trunk/AgateLib/Geometry/Builders/Cube.cs
===================================================================
--- trunk/AgateLib/Geometry/Builders/Cube.cs 2009-12-01 18:01:28 UTC (rev 1137)
+++ trunk/AgateLib/Geometry/Builders/Cube.cs 2009-12-02 16:42:48 UTC (rev 1138)
@@ -6,27 +6,46 @@
namespace AgateLib.Geometry.Builders
{
+ /// <summary>
+ /// Constructs a cube.
+ /// </summary>
public class CubeBuilder
{
VertexBuffer mVertices = null;
IndexBuffer mIndices = null;
+ /// <summary>
+ /// Constructs a cube builder.
+ /// </summary>
public CubeBuilder()
{
Length = 1;
VertexType = VertexTypes.PositionTextureNTB.VertexLayout;
}
+ /// <summary>
+ /// Gets the created vertex buffer.
+ /// </summary>
public VertexBuffer VertexBuffer
{
get { return mVertices; }
}
+ /// <summary>
+ /// Gets the created index buffer.
+ /// </summary>
public IndexBuffer IndexBuffer
{
get { return mIndices; }
}
+ /// <summary>
+ /// Length of the cube.
+ /// </summary>
public float Length { get; set; }
+
+ /// <summary>
+ /// Position of the center of the cube.
+ /// </summary>
public Vector3 Location { get; set; }
bool GenerateTextureCoords
@@ -46,8 +65,13 @@
get { return VertexType.ContainsElement(VertexElement.Bitangent); }
}
+ /// <summary>
+ /// Vertex type to use when generating the cube.
+ /// </summary>
public VertexLayout VertexType { get; set; }
-
+ /// <summary>
+ /// Creates the vertex buffer and index buffer using the settings of the CubeBuilder.
+ /// </summary>
public void CreateVertexBuffer()
{
PositionTextureNTB[] vertices = new PositionTextureNTB[24];
Modified: trunk/AgateLib/Geometry/Builders/Terrain.cs
===================================================================
--- trunk/AgateLib/Geometry/Builders/Terrain.cs 2009-12-01 18:01:28 UTC (rev 1137)
+++ trunk/AgateLib/Geometry/Builders/Terrain.cs 2009-12-02 16:42:48 UTC (rev 1138)
@@ -7,10 +7,17 @@
namespace AgateLib.Geometry.Builders
{
+ /// <summary>
+ /// Constructs a terrain from a pixel buffer.
+ /// </summary>
public class HeightMapTerrain
{
PixelBuffer pixels;
+ /// <summary>
+ /// Construts a height map from a pixel buffer.
+ /// </summary>
+ /// <param name="pixels"></param>
public HeightMapTerrain(PixelBuffer pixels)
{
this.pixels = pixels.Clone();
@@ -47,8 +54,15 @@
/// </summary>
public float MaxPeak { get; set; }
+ /// <summary>
+ /// Type of vertex used.
+ /// </summary>
public VertexLayout VertexType { get; set; }
+ /// <summary>
+ /// Create the vertex buffer.
+ /// </summary>
+ /// <returns></returns>
public VertexBuffer CreateVertexBuffer()
{
Vector3[] vertices = new Vector3[pixels.Width * pixels.Height];
Modified: trunk/AgateLib/Geometry/VertexTypes/PositionColor.cs
===================================================================
--- trunk/AgateLib/Geometry/VertexTypes/PositionColor.cs 2009-12-01 18:01:28 UTC (rev 1137)
+++ trunk/AgateLib/Geometry/VertexTypes/PositionColor.cs 2009-12-02 16:42:48 UTC (rev 1138)
@@ -6,22 +6,47 @@
namespace AgateLib.Geometry.VertexTypes
{
+ /// <summary>
+ /// Vertex layout which only contains position and color information.
+ /// </summary>
[StructLayout(LayoutKind.Sequential)]
public struct PositionColor
{
+ /// <summary>
+ /// Vertex position
+ /// </summary>
public Vector3 Position;
+ /// <summary>
+ /// Vertex color
+ /// </summary>
public int Color;
+ /// <summary>
+ /// Constructs vertex.
+ /// </summary>
+ /// <param name="x"></param>
+ /// <param name="y"></param>
+ /// <param name="z"></param>
+ /// <param name="color"></param>
public PositionColor(float x, float y, float z, Color color)
: this(x, y, z, color.ToArgb())
{ }
+ /// <summary>
+ /// Constructs vertex.
+ /// </summary>
+ /// <param name="x"></param>
+ /// <param name="y"></param>
+ /// <param name="z"></param>
+ /// <param name="color"></param>
public PositionColor(float x, float y, float z, int color)
{
Position = new Vector3(x, y, z);
this.Color = color;
}
-
+ /// <summary>
+ /// Layout for the PositionColor vertex type.
+ /// </summary>
public static VertexLayout VertexLayout
{
get
Modified: trunk/AgateLib/Geometry/VertexTypes/PositionTextureColor.cs
===================================================================
--- trunk/AgateLib/Geometry/VertexTypes/PositionTextureColor.cs 2009-12-01 18:01:28 UTC (rev 1137)
+++ trunk/AgateLib/Geometry/VertexTypes/PositionTextureColor.cs 2009-12-02 16:42:48 UTC (rev 1138)
@@ -6,16 +6,46 @@
namespace AgateLib.Geometry.VertexTypes
{
+ /// <summary>
+ /// Vertex structure with position, texture and color values
+ /// </summary>
[StructLayout(LayoutKind.Sequential)]
public struct PositionTextureColor
{
+ /// <summary>
+ /// Position of vertex.
+ /// </summary>
public Vector3 Position;
+ /// <summary>
+ /// Texture coordinates of vertex.
+ /// </summary>
public Vector2 TexCoord;
+ /// <summary>
+ /// Color value of vertex.
+ /// </summary>
public int Color;
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="x"></param>
+ /// <param name="y"></param>
+ /// <param name="z"></param>
+ /// <param name="color"></param>
+ /// <param name="tu"></param>
+ /// <param name="tv"></param>
public PositionTextureColor(float x, float y, float z, Color color, float tu, float tv)
: this(x, y, z, color.ToArgb(), tu, tv)
{ }
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="x"></param>
+ /// <param name="y"></param>
+ /// <param name="z"></param>
+ /// <param name="color"></param>
+ /// <param name="tu"></param>
+ /// <param name="tv"></param>
public PositionTextureColor(float x, float y, float z, int color, float tu, float tv)
{
Position = new Vector3(x, y, z);
@@ -23,16 +53,32 @@
this.Color = color;
}
+ /// <summary>
+ /// X Position
+ /// </summary>
public float X { get { return Position.X; } set { Position.X = value; } }
+ /// <summary>
+ /// Y Position
+ /// </summary>
public float Y { get { return Position.Y; } set { Position.Y = value; } }
+ /// <summary>
+ /// Z Position
+ /// </summary>
public float Z { get { return Position.Z; } set { Position.Z = value; } }
+ /// <summary>
+ /// ToString debugging information.
+ /// </summary>
+ /// <returns></returns>
public override string ToString()
{
return string.Format("X: {0} Y: {1} Z: {2} Color: {3} Tu: {4}, Tv: {5}",
Position.X, Position.Y, Position.Z, Color, TexCoord.X, TexCoord.Y);
}
+ /// <summary>
+ /// Gets the vertex layout for PositionTextureColor.
+ /// </summary>
public static VertexLayout VertexLayout
{
get
Modified: trunk/AgateLib/Geometry/VertexTypes/PositionTextureColorNormal.cs
===================================================================
--- trunk/AgateLib/Geometry/VertexTypes/PositionTextureColorNormal.cs 2009-12-01 18:01:28 UTC (rev 1137)
+++ trunk/AgateLib/Geometry/VertexTypes/PositionTextureColorNormal.cs 2009-12-02 16:42:48 UTC (rev 1138)
@@ -5,39 +5,91 @@
using System.Text;
namespace AgateLib.Geometry.VertexTypes
-{
+{
+ /// <summary>
+ /// Vertex structure with position, texture and normal values.
+ /// </summary>
[StructLayout(LayoutKind.Sequential)]
public struct PositionTextureColorNormal
{
+ /// <summary>
+ /// Position
+ /// </summary>
public Vector3 Position;
- public Vector2 TexCoord;
+ /// <summary>
+ /// Texture coordinates
+ /// </summary>
+ public Vector2 Texture;
+ /// <summary>
+ /// Color value.
+ /// </summary>
public int Color;
+ /// <summary>
+ /// Normal value
+ /// </summary>
public Vector3 Normal;
+ /// <summary>
+ /// Constructor
+ /// </summary>
+ /// <param name="x"></param>
+ /// <param name="y"></param>
+ /// <param name="z"></param>
+ /// <param name="color"></param>
+ /// <param name="tu"></param>
+ /// <param name="tv"></param>
+ /// <param name="nx"></param>
+ /// <param name="ny"></param>
+ /// <param name="nz"></param>
public PositionTextureColorNormal(float x, float y, float z, Color color, float tu, float tv, float nx, float ny, float nz)
: this(x, y, z, color.ToArgb(), tu, tv, nx, ny, nz)
{ }
+ /// <summary>
+ /// Constructor
+ /// </summary>
public PositionTextureColorNormal(float x, float y, float z, int color, float tu, float tv, float nx, float ny, float nz)
{
Position = new Vector3(x, y, z);
- TexCoord = new Vector2(tu, tv);
+ Texture = new Vector2(tu, tv);
this.Color = color;
Normal = new Vector3(nx, ny, nz);
}
+ /// <summary>
+ /// X position
+ /// </summary>
public float X { get { return Position.X; } set { Position.X = value; } }
+ /// <summary>
+ /// Y position
+ /// </summary>
public float Y { get { return Position.Y; } set { Position.Y = value; } }
+ /// <summary>
+ /// Z position
+ /// </summary>
public float Z { get { return Position.Z; } set { Position.Z = value; } }
- public float U { get { return TexCoord.X; } set { TexCoord.X = value; } }
- public float V { get { return TexCoord.Y; } set { TexCoord.Y = value; } }
+ /// <summary>
+ /// Texture coordinate u
+ /// </summary>
+ public float U { get { return Texture.X; } set { Texture.X = value; } }
+ /// <summary>
+ /// Texture coordinate v
+ /// </summary>
+ public float V { get { return Texture.Y; } set { Texture.Y = value; } }
+ /// <summary>
+ /// ToString debugging information.
+ /// </summary>
+ /// <returns></returns>
public override string ToString()
{
return string.Format("X: {0} Y: {1} Z: {2} Color: {3} Tu: {4}, Tv: {5} Nx: {6} Ny: {7} Nz: {8}",
- Position.X, Position.Y, Position.Z, Color, TexCoord.X, TexCoord.Y, Normal.X, Normal.Y, Normal.Z);
+ Position.X, Position.Y, Position.Z, Color, Texture.X, Texture.Y, Normal.X, Normal.Y, Normal.Z);
}
+ /// <summary>
+ /// Vertex Layout for PositionTextureColorNormal.
+ /// </summary>
public static VertexLayout VertexLayout
{
get
Modified: trunk/AgateLib/Geometry/VertexTypes/PositionTextureNTB.cs
===================================================================
--- trunk/AgateLib/Geometry/VertexTypes/PositionTextureNTB.cs 2009-12-01 18:01:28 UTC (rev 1137)
+++ trunk/AgateLib/Geometry/VertexTypes/PositionTextureNTB.cs 2009-12-02 16:42:48 UTC (rev 1138)
@@ -6,15 +6,36 @@
namespace AgateLib.Geometry.VertexTypes
{
+ /// <summary>
+ /// Vertex structure with position, texture coordinates, normal, tangent, bitangent.
+ /// </summary>
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct PositionTextureNTB
{
+ /// <summary>
+ ///
+ /// </summary>
public Vector3 Position;
+ /// <summary>
+ ///
+ /// </summary>
public Vector2 Texture;
+ /// <summary>
+ ///
+ /// </summary>
public Vector3 Normal;
+ /// <summary>
+ ///
+ /// </summary>
public Vector3 Tangent;
+ /// <summary>
+ ///
+ /// </summary>
public Vector3 Bitangent;
+ /// <summary>
+ ///
+ /// </summary>
public static VertexLayout VertexLayout
{
get
Modified: trunk/AgateLib/Geometry/VertexTypes/PositionTextureNormal.cs
===================================================================
--- trunk/AgateLib/Geometry/VertexTypes/PositionTextureNormal.cs 2009-12-01 18:01:28 UTC (rev 1137)
+++ trunk/AgateLib/Geometry/VertexTypes/PositionTextureNormal.cs 2009-12-02 16:42:48 UTC (rev 1138)
@@ -6,13 +6,28 @@
namespace AgateLib.Geometry.VertexTypes
{
+ /// <summary>
+ /// Vertex structure with position, texture and normal values.
+ /// </summary>
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct PositionTextureNormal
{
+ /// <summary>
+ /// Position
+ /// </summary>
public Vector3 Position;
+ /// <summary>
+ /// Texture coordinates
+ /// </summary>
public Vector2 Texture;
+ /// <summary>
+ /// Normal value
+ /// </summary>
public Vector3 Normal;
+ /// <summary>
+ /// Vertex layout for PositionTextureNormal structure.
+ /// </summary>
public static VertexLayout VertexLayout
{
get
Modified: trunk/AgateLib...
[truncated message content] |
|
From: <ka...@us...> - 2009-12-06 02:11:15
|
Revision: 1144
http://agate.svn.sourceforge.net/agate/?rev=1144&view=rev
Author: kanato
Date: 2009-12-06 02:11:06 +0000 (Sun, 06 Dec 2009)
Log Message:
-----------
Implement Windows-specific font rasterization for kerning support.
Replace Andika and Gentium with Bitstream Vera-derived fonts.
Modified Paths:
--------------
trunk/AgateLib/AgateGame.cs
trunk/AgateLib/BitmapFont/BitmapFontImpl.cs
trunk/AgateLib/BitmapFont/FontMetrics.cs
trunk/AgateLib/BitmapFont/GlyphMetrics.cs
trunk/AgateLib/DisplayLib/FontSurface.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/Mercury.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryScheme.cs
trunk/AgateLib/InternalResources/Data.cs
trunk/AgateLib/InternalResources/Fonts.zip
trunk/AgateLib/Resources/AgateResourceLoader.cs
trunk/AgateLib/Resources/BitmapFontResource.cs
trunk/Drivers/AgateLib.WinForms/AgateLib.WinForms.csproj
trunk/Drivers/AgateLib.WinForms/BitmapFontUtil.cs
trunk/Tests/Fonts/Builtin.cs
trunk/Tests/GuiTests/RenderGui.cs
trunk/Tests/Tests.csproj
trunk/Tools/FontCreator/CreateFont.cs
trunk/Tools/FontCreator/EditGlyphs.Designer.cs
trunk/Tools/FontCreator/EditGlyphs.cs
trunk/Tools/FontCreator/EditGlyphs.resx
trunk/Tools/FontCreator/FontCreator.csproj
trunk/Tools/FontCreator/Properties/Resources.Designer.cs
trunk/Tools/FontCreator/Properties/Resources.resx
trunk/Tools/FontCreator/SaveFont.Designer.cs
trunk/Tools/FontCreator/SaveFont.cs
trunk/Tools/FontCreator/SaveFont.resx
trunk/Tools/FontCreator/frmFontCreator.cs
Added Paths:
-----------
trunk/Drivers/AgateLib.WinForms/BitmapFontUtilRenderers.cs
trunk/Tests/Fonts/Kerning.cs
trunk/Tools/FontCreator/Resources/zoom_in.png
trunk/Tools/FontCreator/Resources/zoom_out.png
Removed Paths:
-------------
trunk/Drivers/AgateLib.WinForms/GdiFontExtensions.cs
Modified: trunk/AgateLib/AgateGame.cs
===================================================================
--- trunk/AgateLib/AgateGame.cs 2009-12-05 21:21:08 UTC (rev 1143)
+++ trunk/AgateLib/AgateGame.cs 2009-12-06 02:11:06 UTC (rev 1144)
@@ -83,7 +83,7 @@
CreateDisplayWindow();
- font = FontSurface.Gentium12;
+ font = FontSurface.AgateSans14;
if (InitParams.ShowSplashScreen)
{
Modified: trunk/AgateLib/BitmapFont/BitmapFontImpl.cs
===================================================================
--- trunk/AgateLib/BitmapFont/BitmapFontImpl.cs 2009-12-05 21:21:08 UTC (rev 1143)
+++ trunk/AgateLib/BitmapFont/BitmapFontImpl.cs 2009-12-06 02:11:06 UTC (rev 1144)
@@ -286,6 +286,15 @@
destX += destRects[rectCount].Width - glyph.RightOverhang * ScaleWidth;
+ // check for kerning
+ if (i < text.Length - 1)
+ {
+ if (glyph.KerningPairs.ContainsKey(text[i + 1]))
+ {
+ destX += glyph.KerningPairs[text[i + 1]] * ScaleWidth;
+ }
+ }
+
rectCount++;
break;
}
@@ -328,34 +337,33 @@
private void RefreshCache(FontState state, BitmapFontCache cache)
{
+ if (cache.NeedsRefresh == false)
+ return;
- if (cache.NeedsRefresh)
- {
- // this variable counts the number of rectangles actually used to display text.
- // It may be less then text.Length because carriage return characters
- // don't need any rects.
- GetRects(cache.SrcRects, cache.DestRects, out cache.DisplayTextLength,
- state.TransformedText, state.ScaleHeight, state.ScaleWidth);
+ // this variable counts the number of rectangles actually used to display text.
+ // It may be less then text.Length because carriage return characters
+ // don't need any rects.
+ GetRects(cache.SrcRects, cache.DestRects, out cache.DisplayTextLength,
+ state.TransformedText, state.ScaleHeight, state.ScaleWidth);
- PointF dest = state.Location;
+ PointF dest = state.Location;
- if (state.DisplayAlignment != OriginAlignment.TopLeft)
- {
- Point value = Origin.Calc(state.DisplayAlignment,
- MeasureString(state, state.Text));
+ if (state.DisplayAlignment != OriginAlignment.TopLeft)
+ {
+ Point value = Origin.Calc(state.DisplayAlignment,
+ MeasureString(state, state.Text));
- dest.X -= value.X;
- dest.Y -= value.Y;
- }
+ dest.X -= value.X;
+ dest.Y -= value.Y;
+ }
- for (int i = 0; i < cache.DisplayTextLength; i++)
- {
- cache.DestRects[i].X += dest.X;
- cache.DestRects[i].Y += dest.Y;
- }
+ for (int i = 0; i < cache.DisplayTextLength; i++)
+ {
+ cache.DestRects[i].X += dest.X;
+ cache.DestRects[i].Y += dest.Y;
+ }
- cache.NeedsRefresh = false;
- }
+ cache.NeedsRefresh = false;
}
}
Modified: trunk/AgateLib/BitmapFont/FontMetrics.cs
===================================================================
--- trunk/AgateLib/BitmapFont/FontMetrics.cs 2009-12-05 21:21:08 UTC (rev 1143)
+++ trunk/AgateLib/BitmapFont/FontMetrics.cs 2009-12-06 02:11:06 UTC (rev 1144)
@@ -190,50 +190,6 @@
}
#endregion
-
- private void ReadGlyphs030(XmlNode rootNode)
- {
- foreach (XmlNode node in rootNode.ChildNodes)
- {
- GlyphMetrics glyph = new GlyphMetrics();
-
- char key = (char)int.Parse(node.Attributes["Char"].Value);
- glyph.SourceRect = Rectangle.Parse(node.Attributes["Source"].Value);
-
- glyph.LeftOverhang = GetAttributeInt32(node, "LeftOverhang");
- glyph.RightOverhang = GetAttributeInt32(node, "RightOverhang");
-
- mGlyphs.Add(key, glyph);
- }
- }
-
- private int GetAttributeInt32(XmlNode node, string p)
- {
- if (node[p] == null)
- return 0;
-
- return int.Parse(node[p].Value);
- }
-
- private static void AddAttribute(XmlDocument doc, XmlNode current, string name, int value)
- {
- XmlAttribute att = doc.CreateAttribute(name);
- att.Value = value.ToString();
- current.Attributes.Append(att);
- }
- private static void AddAttribute(XmlDocument doc, XmlNode current, string name, Rectangle value)
- {
- XmlAttribute att = doc.CreateAttribute(name);
- att.Value = value.ToString();
- current.Attributes.Append(att);
- }
- private static void AddAttribute(XmlDocument doc, XmlNode current, string name, char value)
- {
- XmlAttribute att = doc.CreateAttribute(name);
- att.Value = ((int)value).ToString();
- current.Attributes.Append(att);
- }
-
#region ICloneable Members
object ICloneable.Clone()
Modified: trunk/AgateLib/BitmapFont/GlyphMetrics.cs
===================================================================
--- trunk/AgateLib/BitmapFont/GlyphMetrics.cs 2009-12-05 21:21:08 UTC (rev 1143)
+++ trunk/AgateLib/BitmapFont/GlyphMetrics.cs 2009-12-06 02:11:06 UTC (rev 1144)
@@ -104,6 +104,14 @@
}
/// <summary>
+ /// Gets the number of pixels the drawing position is advanced when this glyph is drawn.
+ /// </summary>
+ public int LayoutWidth
+ {
+ get { return mSourceRect.Width - LeftOverhang - RightOverhang; }
+ }
+
+ /// <summary>
/// A dictionary of characters which need kerning when paired with this glyph.
/// </summary>
public Dictionary<char, int> KerningPairs
Modified: trunk/AgateLib/DisplayLib/FontSurface.cs
===================================================================
--- trunk/AgateLib/DisplayLib/FontSurface.cs 2009-12-05 21:21:08 UTC (rev 1143)
+++ trunk/AgateLib/DisplayLib/FontSurface.cs 2009-12-06 02:11:06 UTC (rev 1144)
@@ -151,6 +151,16 @@
}
/// <summary>
+ /// Initializes a FontSurface object with a given implementation object.
+ /// </summary>
+ /// <param name="implToUse"></param>
+ /// <returns></returns>
+ public static FontSurface FromImpl(FontSurfaceImpl implToUse)
+ {
+ return new FontSurface(implToUse);
+ }
+
+ /// <summary>
/// Returns the implementation object.
/// </summary>
public FontSurfaceImpl Impl
@@ -605,91 +615,61 @@
#region --- Built-in Fonts ---
/// <summary>
- /// This sans serif bitmap font was generated from Andika at 9 points.
+ /// The default AgateLib sans serif font at 10 points.
/// </summary>
/// <remarks>
- /// Andika is Copyright (c) 2004-2008, SIL International and
- /// distributed under the Open Font License.
- /// http://scripts.sil.org/OFL
+ /// AgateSans was rasterized from Bitstream Vera Sans.
/// </remarks>
- public static FontSurface Andika09
+ public static FontSurface AgateSans10
{
- get { return InternalResources.Data.Andika09; }
+ get { return InternalResources.Data.AgateSans10; }
}
+
/// <summary>
- /// This sans serif bitmap font was generated from Andika at 10 points.
+ /// The default AgateLib sans serif font at 14 points.
/// </summary>
/// <remarks>
- /// Andika is Copyright (c) 2004-2008, SIL International and
- /// distributed under the Open Font License.
- /// http://scripts.sil.org/OFL
+ /// AgateSans was rasterized from Bitstream Vera Sans.
/// </remarks>
- public static FontSurface Andika10
+ public static FontSurface AgateSans14
{
- get { return InternalResources.Data.Andika10; }
+ get { return InternalResources.Data.AgateSans14; }
}
+
/// <summary>
- /// This sans serif bitmap font was generated from Andika at 12 points.
+ /// The default AgateLib serif font at 10 points.
/// </summary>
/// <remarks>
- /// Andika is Copyright (c) 2004-2008, SIL International and
- /// distributed under the Open Font License.
- /// http://scripts.sil.org/OFL
+ /// AgateSans was rasterized from Bitstream Vera Serif.
/// </remarks>
- public static FontSurface Andika12
+ public static FontSurface AgateSerif10
{
- get { return InternalResources.Data.Andika12; }
+ get { return InternalResources.Data.AgateSerif10; }
}
+
/// <summary>
- /// This sans serif bitmap font was generated from Andika at 14 points.
+ /// The default AgateLib serif font at 14 points.
/// </summary>
/// <remarks>
- /// Andika is Copyright (c) 2004-2008, SIL International and
- /// distributed under the Open Font License.
- /// http://scripts.sil.org/OFL
+ /// AgateSans was rasterized from Bitstream Vera Serif.
/// </remarks>
- public static FontSurface Andika14
+ public static FontSurface AgateSerif14
{
- get { return InternalResources.Data.Andika14; }
+ get { return InternalResources.Data.AgateSerif14; }
}
/// <summary>
- /// This serif bitmap font was generated from Gentium at 10 points.
+ /// The default AgateLib monospace font at 10 points.
/// </summary>
/// <remarks>
- /// Gentium is Copyright (c) 2004-2008, SIL International and
- /// distributed under the Open Font License.
- /// http://scripts.sil.org/OFL
+ /// AgateSans was rasterized from Bitstream Vera Sans Mono.
/// </remarks>
- public static FontSurface Gentium10
+ public static FontSurface AgateMono10
{
- get { return InternalResources.Data.Gentium10; }
+ get { return InternalResources.Data.AgateMono10; }
}
- /// <summary>
- /// This serif bitmap font was generated from Gentium at 12 points.
- /// </summary>
- /// <remarks>
- /// Gentium is Copyright (c) 2004-2008, SIL International and
- /// distributed under the Open Font License.
- /// http://scripts.sil.org/OFL
- /// </remarks>
- public static FontSurface Gentium12
- {
- get { return InternalResources.Data.Gentium12; }
- }
- /// <summary>
- /// This serif bitmap font was generated from Gentium at 14 points.
- /// </summary>
- /// <remarks>
- /// Gentium is Copyright (c) 2004-2008, SIL International and
- /// distributed under the Open Font License.
- /// http://scripts.sil.org/OFL
- /// </remarks>
- public static FontSurface Gentium14
- {
- get { return InternalResources.Data.Gentium14; }
- }
+
#endregion
Modified: trunk/AgateLib/Gui/ThemeEngines/Mercury/Mercury.cs
===================================================================
--- trunk/AgateLib/Gui/ThemeEngines/Mercury/Mercury.cs 2009-12-05 21:21:08 UTC (rev 1143)
+++ trunk/AgateLib/Gui/ThemeEngines/Mercury/Mercury.cs 2009-12-06 02:11:06 UTC (rev 1144)
@@ -32,7 +32,7 @@
public Mercury()
: this(MercuryScheme.CreateDefaultScheme())
{
- DebugOutlines = true;
+
}
public Mercury(MercuryScheme scheme)
{
Modified: trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryScheme.cs
===================================================================
--- trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryScheme.cs 2009-12-05 21:21:08 UTC (rev 1143)
+++ trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryScheme.cs 2009-12-06 02:11:06 UTC (rev 1144)
@@ -121,8 +121,8 @@
void SetDefaults(IFileProvider files)
{
- WidgetFont = FontSurface.Andika09;
- TitleFont = FontSurface.Andika10;
+ WidgetFont = FontSurface.AgateSans10;
+ TitleFont = FontSurface.AgateSans14;
FontColor = Color.White;
FontColorDisabled = Color.Gray;
Modified: trunk/AgateLib/InternalResources/Data.cs
===================================================================
--- trunk/AgateLib/InternalResources/Data.cs 2009-12-05 21:21:08 UTC (rev 1143)
+++ trunk/AgateLib/InternalResources/Data.cs 2009-12-06 02:11:06 UTC (rev 1144)
@@ -15,8 +15,9 @@
static AgateResourceCollection mFontResources;
static Surface mPoweredBy;
- static Dictionary<int, FontSurface> mGentium = new Dictionary<int, FontSurface>();
- static Dictionary<int, FontSurface> mAndika = new Dictionary<int, FontSurface>();
+ static Dictionary<int, FontSurface> mSans = new Dictionary<int, FontSurface>();
+ static Dictionary<int, FontSurface> mSerif = new Dictionary<int, FontSurface>();
+ static Dictionary<int, FontSurface> mMono = new Dictionary<int, FontSurface>();
static Data()
{
@@ -31,14 +32,19 @@
mPoweredBy = null;
}
- foreach (var font in mAndika)
+ foreach (var font in mSans)
font.Value.Dispose();
- foreach (var font in mGentium)
+ foreach (var font in mSerif)
font.Value.Dispose();
- mAndika.Clear();
- mGentium.Clear();
+ foreach (var font in mMono)
+ font.Value.Dispose();
+
+ mSans.Clear();
+ mSerif.Clear();
+ mMono.Clear();
+
}
private static void LoadFonts()
@@ -75,35 +81,29 @@
return dictionary[size];
}
- internal static FontSurface Gentium10
+ internal static FontSurface AgateSans10
{
- get { return GetFont(mGentium, 10, "Gentium-10"); }
+ get { return GetFont(mSans, 10, "AgateSans-10"); }
}
-
- internal static FontSurface Gentium12
+ internal static FontSurface AgateSans14
{
- get { return GetFont(mGentium, 12, "Gentium-12"); }
+ get { return GetFont(mSans, 14, "AgateSans-14"); }
}
- internal static FontSurface Gentium14
- {
- get { return GetFont(mGentium, 14, "Gentium-14"); }
- }
- internal static FontSurface Andika09
+ internal static FontSurface AgateSerif10
{
- get { return GetFont(mAndika, 9, "Andika-09"); }
+ get { return GetFont(mSerif, 10, "AgateSerif-10"); }
}
- internal static FontSurface Andika10
+ internal static FontSurface AgateSerif14
{
- get { return GetFont(mAndika, 10, "Andika-10"); }
+ get { return GetFont(mSerif, 14, "AgateSerif-14"); }
}
- internal static FontSurface Andika12
+
+ internal static FontSurface AgateMono10
{
- get { return GetFont(mAndika, 12, "Andika-12"); }
+ get { return GetFont(mMono, 10, "AgateMono-10"); }
}
- internal static FontSurface Andika14
- {
- get { return GetFont(mAndika, 14, "Andika-14"); }
- }
+
+
}
}
\ No newline at end of file
Modified: trunk/AgateLib/InternalResources/Fonts.zip
===================================================================
(Binary files differ)
Modified: trunk/AgateLib/Resources/AgateResourceLoader.cs
===================================================================
--- trunk/AgateLib/Resources/AgateResourceLoader.cs 2009-12-05 21:21:08 UTC (rev 1143)
+++ trunk/AgateLib/Resources/AgateResourceLoader.cs 2009-12-06 02:11:06 UTC (rev 1144)
@@ -38,7 +38,7 @@
{
XmlDocument doc = new XmlDocument();
XmlElement root = doc.CreateElement("AgateResources");
- XmlHelper.AppendAttribute(root, doc, "Version", "0.3.0");
+ XmlHelper.AppendAttribute(root, doc, "Version", "0.4.0");
doc.AppendChild(root);
@@ -99,9 +99,10 @@
switch (version)
{
+ case "0.4.0":
case "0.3.1":
case "0.3.0":
- ReadVersion031(resources, root, version);
+ ReadVersion040(resources, root, version);
break;
default:
@@ -110,7 +111,7 @@
}
- private static void ReadVersion031(AgateResourceCollection resources, XmlNode root, string version)
+ private static void ReadVersion040(AgateResourceCollection resources, XmlNode root, string version)
{
for (int i = 0; i < root.ChildNodes.Count; i++)
{
Modified: trunk/AgateLib/Resources/BitmapFontResource.cs
===================================================================
--- trunk/AgateLib/Resources/BitmapFontResource.cs 2009-12-05 21:21:08 UTC (rev 1143)
+++ trunk/AgateLib/Resources/BitmapFontResource.cs 2009-12-06 02:11:06 UTC (rev 1144)
@@ -27,6 +27,14 @@
{
switch (version)
{
+ case "0.4.0":
+ Name = node.Attributes["name"].Value;
+ mImage = XmlHelper.ReadAttributeString(node, "image", string.Empty);
+
+ ReadMetrics040(node);
+
+ break;
+
case "0.3.1":
case "0.3.0":
Name = node.Attributes["name"].Value;
@@ -42,6 +50,54 @@
}
}
+ private void ReadMetrics040(XmlNode parent)
+ {
+ XmlNode root = null;
+
+ // find metrics node
+ foreach (XmlNode n in parent.ChildNodes)
+ {
+ if (n.Name == "Metrics")
+ {
+ root = n;
+ break;
+ }
+ }
+
+ if (root == null)
+ throw new AgateResourceException(string.Format(
+ "Could not find Metrics node in bitmap font resource {0}.", Name));
+
+ foreach (XmlNode node in root.ChildNodes)
+ {
+ if (node.Name == "Glyph")
+ {
+ GlyphMetrics glyph = new GlyphMetrics();
+
+ char key = (char)int.Parse(node.Attributes["char"].Value);
+ glyph.SourceRect = Rectangle.Parse(node.Attributes["source"].Value);
+
+ glyph.LeftOverhang = XmlHelper.ReadAttributeInt(node, "leftOverhang", 0);
+ glyph.RightOverhang = XmlHelper.ReadAttributeInt(node, "rightOverhang", 0);
+
+ mMetrics.Add(key, glyph);
+ }
+ else if (node.Name == "Kerning")
+ {
+ char left = (char)XmlHelper.ReadAttributeInt(node, "first");
+ char right = (char)XmlHelper.ReadAttributeInt(node, "second");
+ int value = XmlHelper.ReadAttributeInt(node, "value");
+
+ mMetrics[left].KerningPairs.Add(right, value);
+ }
+ else
+ {
+ throw new AgateResourceException(string.Format(
+ "Expected to find glyph node, but found {0} instead.", node.Name));
+ }
+ }
+ }
+
private void ReadMetrics030(XmlNode parent)
{
XmlNode root = null;
@@ -102,7 +158,20 @@
metrics.AppendChild(current);
}
+ foreach (char glyph in mMetrics.Keys)
+ {
+ foreach (var kern in mMetrics[glyph].KerningPairs)
+ {
+ XmlNode current = doc.CreateElement("Kerning");
+ XmlHelper.AppendAttribute(current, doc, "first", glyph);
+ XmlHelper.AppendAttribute(current, doc, "second", kern.Key);
+ XmlHelper.AppendAttribute(current, doc, "value", kern.Value);
+
+ metrics.AppendChild(current);
+ }
+ }
+
root.AppendChild(metrics);
parent.AppendChild(root);
}
Modified: trunk/Drivers/AgateLib.WinForms/AgateLib.WinForms.csproj
===================================================================
--- trunk/Drivers/AgateLib.WinForms/AgateLib.WinForms.csproj 2009-12-05 21:21:08 UTC (rev 1143)
+++ trunk/Drivers/AgateLib.WinForms/AgateLib.WinForms.csproj 2009-12-06 02:11:06 UTC (rev 1144)
@@ -102,6 +102,7 @@
<Compile Include="BitmapFontUtil.cs">
<SubType>Code</SubType>
</Compile>
+ <Compile Include="BitmapFontUtilRenderers.cs" />
<Compile Include="DisplayWindowForm.cs">
<SubType>Form</SubType>
</Compile>
@@ -115,7 +116,6 @@
<Compile Include="FormUtil.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="GdiFontExtensions.cs" />
<Compile Include="Icons.Designer.cs">
<DependentUpon>Icons.resx</DependentUpon>
<SubType>Code</SubType>
Modified: trunk/Drivers/AgateLib.WinForms/BitmapFontUtil.cs
===================================================================
--- trunk/Drivers/AgateLib.WinForms/BitmapFontUtil.cs 2009-12-05 21:21:08 UTC (rev 1143)
+++ trunk/Drivers/AgateLib.WinForms/BitmapFontUtil.cs 2009-12-06 02:11:06 UTC (rev 1144)
@@ -31,113 +31,9 @@
/// <summary>
/// Utility class for constructing a bitmap font image.
/// </summary>
- public static class BitmapFontUtil
+ public static partial class BitmapFontUtil
{
- interface ICharacterRenderer
- {
- Drawing.Font Font { get; set; }
-
- int Padding { get; }
- Size MeasureText(Drawing.Graphics g, string text);
- void DrawText(Drawing.Graphics g, string text, Point location, Drawing.Color clr);
- }
-
- class TextRend : ICharacterRenderer
- {
- Drawing.Font font;
-
- public TextRend(Drawing.Font font)
- {
- Font = font;
- }
- public System.Drawing.Font Font
- {
- get { return font; }
- set { font = value; }
- }
- public int Padding
- {
- get { return 1; }
- }
- TextFormatFlags flags = TextFormatFlags.NoPadding | TextFormatFlags.NoPrefix;
-
- public Size MeasureText(System.Drawing.Graphics g, string text)
- {
- Drawing.Size size = TextRenderer.MeasureText(g, text,
- font, new System.Drawing.Size(256, 256), flags);
-
- return new Size(size.Width, size.Height);
- }
-
- public void DrawText(System.Drawing.Graphics g, string text, Point location, Drawing.Color clr)
- {
- TextRenderer.DrawText(g, text, font,
- new System.Drawing.Rectangle(location.X, location.Y, 256, 256),
- clr, flags);
- }
-
- }
- class GraphicsRend : ICharacterRenderer
- {
- Drawing.Font font;
- float padding;
-
- public GraphicsRend(Drawing.Font font)
- {
- Font = font;
- }
- public System.Drawing.Font Font
- {
- get { return font; }
- set { font = value; }
- }
-
- public int Padding
- {
- get { return (int)Math.Ceiling(padding); }
- }
- void CalculatePadding(Drawing.Graphics g)
- {
- // apparently .NET (or GDI+) does this stupid thing on Windows
- // where is reports extra padded space around the characters drawn.
- // Fortunately, this padding is equal the reported size of the
- // space character, which is not drawn when by itself.
- if (Environment.OSVersion.Platform == PlatformID.Win32NT)
- {
- SizeF padSize = Interop.Convert(g.MeasureString(" ", font));
-
- padding = padSize.Width - 1;
- }
- }
- public Size MeasureText(Drawing.Graphics g, string text)
- {
- if (padding == 0)
- CalculatePadding(g);
-
- Drawing.SizeF size = g.MeasureString(text, font);
- size.Width -= padding;
-
- // for space character on windows.
- if (text == " " && padding > 0)
- size.Width = padding;
-
- return new Size((int)(size.Width), (int)(size.Height));
- }
-
- public void DrawText(Drawing.Graphics g, string text, Point location, Drawing.Color clr)
- {
- g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;
-
- // we need to adjust the position by half the padding
- location.X -= (int)Math.Ceiling(padding / 2);
-
- using (Drawing.Brush brush = new Drawing.SolidBrush(clr))
- {
- g.DrawString(text, font, brush, new Drawing.Point(location.X, location.Y));
- }
- }
- }
-
+
/// <summary>
/// Creates a bitmap font by loading an OS font, and drawing it to
/// a bitmap to use as a Surface object. You should only use this method
@@ -162,6 +58,11 @@
(ICharacterRenderer)new TextRend(font) :
(ICharacterRenderer)new GraphicsRend(font);
+ if (Core.Platform.PlatformType == PlatformType.Windows && options.UseTextRenderer)
+ {
+ rend = new GdiWindows(font);
+ }
+
MakeBitmap(options, rend, out bmp, out glyphs);
//bmp.Save("testfont.png", Drawing.Imaging.ImageFormat.Png);
@@ -204,7 +105,7 @@
{
for (char i = range.StartChar; i <= range.EndChar; i++)
{
- Size sourceSize = rend.MeasureText(g, i.ToString());
+ Size sourceSize = rend.MeasureChar(g, i);
// skip glyphs which are not in the font.
if (sourceSize.Width == 0)
@@ -279,12 +180,12 @@
if (options.CreateBorder)
{
- rend.DrawText(borderG, i.ToString(), new Point(drawX , drawY + 1), borderColor);
- rend.DrawText(borderG, i.ToString(), new Point(drawX + 2, drawY + 1), borderColor);
- rend.DrawText(borderG, i.ToString(), new Point(drawX + 1, drawY), borderColor);
- rend.DrawText(borderG, i.ToString(), new Point(drawX + 1, drawY + 2), borderColor);
+ rend.DrawChar(borderG, i, new Point(drawX , drawY + 1), borderColor);
+ rend.DrawChar(borderG, i, new Point(drawX + 2, drawY + 1), borderColor);
+ rend.DrawChar(borderG, i, new Point(drawX + 1, drawY), borderColor);
+ rend.DrawChar(borderG, i, new Point(drawX + 1, drawY + 2), borderColor);
- rend.DrawText(g, i.ToString(), new Point(drawX + 1, drawY + 1), System.Drawing.Color.White);
+ rend.DrawChar(g, i, new Point(drawX + 1, drawY + 1), System.Drawing.Color.White);
if (font.SizeInPoints >= 14.0)
glyphs[i].LeftOverhang = 1;
@@ -293,7 +194,7 @@
}
else
{
- rend.DrawText(g, i.ToString(), new Point(drawX, drawY), System.Drawing.Color.White);
+ rend.DrawChar(g, i, new Point(drawX, drawY), System.Drawing.Color.White);
}
glyphs[i].SourceRect = new Rectangle(
@@ -307,13 +208,8 @@
}
}
-
- if (Core.Platform.PlatformType == PlatformType.Windows)
- {
- GdiFontExtensions gdi = new GdiFontExtensions();
- gdi.LoadKerningPairs(glyphs, font, bmp, g);
- }
+ rend.ModifyMetrics(glyphs, g);
g.Dispose();
Added: trunk/Drivers/AgateLib.WinForms/BitmapFontUtilRenderers.cs
===================================================================
--- trunk/Drivers/AgateLib.WinForms/BitmapFontUtilRenderers.cs (rev 0)
+++ trunk/Drivers/AgateLib.WinForms/BitmapFontUtilRenderers.cs 2009-12-06 02:11:06 UTC (rev 1144)
@@ -0,0 +1,454 @@
+// The contents of this file are subject to the Mozilla Public License
+// Version 1.1 (the "License"); you may not use this file except in
+// compliance with the License. You may obtain a copy of the License at
+// http://www.mozilla.org/MPL/
+//
+// Software distributed under the License is distributed on an "AS IS"
+// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+// License for the specific language governing rights and limitations
+// under the License.
+//
+// The Original Code is AgateLib.
+//
+// The Initial Developer of the Original Code is Erik Ylvisaker.
+// Portions created by Erik Ylvisaker are Copyright (C) 2006-2009.
+// All Rights Reserved.
+//
+// Contributor(s): Erik Ylvisaker
+//
+using System;
+using Drawing = System.Drawing;
+using System.Collections.Generic;
+using System.Runtime.InteropServices;
+using System.Text;
+using System.Windows.Forms;
+using AgateLib.DisplayLib;
+using AgateLib.Geometry;
+using AgateLib.BitmapFont;
+using AgateLib.Resources;
+
+namespace AgateLib.WinForms
+{
+ static partial class BitmapFontUtil
+ {
+ interface ICharacterRenderer
+ {
+ Drawing.Font Font { get; set; }
+
+ int Padding { get; }
+ Size MeasureChar(Drawing.Graphics g, char c);
+ void DrawChar(Drawing.Graphics g, char c, Point location, Drawing.Color clr);
+
+ void ModifyMetrics(FontMetrics glyphs, Drawing.Graphics g);
+ }
+
+ class TextRend : ICharacterRenderer
+ {
+ Drawing.Font font;
+
+ public TextRend(Drawing.Font font)
+ {
+ Font = font;
+ }
+ public System.Drawing.Font Font
+ {
+ get { return font; }
+ set { font = value; }
+ }
+ public int Padding
+ {
+ get { return 1; }
+ }
+ TextFormatFlags flags = TextFormatFlags.NoPadding | TextFormatFlags.NoPrefix;
+
+ public void ModifyMetrics(FontMetrics glyphs, Drawing.Graphics g)
+ { }
+ public Size MeasureChar(System.Drawing.Graphics g, char c)
+ {
+ string text = c.ToString();
+
+ Drawing.Size size = TextRenderer.MeasureText(g, text,
+ font, new System.Drawing.Size(256, 256), flags);
+
+ return new Size(size.Width, size.Height);
+ }
+
+ public void DrawChar(System.Drawing.Graphics g, char c, Point location, Drawing.Color clr)
+ {
+ string text = c.ToString();
+
+ TextRenderer.DrawText(g, text, font,
+ new System.Drawing.Rectangle(location.X, location.Y, 256, 256),
+ clr, flags);
+ }
+
+
+ }
+ class GraphicsRend : ICharacterRenderer
+ {
+ Drawing.Font font;
+ float padding;
+
+ public GraphicsRend(Drawing.Font font)
+ {
+ Font = font;
+ }
+ public System.Drawing.Font Font
+ {
+ get { return font; }
+ set { font = value; }
+ }
+
+ public void ModifyMetrics(FontMetrics glyphs, Drawing.Graphics g)
+ { }
+
+ public int Padding
+ {
+ get { return (int)Math.Ceiling(padding); }
+ }
+ void CalculatePadding(Drawing.Graphics g)
+ {
+ // apparently .NET (or GDI+) does this stupid thing on Windows
+ // where is reports extra padded space around the characters drawn.
+ // Fortunately, this padding is equal the reported size of the
+ // space character, which is not drawn when by itself.
+ if (Environment.OSVersion.Platform == PlatformID.Win32NT)
+ {
+ SizeF padSize = Interop.Convert(g.MeasureString(" ", font));
+
+ padding = padSize.Width - 1;
+ }
+ }
+ public Size MeasureChar(Drawing.Graphics g, char c)
+ {
+ string text = c.ToString();
+
+ if (padding == 0)
+ CalculatePadding(g);
+
+ Drawing.SizeF size = g.MeasureString(text, font);
+ size.Width -= padding;
+
+ // for space character on windows.
+ if (text == " " && padding > 0)
+ size.Width = padding;
+
+ return new Size((int)(size.Width), (int)(size.Height));
+ }
+
+ public void DrawChar(Drawing.Graphics g, char c, Point location, Drawing.Color clr)
+ {
+ string text = c.ToString();
+
+ g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;
+
+ // we need to adjust the position by half the padding
+ location.X -= (int)Math.Ceiling(padding / 2);
+
+...
[truncated message content] |
|
From: <ka...@us...> - 2009-12-06 05:07:10
|
Revision: 1148
http://agate.svn.sourceforge.net/agate/?rev=1148&view=rev
Author: kanato
Date: 2009-12-06 05:07:03 +0000 (Sun, 06 Dec 2009)
Log Message:
-----------
Update ReleaseNotes.txt
Add comments to FontSurface.cs.
Modified Paths:
--------------
trunk/AgateLib/DisplayLib/FontSurface.cs
trunk/ChangeLog.txt
trunk/ReleaseNotes.txt
trunk/TODO.txt
Modified: trunk/AgateLib/DisplayLib/FontSurface.cs
===================================================================
--- trunk/AgateLib/DisplayLib/FontSurface.cs 2009-12-06 04:46:00 UTC (rev 1147)
+++ trunk/AgateLib/DisplayLib/FontSurface.cs 2009-12-06 05:07:03 UTC (rev 1148)
@@ -71,20 +71,32 @@
FontState mState = new FontState();
/// <summary>
- /// Creates a FontSurface object from the given fontFamily.
+ /// Creates a FontSurface object from the given fontFamily. Appearance
+ /// of the font will likely be platform-dependent.
/// </summary>
- /// <param name="fontFamily"></param>
- /// <param name="sizeInPoints"></param>
+ /// <param name="fontFamily">Name of the font familty to use.</param>
+ /// <param name="sizeInPoints">Size of the font in points.</param>
+ /// <remarks>It is not recommended that you use this method
+ /// if any cross-platform support is concerned. For cross-platform
+ /// support, either create a bitmap font, or use one of the built-in
+ /// ones, like FontSurface.AgateSans14.
+ /// </remarks>
public FontSurface(string fontFamily, float sizeInPoints)
: this(fontFamily, sizeInPoints, FontStyle.None)
{ }
/// <summary>
- /// Creates a FontSurface object from the given fontFamily.
+ /// Creates a FontSurface object from the given fontFamily. Appearance
+ /// of the font will likely be platform-dependent.
/// </summary>
- /// <param name="fontFamily"></param>
- /// <param name="sizeInPoints"></param>
- /// <param name="style"></param>
+ /// <param name="fontFamily">Name of the font familty to use.</param>
+ /// <param name="sizeInPoints">Size of the font in points.</param>
+ /// <param name="style">Style of the font, such as bold or italic.</param>
+ /// <remarks>It is not recommended that you use this method
+ /// if any cross-platform support is concerned. For cross-platform
+ /// support, either create a bitmap font, or use one of the built-in
+ /// ones, like FontSurface.AgateSans14.
+ /// </remarks>
public FontSurface(string fontFamily, float sizeInPoints, FontStyle style)
{
if (sizeInPoints < 1)
@@ -134,6 +146,9 @@
System.Diagnostics.Debug.Assert(impl != null);
}
+ /// <summary>
+ /// Gets the name of the font.
+ /// </summary>
public string FontName
{
get { return impl.FontName; }
@@ -349,6 +364,9 @@
get { return impl.FontHeight; }
}
+ /// <summary>
+ /// Indicates how images are laid out inline with text.
+ /// </summary>
public TextImageLayout TextImageLayout { get; set; }
/// <summary>
@@ -399,7 +417,10 @@
DrawText(mState);
}
-
+ /// <summary>
+ /// Draws text using the specified FontState object.
+ /// </summary>
+ /// <param name="state">The FontState to use.</param>
public void DrawText(FontState state)
{
if (string.IsNullOrEmpty(state.TransformedText))
@@ -407,10 +428,14 @@
impl.DrawText(state);
}
-
- Regex substituteMatch = new Regex(@"\{.*?\}|\{\{\}|\{\}\}|\r\n|\n");
- Regex indexMatch = new Regex(@"[0-9]+:?");
-
+ /// <summary>
+ /// Draws formatted text.
+ /// </summary>
+ /// <param name="destX">X position of destination.</param>
+ /// <param name="destY">Y position of destination.</param>
+ /// <param name="formatString">The formatting string.</param>
+ /// <param name="args">Arguments that are used to fill {x} members of the formatString. Surface objects
+ /// are laid out according to the TextImageLayout member.</param>
public void DrawText(int destX, int destY, string formatString, params object[] args)
{
TextLayout layout = CreateLayout(formatString, args);
@@ -419,7 +444,18 @@
layout.DrawAll();
}
- public TextLayout CreateLayout(string formatString, object[] args)
+ static Regex substituteMatch = new Regex(@"\{.*?\}|\{\{\}|\{\}\}|\r\n|\n");
+ static Regex indexMatch = new Regex(@"[0-9]+:?");
+
+ /// <summary>
+ /// Creates a text layout from a format string and list of arguments.
+ /// </summary>
+ /// <param name="formatString">The formatting string.</param>
+ /// <param name="args">Arguments that are used to fill {x} members of the formatString. Surface objects
+ /// are laid out according to the TextImageLayout member.</param>
+ /// <returns>Returns a TextLayout object which contains all the layout information needed to draw
+ /// the text/images on screen.</returns>
+ public TextLayout CreateLayout(string formatString, params object[] args)
{
var matches = substituteMatch.Matches(formatString);
@@ -686,10 +722,22 @@
}
+ /// <summary>
+ /// Enum indicating how images are laid out when drawing inline with text.
+ /// </summary>
public enum TextImageLayout
{
+ /// <summary>
+ /// The top of the image is aligned with the top of the text.
+ /// </summary>
InlineTop,
+ /// <summary>
+ /// The center of the image is aligned with the center of the text.
+ /// </summary>
InlineCenter,
+ /// <summary>
+ /// The bottom of the image is aligned with the bottom of the text.
+ /// </summary>
InlineBottom,
}
}
Modified: trunk/ChangeLog.txt
===================================================================
--- trunk/ChangeLog.txt 2009-12-06 04:46:00 UTC (rev 1147)
+++ trunk/ChangeLog.txt 2009-12-06 05:07:03 UTC (rev 1148)
@@ -1,3 +1,4 @@
+
Version 0.3.2
===================
Moved ISprite and ISpriteFrame to Sprites namespace.
Modified: trunk/ReleaseNotes.txt
===================================================================
--- trunk/ReleaseNotes.txt 2009-12-06 04:46:00 UTC (rev 1147)
+++ trunk/ReleaseNotes.txt 2009-12-06 05:07:03 UTC (rev 1148)
@@ -1,7 +1,47 @@
+Version 0.4.0
+===================
+Major changes in this version.
+
+AgateLib now has built-in fonts, which can be accessed via static members like
+FontSurface.AgateSans14 for a 14-point sans serif font. This are bitmap fonts
+embedded in AgateLib.dll, and they are guaranteed to look exactly the same across
+all supported platforms.
+
+A basic set of GUI controls has been included for an in-game GUI. This is located
+in the AgateLib.Gui namespace. This GUI has a somewhat flexible skinning engine
+called Mercury.
+
+Basic support for 3D rendering is now available. This is accessed by using
+the shaders in AgateLib.DisplayLib.Shaders.AgateBuiltInShaders class. You can
+create vertex buffers and index buffers.
+
+The old IRenderTarget interface that was implemented by DisplayWindows and Surfaces
+is gone, and instead we have the FrameBuffer class. This requires some rather
+minor changes to consumer code, and resolves ambiguities around having surfaces
+as render targets, and is much more forward compatible.
+
+No longer are you required to create a DisplayWindow before creating any Surfaces.
+Now objects can be instantiated in any order, as long as AgateSetup.Initialize has
+been called.
+
+AgateMDX has been dumped and a SlimDX based replacement, AgateSDX is included now.
+SlimDX has much better community support, and AgateSDX will eventually be
+developed to include Direct3D 10/11 support.
+
+A particles system has been developed by Marcel Hauf and is included in the
+AgateLib.Particles namespace.
+
+Several functions have been deprecated around the library. A compatibility
+release versioned 0.3.9 is included which retains these deprecated functions
+to help migrate code to AgateLib 0.4.0. Not everything could be kept however.
+
AgateLib 0.3.1 Release Notes
======================================
-This is mainly a minor update to 0.3.0. All features deprecated in 0.3.0 have been removed. There are a few minor bug fixes, and a few properties added. Of note is the addition of the ZipFileProvider, which is an IFileProvider object that allows resources to be loaded from zip files.
+This is mainly a minor update to 0.3.0. All features deprecated in 0.3.0 have
+been removed. There are a few minor bug fixes, and a few properties added.
+Of note is the addition of the ZipFileProvider, which is an IFileProvider object
+that allows resources to be loaded from zip files.
AgateLib 0.3.0 Release Notes
======================================
Modified: trunk/TODO.txt
===================================================================
--- trunk/TODO.txt 2009-12-06 04:46:00 UTC (rev 1147)
+++ trunk/TODO.txt 2009-12-06 05:07:03 UTC (rev 1148)
@@ -1,6 +1,8 @@
AgateLib Todo
=============
+AgateLib 0.4.0
+
General:
Remove all OpenGL immediate mode code from AgateOTK.
Check GetPixelFormat method in AgateSDX
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2009-12-06 05:08:48
|
Revision: 1149
http://agate.svn.sourceforge.net/agate/?rev=1149&view=rev
Author: kanato
Date: 2009-12-06 05:08:40 +0000 (Sun, 06 Dec 2009)
Log Message:
-----------
Add comments to Display.cs.
Modified Paths:
--------------
trunk/AgateLib/DisplayLib/Display.cs
trunk/Drivers/AgateDrawing/Drawing_Display.cs
Modified: trunk/AgateLib/DisplayLib/Display.cs
===================================================================
--- trunk/AgateLib/DisplayLib/Display.cs 2009-12-06 05:07:03 UTC (rev 1148)
+++ trunk/AgateLib/DisplayLib/Display.cs 2009-12-06 05:08:40 UTC (rev 1149)
@@ -100,7 +100,10 @@
Shaders.AgateBuiltInShaders.InitializeShaders();
}
-
+ /// <summary>
+ /// Gets the RenderStateAdapter object which is used to set and retrieve render
+ /// states for the display device.
+ /// </summary>
public static RenderStateAdapter RenderState
{
get { return mRenderState; }
@@ -145,6 +148,9 @@
}
}
+ /// <summary>
+ /// Gets the shader that is currently in use.
+ /// </summary>
public static Shaders.AgateShader Shader
{
get { return impl.Shader; }
@@ -682,7 +688,6 @@
{
impl.HideCursor();
}
-
internal static void ShowCursor()
{
impl.ShowCursor();
Modified: trunk/Drivers/AgateDrawing/Drawing_Display.cs
===================================================================
--- trunk/Drivers/AgateDrawing/Drawing_Display.cs 2009-12-06 05:07:03 UTC (rev 1148)
+++ trunk/Drivers/AgateDrawing/Drawing_Display.cs 2009-12-06 05:08:40 UTC (rev 1149)
@@ -267,10 +267,6 @@
return null;
}
}
- public override void SetOrthoProjection(AgateLib.Geometry.Rectangle region)
- {
- throw new AgateException("SetOrthoProjection is not implemented in AgateDrawing.dll.");
- }
protected override void SavePixelBuffer(PixelBuffer pixelBuffer, string filename, ImageFileFormat format)
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2009-12-06 06:46:16
|
Revision: 1152
http://agate.svn.sourceforge.net/agate/?rev=1152&view=rev
Author: kanato
Date: 2009-12-06 06:46:08 +0000 (Sun, 06 Dec 2009)
Log Message:
-----------
Add some documentation to persistant settings.
Modified Paths:
--------------
trunk/AgateLib/Settings/PersistantSettings.cs
trunk/AgateLib/Settings/SettingsGroup.cs
trunk/Tests/Tests.csproj
Added Paths:
-----------
trunk/Tests/CoreTests/PersistantSettingsTest.cs
Modified: trunk/AgateLib/Settings/PersistantSettings.cs
===================================================================
--- trunk/AgateLib/Settings/PersistantSettings.cs 2009-12-06 06:37:47 UTC (rev 1151)
+++ trunk/AgateLib/Settings/PersistantSettings.cs 2009-12-06 06:46:08 UTC (rev 1152)
@@ -7,6 +7,16 @@
namespace AgateLib.Settings
{
+ /// <summary>
+ /// Class which stores a simple list of persistant settings. The settings exist
+ /// in named groups, and within each group an individual setting is a key/value pair.
+ /// These settings are stored on a per-user basis.
+ /// </summary>
+ /// <remarks>On Windows Vista the file is stored in
+ /// %HOME%\AppData\Company Name\Application Name\settings.xml.
+ /// On Unix the file is stored at
+ /// $HOME/.config/Company Name/Application Name/settings.xml.
+ /// </remarks>
public class PersistantSettings
{
Dictionary<string, SettingsGroup> mSettings = new Dictionary<string, SettingsGroup>();
@@ -16,7 +26,7 @@
LoadSettings();
}
- public SettingsGroup GetOrCreateSettingsGroup(string name)
+ private SettingsGroup GetOrCreateSettingsGroup(string name)
{
if (name.Contains(" "))
throw new AgateException("Settings group name cannot contain a string.");
@@ -37,6 +47,9 @@
{
get { return GetOrCreateSettingsGroup(name); }
}
+ /// <summary>
+ /// Gets the full path to the location where the settings file is stored.
+ /// </summary>
public string SettingsFilename
{
get
@@ -45,6 +58,9 @@
}
}
+ /// <summary>
+ /// Saves the settings to the persistant storage on disk.
+ /// </summary>
public void SaveSettings()
{
XmlDocument doc = new XmlDocument();
@@ -85,6 +101,10 @@
{
return;
}
+ catch (DirectoryNotFoundException)
+ {
+ return;
+ }
XmlElement root = doc.ChildNodes[0] as XmlElement;
Modified: trunk/AgateLib/Settings/SettingsGroup.cs
===================================================================
--- trunk/AgateLib/Settings/SettingsGroup.cs 2009-12-06 06:37:47 UTC (rev 1151)
+++ trunk/AgateLib/Settings/SettingsGroup.cs 2009-12-06 06:46:08 UTC (rev 1152)
@@ -5,6 +5,10 @@
namespace AgateLib.Settings
{
+ /// <summary>
+ /// A group of settings. This is essentially just a Dictionary object
+ /// where both key and value types are strings.
+ /// </summary>
public class SettingsGroup : IDictionary<string, string>
{
Dictionary<string, string> mStore = new Dictionary<string, string>();
Added: trunk/Tests/CoreTests/PersistantSettingsTest.cs
===================================================================
--- trunk/Tests/CoreTests/PersistantSettingsTest.cs (rev 0)
+++ trunk/Tests/CoreTests/PersistantSettingsTest.cs 2009-12-06 06:46:08 UTC (rev 1152)
@@ -0,0 +1,53 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using AgateLib;
+
+namespace Tests.CoreTests
+{
+ class PersistantSettingsTest : IAgateTest
+ {
+
+ public string Name
+ {
+ get { return "Persistant Settings"; }
+ }
+
+ public string Category
+ {
+ get { return "Core"; }
+ }
+
+ public void Main(string[] args)
+ {
+ using (AgateSetup setup = new AgateSetup())
+ {
+ setup.CompanyName = "Tester Inc.";
+ setup.ApplicationName = "Testing";
+ setup.InitializeAll();
+ if (setup.WasCanceled)
+ return;
+
+ if (Core.Settings["Testy"].IsEmpty)
+ {
+ InitializeSettings();
+ }
+
+ int runcount = int.Parse(Core.Settings["Testy"]["RunCount"]);
+ runcount++;
+ Core.Settings["Testy"]["RunCount"] = runcount.ToString();
+
+ Core.Settings.SaveSettings();
+ }
+ }
+
+ private void InitializeSettings()
+ {
+ Core.Settings["Testy"]["MyTest"] = "true";
+ Core.Settings["Testy"]["RunCount"] = "0";
+
+ }
+
+ }
+}
Modified: trunk/Tests/Tests.csproj
===================================================================
--- trunk/Tests/Tests.csproj 2009-12-06 06:37:47 UTC (rev 1151)
+++ trunk/Tests/Tests.csproj 2009-12-06 06:46:08 UTC (rev 1152)
@@ -88,6 +88,7 @@
<Compile Include="AgateTestAttribute.cs">
<SubType>Code</SubType>
</Compile>
+ <Compile Include="CoreTests\PersistantSettingsTest.cs" />
<Compile Include="CoreTests\PlatformDetection\PlatformDetection.cs">
<SubType>Form</SubType>
</Compile>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2009-12-18 06:40:53
|
Revision: 1156
http://agate.svn.sourceforge.net/agate/?rev=1156&view=rev
Author: kanato
Date: 2009-12-18 06:40:41 +0000 (Fri, 18 Dec 2009)
Log Message:
-----------
Implement ability to write to sound buffer.
Correct disposal of Audio when AgateSetup is destroyed.
Modified Paths:
--------------
trunk/AgateLib/AgateSetup.cs
trunk/AgateLib/AudioLib/SoundBuffer.cs
trunk/AgateLib/AudioLib/SoundBufferSession.cs
trunk/AgateLib/ImplementationBase/AudioImpl.cs
trunk/AgateLib/InputLib/JoystickInput.cs
trunk/AgateLib/Settings/PersistantSettings.cs
trunk/Drivers/AgateSDL/Audio/SDL_Audio.cs
trunk/Drivers/AgateSDL/Audio/SDL_SoundBuffer.cs
trunk/Drivers/AgateSDL/Audio/SDL_SoundBufferSession.cs
trunk/Tests/DisplayTests/ParticleTests/ParticleTests.cs
trunk/Tests/Tests.csproj
Modified: trunk/AgateLib/AgateSetup.cs
===================================================================
--- trunk/AgateLib/AgateSetup.cs 2009-12-17 06:39:57 UTC (rev 1155)
+++ trunk/AgateLib/AgateSetup.cs 2009-12-18 06:40:41 UTC (rev 1156)
@@ -246,6 +246,8 @@
public void Dispose()
{
Display.Dispose();
+ Audio.Dispose();
+ InputLib.JoystickInput.Dispose();
}
/// <summary>
Modified: trunk/AgateLib/AudioLib/SoundBuffer.cs
===================================================================
--- trunk/AgateLib/AudioLib/SoundBuffer.cs 2009-12-17 06:39:57 UTC (rev 1155)
+++ trunk/AgateLib/AudioLib/SoundBuffer.cs 2009-12-18 06:40:41 UTC (rev 1156)
@@ -92,6 +92,20 @@
}
/// <summary>
+ /// Creates an empty SoundBuffer object.
+ /// </summary>
+ /// <param name="size">The number of samples in this sound buffer.</param>
+ /// <param name="stereo"></param>
+ public SoundBuffer(int size)
+ {
+ impl = Audio.Impl.CreateSoundBuffer(size);
+ }
+
+ public SoundBuffer(short[] data)
+ {
+ impl = Audio.Impl.CreateSoundBuffer(data);
+ }
+ /// <summary>
/// Disposes of the SoundBuffer object, and all SoundBufferSession objects
/// created by this SoundBuffer.
/// </summary>
@@ -143,6 +157,12 @@
return sb;
}
+ public bool Loop
+ {
+ get { return impl.Loop; }
+ set { impl.Loop = value; }
+ }
+
/// <summary>
/// Creates a new SoundBufferSession object, or finds one which
/// can be recycled.
@@ -255,6 +275,11 @@
mSessions.Remove(session);
}
+
+ public void Write(short[] source, int srcIndex, int destIndex, int length)
+ {
+ impl.Write(source, srcIndex, destIndex, length);
+ }
}
}
Modified: trunk/AgateLib/AudioLib/SoundBufferSession.cs
===================================================================
--- trunk/AgateLib/AudioLib/SoundBufferSession.cs 2009-12-17 06:39:57 UTC (rev 1155)
+++ trunk/AgateLib/AudioLib/SoundBufferSession.cs 2009-12-18 06:40:41 UTC (rev 1156)
@@ -68,7 +68,6 @@
mSource.RemoveSession(this);
}
-
/// <summary>
/// Returns the implemented object.
/// </summary>
Modified: trunk/AgateLib/ImplementationBase/AudioImpl.cs
===================================================================
--- trunk/AgateLib/ImplementationBase/AudioImpl.cs 2009-12-17 06:39:57 UTC (rev 1155)
+++ trunk/AgateLib/ImplementationBase/AudioImpl.cs 2009-12-18 06:40:41 UTC (rev 1156)
@@ -80,6 +80,16 @@
public virtual void Update()
{
}
+
+ public virtual SoundBufferImpl CreateSoundBuffer(int size)
+ {
+ throw new NotImplementedException();
+ }
+
+ public virtual SoundBufferImpl CreateSoundBuffer(short[] data)
+ {
+ throw new NotImplementedException();
+ }
}
/// <summary>
@@ -100,6 +110,14 @@
/// </summary>
public abstract double Volume { get; set; }
+ public virtual bool Loop { get { return false; } set { } }
+
+ public virtual void Write(short[] source, int srcIndex, int destIndex, int length)
+ {
+ throw new NotImplementedException();
+ }
+
+
}
/// <summary>
/// Represents a playback instance.
@@ -121,6 +139,13 @@
/// </summary>
public abstract void Stop();
+
+ public virtual int BufferPointer
+ {
+ get { return -1; }
+ set { }
+ }
+
/// <summary>
/// Gets or sets the volume this audio file is playing at.
/// 0.0 is completely quiet.
Modified: trunk/AgateLib/InputLib/JoystickInput.cs
===================================================================
--- trunk/AgateLib/InputLib/JoystickInput.cs 2009-12-17 06:39:57 UTC (rev 1155)
+++ trunk/AgateLib/InputLib/JoystickInput.cs 2009-12-18 06:40:41 UTC (rev 1156)
@@ -66,5 +66,11 @@
for (int i = 0; i < mRawJoysticks.Count; i++)
mRawJoysticks[i].Poll();
}
+
+ internal static void Dispose()
+ {
+ if (impl != null)
+ impl.Dispose();
+ }
}
}
Modified: trunk/AgateLib/Settings/PersistantSettings.cs
===================================================================
--- trunk/AgateLib/Settings/PersistantSettings.cs 2009-12-17 06:39:57 UTC (rev 1155)
+++ trunk/AgateLib/Settings/PersistantSettings.cs 2009-12-18 06:40:41 UTC (rev 1156)
@@ -105,7 +105,13 @@
{
return;
}
+ catch (XmlException e)
+ {
+ System.Diagnostics.Trace.WriteLine("Error reading settings file:" + Environment.NewLine +
+ e.Message);
+ return;
+ }
XmlElement root = doc.ChildNodes[0] as XmlElement;
if (root.Name != "Settings")
Modified: trunk/Drivers/AgateSDL/Audio/SDL_Audio.cs
===================================================================
--- trunk/Drivers/AgateSDL/Audio/SDL_Audio.cs 2009-12-17 06:39:57 UTC (rev 1155)
+++ trunk/Drivers/AgateSDL/Audio/SDL_Audio.cs 2009-12-18 06:40:41 UTC (rev 1156)
@@ -71,11 +71,19 @@
{
return new SDL_Music(musicStream);
}
+
public override SoundBufferImpl CreateSoundBuffer(System.IO.Stream inStream)
{
return new SDL_SoundBuffer(inStream);
}
-
+ public override SoundBufferImpl CreateSoundBuffer(int size)
+ {
+ return new SDL_SoundBuffer(size);
+ }
+ public override SoundBufferImpl CreateSoundBuffer(short[] data)
+ {
+ return new SDL_SoundBuffer(data);
+ }
public override SoundBufferSessionImpl CreateSoundBufferSession(SoundBufferImpl buffer)
{
return new SDL_SoundBufferSession((SDL_SoundBuffer)buffer);
Modified: trunk/Drivers/AgateSDL/Audio/SDL_SoundBuffer.cs
===================================================================
--- trunk/Drivers/AgateSDL/Audio/SDL_SoundBuffer.cs 2009-12-17 06:39:57 UTC (rev 1155)
+++ trunk/Drivers/AgateSDL/Audio/SDL_SoundBuffer.cs 2009-12-18 06:40:41 UTC (rev 1156)
@@ -19,6 +19,7 @@
using System;
using System.Collections.Generic;
using System.IO;
+using System.Runtime.InteropServices;
using System.Text;
using Tao.Sdl;
@@ -33,6 +34,8 @@
IntPtr sound;
string tempfile;
double mVolume = 1.0;
+ bool ownRam = false;
+ IntPtr soundPtr;
public SDL_SoundBuffer(Stream stream)
{
@@ -47,7 +50,39 @@
{
LoadFromFile(filename);
}
+ public SDL_SoundBuffer(int size)
+ {
+ int bytes = size * 2;
+ soundPtr = Marshal.AllocHGlobal(bytes);
+ ownRam = true;
+ sound = SdlMixer.Mix_QuickLoad_RAW(soundPtr, bytes);
+ }
+ public SDL_SoundBuffer(short[] data)
+ {
+ int bytes = data.Length * 2;
+ soundPtr = Marshal.AllocHGlobal(bytes);
+ ownRam = true;
+
+ Marshal.Copy(data, 0, soundPtr, data.Length);
+
+ sound = SdlMixer.Mix_QuickLoad_RAW(soundPtr, bytes);
+ }
+
+ public override void Write(short[] source, int srcIndex, int destIndex, int length)
+ {
+ if (soundPtr == IntPtr.Zero)
+ throw new AgateException("Cannot write to audio buffer loaded from a file.");
+
+ SdlMixer.Mix_Chunk c =
+ (SdlMixer.Mix_Chunk)Marshal.PtrToStructure(sound, typeof(SdlMixer.Mix_Chunk));
+
+ unsafe
+ {
+ Marshal.Copy(source, srcIndex, (IntPtr)(((short*)c.abuf + destIndex)), length);
+ }
+ }
+
~SDL_SoundBuffer()
{
Dispose(false);
@@ -61,8 +96,12 @@
private void Dispose(bool disposing)
{
+ if (ownRam )
+ {
+ Marshal.FreeHGlobal(soundPtr);
+ }
+
SdlMixer.Mix_FreeChunk(sound);
-
//if (string.IsNullOrEmpty(tempfile) == false)
//{
// File.Delete(tempfile);
@@ -91,6 +130,11 @@
}
}
+ public override bool Loop
+ {
+ get;
+ set;
+ }
internal IntPtr SoundChunk
{
get { return sound; }
Modified: trunk/Drivers/AgateSDL/Audio/SDL_SoundBufferSession.cs
===================================================================
--- trunk/Drivers/AgateSDL/Audio/SDL_SoundBufferSession.cs 2009-12-17 06:39:57 UTC (rev 1155)
+++ trunk/Drivers/AgateSDL/Audio/SDL_SoundBufferSession.cs 2009-12-18 06:40:41 UTC (rev 1156)
@@ -18,6 +18,7 @@
//
using System;
using System.Collections.Generic;
+using System.Runtime.InteropServices;
using System.Text;
using Tao.Sdl;
@@ -33,11 +34,14 @@
int channel;
double volume;
double pan;
+ bool loop;
public SDL_SoundBufferSession(SDL_SoundBuffer buffer)
{
+ loop = buffer.Loop;
+
sound = buffer.SoundChunk;
- channel = SdlMixer.Mix_PlayChannel(-1, sound, 0);
+ channel = SdlMixer.Mix_PlayChannel(-1, sound, LoopCount);
volume = buffer.Volume;
}
@@ -74,10 +78,22 @@
public override void Play()
{
- SdlMixer.Mix_PlayChannel(channel, sound, 0);
+ SdlMixer.Mix_PlayChannel(channel, sound, LoopCount);
SetPanning();
}
+ int LoopCount
+ {
+ get
+ {
+ int loops = 0;
+ if (loop)
+ loops = -1;
+
+ return loops;
+ }
+ }
+
public override void Stop()
{
SdlMixer.Mix_Pause(channel);
Modified: trunk/Tests/DisplayTests/ParticleTests/ParticleTests.cs
===================================================================
--- trunk/Tests/DisplayTests/ParticleTests/ParticleTests.cs 2009-12-17 06:39:57 UTC (rev 1155)
+++ trunk/Tests/DisplayTests/ParticleTests/ParticleTests.cs 2009-12-18 06:40:41 UTC (rev 1156)
@@ -1,142 +1,142 @@
-
-using System;
-
-using Tests;
-
-using AgateLib;
-using AgateLib.DisplayLib;
-using AgateLib.Geometry;
-using AgateLib.Particles;
-using AgateLib.Sprites;
-
-namespace Tests.ParticleTest
-{
- public class PixelParticleTest : AgateGame, IAgateTest
- {
- #region IAgateTest Members
-
- public string Name { get { return "Particles"; } }
-
- public string Category { get { return "Display"; } }
-
- public void Main(string[] args)
- {
- Run(args);
- }
-
+
+using System;
+
+using Tests;
+
+using AgateLib;
+using AgateLib.DisplayLib;
+using AgateLib.Geometry;
+using AgateLib.Particles;
+using AgateLib.Sprites;
+
+namespace Tests.ParticleTest
+{
+ public class PixelParticleTest : AgateGame, IAgateTest
+ {
+ #region IAgateTest Members
+
+ public string Name { get { return "Particles"; } }
+
+ public string Category { get { return "Display"; } }
+
+ public void Main(string[] args)
+ {
+ Run(args);
+ }
+
#endregion
protected override void AdjustAppInitParameters(ref AppInitParameters initParams)
{
initParams.InitializeAudio = false;
initParams.InitializeJoysticks = false;
- initParams.ShowSplashScreen = false;
- }
-
- Random ran = new Random();
-
- // PixelParticle
- PixelEmitter pe;
- GravityManipulator gm;
- GravityManipulator gm2;
-
- //SurfaceParticle
- SurfaceEmitter sm;
-
- //SpriteParticle
- SpriteEmitter se;
-
- FontSurface fontSurface;
-
- FadeOutManipulator fom;
- FadeOutManipulator fom2;
-
- GravityPointManipulator gpm;
-
- protected override void Initialize()
- {
- //PixelParticle
- pe = new PixelEmitter(new Vector2(400f, 550f) ,Color.Blue, 2000);
- pe.EmitLife = 15f;
- pe.EmitFrequency = 0.01f;
- pe.PixelSize = new Size(3, 3);
-
- //SurfaceParticle
- sm = new SurfaceEmitter(new Vector2(150f, 550f), 4.2f, 50, 0);
- Surface surf = new Surface(@"smoke2.png");
- sm.AddSurface(surf);
- sm.EmitFrequency = 0.1f;
- sm.EmitAlpha = 1d;
- sm.EmitAcceleration = new Vector2(0, -20);
- sm.EmitVelocity = new Vector2(0, -10);
-
- //SpriteParticle
- Surface surf2 = new Surface(@"smoke.png");
- Sprite sprite = new Sprite(100, 100);
- sprite.AddFrame(surf);
- sprite.AddFrame(surf2);
- sprite.TimePerFrame = 3d;
- sprite.AnimationType = SpriteAnimType.Looping;
- se = new SpriteEmitter(new Vector2(600f, 550f), 4.2f, 100, 0);
- se.AddSprite(sprite);
- se.EmitFrequency = 0.05f;
- se.EmitAlpha = 1d;
- se.EmitAcceleration = new Vector2(0, -20);
- se.EmitVelocity = new Vector2(0, -10);
-
- //Manipulators
- gm = new GravityManipulator(new Vector2(0f, -20f));
- gm.SubscribeToEmitter(sm);
- gm.SubscribeToEmitter(se);
-
- gm2 = new GravityManipulator(Vector2.Empty);
- //gm2.SubscribeToEmitter(pe);
- gm2.SubscribeToEmitter(sm);
- gm2.SubscribeToEmitter(se);
-
- fom = new FadeOutManipulator(2.5f, 0.6f);
- fom.SubscribeToEmitter(pe);
-
- fom2 = new FadeOutManipulator(4f, 0.3f);
- fom2.SubscribeToEmitter(sm);
- fom2.SubscribeToEmitter(se);
-
- gpm = new GravityPointManipulator(new Vector2(400f, 350f), -1f);
- gpm.SubscribeToEmitter(pe);
-
- fontSurface = new FontSurface("Arial", 10f, FontStyle.Bold);
- }
-
- protected override void Update(double time_ms)
- {
- gm2.Gravity = new Vector2((float)ran.Next(-300, 300), 0f);
-
- fom.AlphaAmount = (float)ran.NextDouble() * 1.3f;
- fom.LifeBarrier = (float)ran.NextDouble() * 5f;
-
- pe.Update(time_ms);
- pe.EmitVelocity = new Vector2((float)ran.Next(-10, 10), 0f);
-
- sm.Update(time_ms);
-
- se.Update(time_ms);
- se.GetSpriteByKey(0).TimePerFrame = ran.NextDouble() * 3 + 1.5d;
- }
-
- protected override void Render()
- {
- Display.Clear(Color.Black);
-
- fontSurface.DrawText("FPS: " + Display.FramesPerSecond);
-
- pe.Draw();
- fontSurface.DrawText(pe.Position.X, pe.Position.Y, "Particles: " + pe.Particles.Count + "/" + pe.Particles.Capacity);
-
- sm.Draw();
- fontSurface.DrawText(sm.Position.X, sm.Position.Y, "Particles: " + sm.Particles.Count + "/" + sm.Particles.Capacity);
-
- se.Draw();
- fontSurface.DrawText(se.Position.X, se.Position.Y, "Particles: " + se.Particles.Count + "/" + se.Particles.Capacity);
- }
- }
-}
+ initParams.ShowSplashScreen = false;
+ }
+
+ Random ran = new Random();
+
+ // PixelParticle
+ PixelEmitter pe;
+ GravityManipulator gm;
+ GravityManipulator gm2;
+
+ //SurfaceParticle
+ SurfaceEmitter sm;
+
+ //SpriteParticle
+ SpriteEmitter se;
+
+ FontSurface fontSurface;
+
+ FadeOutManipulator fom;
+ FadeOutManipulator fom2;
+
+ GravityPointManipulator gpm;
+
+ protected override void Initialize()
+ {
+ //PixelParticle
+ pe = new PixelEmitter(new Vector2(400f, 550f) ,Color.Blue, 2000);
+ pe.EmitLife = 15f;
+ pe.EmitFrequency = 0.01f;
+ pe.PixelSize = new Size(3, 3);
+
+ //SurfaceParticle
+ sm = new SurfaceEmitter(new Vector2(150f, 550f), 4.2f, 50, 0);
+ Surface surf = new Surface(@"smoke2.png");
+ sm.AddSurface(surf);
+ sm.EmitFrequency = 0.1f;
+ sm.EmitAlpha = 1d;
+ sm.EmitAcceleration = new Vector2(0, -20);
+ sm.EmitVelocity = new Vector2(0, -10);
+
+ //SpriteParticle
+ Surface surf2 = new Surface(@"smoke.png");
+ Sprite sprite = new Sprite(100, 100);
+ sprite.AddFrame(surf);
+ sprite.AddFrame(surf2);
+ sprite.TimePerFrame = 3d;
+ sprite.AnimationType = SpriteAnimType.Looping;
+ se = new SpriteEmitter(new Vector2(600f, 550f), 4.2f, 100, 0);
+ se.AddSprite(sprite);
+ se.EmitFrequency = 0.05f;
+ se.EmitAlpha = 1d;
+ se.EmitAcceleration = new Vector2(0, -20);
+ se.EmitVelocity = new Vector2(0, -10);
+
+ //Manipulators
+ gm = new GravityManipulator(new Vector2(0f, -20f));
+ gm.SubscribeToEmitter(sm);
+ gm.SubscribeToEmitter(se);
+
+ gm2 = new GravityManipulator(Vector2.Empty);
+ //gm2.SubscribeToEmitter(pe);
+ gm2.SubscribeToEmitter(sm);
+ gm2.SubscribeToEmitter(se);
+
+ fom = new FadeOutManipulator(2.5f, 0.6f);
+ fom.SubscribeToEmitter(pe);
+
+ fom2 = new FadeOutManipulator(4f, 0.3f);
+ fom2.SubscribeToEmitter(sm);
+ fom2.SubscribeToEmitter(se);
+
+ gpm = new GravityPointManipulator(new Vector2(400f, 350f), -1f);
+ gpm.SubscribeToEmitter(pe);
+
+ fontSurface = new FontSurface("Arial", 10f, FontStyle.Bold);
+ }
+
+ protected override void Update(double time_ms)
+ {
+ gm2.Gravity = new Vector2((float)ran.Next(-300, 300), 0f);
+
+ fom.AlphaAmount = (float)ran.NextDouble() * 1.3f;
+ fom.LifeBarrier = (float)ran.NextDouble() * 5f;
+
+ pe.Update(time_ms);
+ pe.EmitVelocity = new Vector2((float)ran.Next(-10, 10), 0f);
+
+ sm.Update(time_ms);
+
+ se.Update(time_ms);
+ se.GetSpriteByKey(0).TimePerFrame = ran.NextDouble() * 3 + 1.5d;
+ }
+
+ protected override void Render()
+ {
+ Display.Clear(Color.Black);
+
+ fontSurface.DrawText("FPS: " + Display.FramesPerSecond);
+
+ pe.Draw();
+ fontSurface.DrawText(pe.Position.X, pe.Position.Y, "Particles: " + pe.Particles.Count + "/" + pe.Particles.Capacity);
+
+ sm.Draw();
+ fontSurface.DrawText(sm.Position.X, sm.Position.Y, "Particles: " + sm.Particles.Count + "/" + sm.Particles.Capacity);
+
+ se.Draw();
+ fontSurface.DrawText(se.Position.X, se.Position.Y, "Particles: " + se.Particles.Count + "/" + se.Particles.Capacity);
+ }
+ }
+}
Modified: trunk/Tests/Tests.csproj
===================================================================
--- trunk/Tests/Tests.csproj 2009-12-17 06:39:57 UTC (rev 1155)
+++ trunk/Tests/Tests.csproj 2009-12-18 06:40:41 UTC (rev 1156)
@@ -88,6 +88,7 @@
<Compile Include="AgateTestAttribute.cs">
<SubType>Code</SubType>
</Compile>
+ <Compile Include="AudioTests\GenerateAudio.cs" />
<Compile Include="CoreTests\PersistantSettingsTest.cs" />
<Compile Include="CoreTests\PlatformDetection\PlatformDetection.cs">
<SubType>Form</SubType>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2009-12-25 01:16:34
|
Revision: 1159
http://agate.svn.sourceforge.net/agate/?rev=1159&view=rev
Author: kanato
Date: 2009-12-25 01:16:27 +0000 (Fri, 25 Dec 2009)
Log Message:
-----------
Add configurations for different CPUs.
Modified Paths:
--------------
trunk/AgateLib/AgateLib.csproj
trunk/AgateLib.sln
trunk/Drivers/AgateDrawing/AgateDrawing.csproj
trunk/Drivers/AgateFMOD/AgateFMOD.csproj
trunk/Drivers/AgateLib.WinForms/AgateLib.WinForms.csproj
trunk/Drivers/AgateOTK/AgateOTK.csproj
trunk/Drivers/AgateSDL/AgateSDL.csproj
trunk/Tests/Tests.csproj
Modified: trunk/AgateLib/AgateLib.csproj
===================================================================
--- trunk/AgateLib/AgateLib.csproj 2009-12-22 18:31:51 UTC (rev 1158)
+++ trunk/AgateLib/AgateLib.csproj 2009-12-25 01:16:27 UTC (rev 1159)
@@ -64,6 +64,44 @@
<NoWarn>
</NoWarn>
</PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x64\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x64</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>bin\x64\Release\</OutputPath>
+ <DefineConstants>TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <DocumentationFile>AgateLib.xml</DocumentationFile>
+ <Optimize>true</Optimize>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x64</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x86</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>bin\x86\Release\</OutputPath>
+ <DefineConstants>TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <DocumentationFile>AgateLib.xml</DocumentationFile>
+ <Optimize>true</Optimize>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x86</PlatformTarget>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="System">
<Name>System</Name>
Modified: trunk/AgateLib.sln
===================================================================
--- trunk/AgateLib.sln 2009-12-22 18:31:51 UTC (rev 1158)
+++ trunk/AgateLib.sln 2009-12-25 01:16:27 UTC (rev 1159)
@@ -24,37 +24,91 @@
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|x64.ActiveCfg = Debug|x64
+ {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|x64.Build.0 = Debug|x64
+ {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|x86.ActiveCfg = Debug|x86
+ {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|x86.Build.0 = Debug|x86
+ {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|Any CPU.Build.0 = Release|Any CPU
+ {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|x64.ActiveCfg = Release|x64
+ {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|x64.Build.0 = Release|x64
+ {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|x86.ActiveCfg = Release|x86
+ {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|x86.Build.0 = Release|x86
{00C7FA95-98F4-43D9-9B63-34122B1DB003}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{00C7FA95-98F4-43D9-9B63-34122B1DB003}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Debug|x64.ActiveCfg = Debug|x64
+ {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Debug|x64.Build.0 = Debug|x64
+ {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Debug|x86.ActiveCfg = Debug|x86
+ {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Debug|x86.Build.0 = Debug|x86
{00C7FA95-98F4-43D9-9B63-34122B1DB003}.Release|Any CPU.ActiveCfg = Release|Any CPU
{00C7FA95-98F4-43D9-9B63-34122B1DB003}.Release|Any CPU.Build.0 = Release|Any CPU
+ {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Release|x64.ActiveCfg = Release|Any CPU
+ {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Release|x86.ActiveCfg = Release|x86
+ {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Release|x86.Build.0 = Release|x86
{9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Debug|x64.ActiveCfg = Debug|x64
+ {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Debug|x64.Build.0 = Debug|x64
+ {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Debug|x86.ActiveCfg = Debug|x86
+ {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Debug|x86.Build.0 = Debug|x86
{9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Release|Any CPU.Build.0 = Release|Any CPU
+ {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Release|x64.ActiveCfg = Release|Any CPU
+ {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Release|x86.ActiveCfg = Release|x86
+ {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Release|x86.Build.0 = Release|x86
{9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|x64.ActiveCfg = Debug|x64
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|x64.Build.0 = Debug|x64
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|x86.ActiveCfg = Debug|x86
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|x86.Build.0 = Debug|x86
{9490B719-829E-43A7-A5FE-8001F8A81759}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9490B719-829E-43A7-A5FE-8001F8A81759}.Release|Any CPU.Build.0 = Release|Any CPU
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|x64.ActiveCfg = Release|Any CPU
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|x86.ActiveCfg = Release|x86
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|x86.Build.0 = Release|x86
{164A785D-924E-40FB-A517-D7E677F3B53A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{164A785D-924E-40FB-A517-D7E677F3B53A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Debug|x64.ActiveCfg = Debug|x64
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Debug|x64.Build.0 = Debug|x64
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Debug|x86.ActiveCfg = Debug|x86
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Debug|x86.Build.0 = Debug|x86
{164A785D-924E-40FB-A517-D7E677F3B53A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{164A785D-924E-40FB-A517-D7E677F3B53A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Release|x64.ActiveCfg = Release|Any CPU
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Release|x86.ActiveCfg = Release|x86
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Release|x86.Build.0 = Release|x86
{BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Debug|x64.ActiveCfg = Debug|x64
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Debug|x64.Build.0 = Debug|x64
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Debug|x86.ActiveCfg = Debug|x86
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Debug|x86.Build.0 = Debug|x86
{BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Release|Any CPU.Build.0 = Release|Any CPU
- {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|Any CPU.Build.0 = Release|Any CPU
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Release|x64.ActiveCfg = Release|Any CPU
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Release|x86.ActiveCfg = Release|x86
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Release|x86.Build.0 = Release|x86
{424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Debug|x64.ActiveCfg = Debug|x64
+ {424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Debug|x64.Build.0 = Debug|x64
+ {424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Debug|x86.ActiveCfg = Debug|x86
+ {424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Debug|x86.Build.0 = Debug|x86
{424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Release|Any CPU.Build.0 = Release|Any CPU
+ {424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Release|x64.ActiveCfg = Release|Any CPU
+ {424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Release|x86.ActiveCfg = Release|x86
+ {424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Modified: trunk/Drivers/AgateDrawing/AgateDrawing.csproj
===================================================================
--- trunk/Drivers/AgateDrawing/AgateDrawing.csproj 2009-12-22 18:31:51 UTC (rev 1158)
+++ trunk/Drivers/AgateDrawing/AgateDrawing.csproj 2009-12-25 01:16:27 UTC (rev 1159)
@@ -65,6 +65,38 @@
<NoWarn>
</NoWarn>
</PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x64\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x64</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>bin\x64\Release\</OutputPath>
+ <DefineConstants>TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <Optimize>true</Optimize>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x64</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x86</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>bin\x86\Release\</OutputPath>
+ <DefineConstants>TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <Optimize>true</Optimize>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x86</PlatformTarget>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="System">
<Name>System</Name>
Modified: trunk/Drivers/AgateFMOD/AgateFMOD.csproj
===================================================================
--- trunk/Drivers/AgateFMOD/AgateFMOD.csproj 2009-12-22 18:31:51 UTC (rev 1158)
+++ trunk/Drivers/AgateFMOD/AgateFMOD.csproj 2009-12-25 01:16:27 UTC (rev 1159)
@@ -1,12 +1,13 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<PropertyGroup>
<ProjectType>Local</ProjectType>
- <ProductVersion>9.0.21022</ProductVersion>
+ <ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ApplicationIcon></ApplicationIcon>
+ <ApplicationIcon>
+ </ApplicationIcon>
<AssemblyKeyContainerName>
</AssemblyKeyContainerName>
<AssemblyName>AgateFMOD</AssemblyName>
@@ -16,9 +17,11 @@
<DelaySign>false</DelaySign>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<OutputType>Library</OutputType>
- <AppDesignerFolder></AppDesignerFolder>
+ <AppDesignerFolder>
+ </AppDesignerFolder>
<RootNamespace>AgateFMOD</RootNamespace>
- <StartupObject></StartupObject>
+ <StartupObject>
+ </StartupObject>
<FileUpgradeFlags>
</FileUpgradeFlags>
</PropertyGroup>
@@ -29,7 +32,8 @@
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>DEBUG;TRACE;</DefineConstants>
- <DocumentationFile></DocumentationFile>
+ <DocumentationFile>
+ </DocumentationFile>
<DebugSymbols>True</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>False</Optimize>
@@ -38,7 +42,8 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
- <NoWarn></NoWarn>
+ <NoWarn>
+ </NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
@@ -47,7 +52,8 @@
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>TRACE;</DefineConstants>
- <DocumentationFile></DocumentationFile>
+ <DocumentationFile>
+ </DocumentationFile>
<DebugSymbols>False</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>True</Optimize>
@@ -56,20 +62,53 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
- <NoWarn></NoWarn>
+ <NoWarn>
+ </NoWarn>
</PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x64\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x64</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>bin\x64\Release\</OutputPath>
+ <DefineConstants>TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <Optimize>true</Optimize>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x64</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x86</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>bin\x86\Release\</OutputPath>
+ <DefineConstants>TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <Optimize>true</Optimize>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x86</PlatformTarget>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="System">
- <Name>System</Name>
+ <Name>System</Name>
</Reference>
<Reference Include="System.Core">
- <Name>System.Core</Name>
+ <Name>System.Core</Name>
</Reference>
<Reference Include="System.Data">
- <Name>System.Data</Name>
+ <Name>System.Data</Name>
</Reference>
<Reference Include="System.Xml">
- <Name>System.Xml</Name>
+ <Name>System.Xml</Name>
</Reference>
</ItemGroup>
<ItemGroup>
@@ -115,4 +154,4 @@
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
-</Project>
+</Project>
\ No newline at end of file
Modified: trunk/Drivers/AgateLib.WinForms/AgateLib.WinForms.csproj
===================================================================
--- trunk/Drivers/AgateLib.WinForms/AgateLib.WinForms.csproj 2009-12-22 18:31:51 UTC (rev 1158)
+++ trunk/Drivers/AgateLib.WinForms/AgateLib.WinForms.csproj 2009-12-25 01:16:27 UTC (rev 1159)
@@ -64,6 +64,40 @@
<NoWarn>
</NoWarn>
</PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x64\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x64</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>bin\x64\Release\</OutputPath>
+ <DefineConstants>TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <DocumentationFile>AgateLib.WinForms.xml</DocumentationFile>
+ <Optimize>true</Optimize>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x64</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x86</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>bin\x86\Release\</OutputPath>
+ <DefineConstants>TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <DocumentationFile>AgateLib.WinForms.xml</DocumentationFile>
+ <Optimize>true</Optimize>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x86</PlatformTarget>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="System">
<Name>System</Name>
Modified: trunk/Drivers/AgateOTK/AgateOTK.csproj
===================================================================
--- trunk/Drivers/AgateOTK/AgateOTK.csproj 2009-12-22 18:31:51 UTC (rev 1158)
+++ trunk/Drivers/AgateOTK/AgateOTK.csproj 2009-12-25 01:16:27 UTC (rev 1159)
@@ -65,6 +65,42 @@
<NoWarn>
</NoWarn>
</PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x64\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x64</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>bin\x64\Release\</OutputPath>
+ <DefineConstants>TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <Optimize>true</Optimize>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x64</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x86</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>bin\x86\Release\</OutputPath>
+ <DefineConstants>TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <Optimize>true</Optimize>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x86</PlatformTarget>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="OpenTK">
<Name>OpenTK</Name>
Modified: trunk/Drivers/AgateSDL/AgateSDL.csproj
===================================================================
--- trunk/Drivers/AgateSDL/AgateSDL.csproj 2009-12-22 18:31:51 UTC (rev 1158)
+++ trunk/Drivers/AgateSDL/AgateSDL.csproj 2009-12-25 01:16:27 UTC (rev 1159)
@@ -1,12 +1,13 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<PropertyGroup>
<ProjectType>Local</ProjectType>
- <ProductVersion>9.0.21022</ProductVersion>
+ <ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{00C7FA95-98F4-43D9-9B63-34122B1DB003}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ApplicationIcon></ApplicationIcon>
+ <ApplicationIcon>
+ </ApplicationIcon>
<AssemblyKeyContainerName>
</AssemblyKeyContainerName>
<AssemblyName>AgateSDL</AssemblyName>
@@ -16,9 +17,11 @@
<DelaySign>false</DelaySign>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<OutputType>Library</OutputType>
- <AppDesignerFolder></AppDesignerFolder>
+ <AppDesignerFolder>
+ </AppDesignerFolder>
<RootNamespace>AgateSDL</RootNamespace>
- <StartupObject></StartupObject>
+ <StartupObject>
+ </StartupObject>
<FileUpgradeFlags>
</FileUpgradeFlags>
</PropertyGroup>
@@ -29,7 +32,8 @@
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>DEBUG;TRACE;</DefineConstants>
- <DocumentationFile></DocumentationFile>
+ <DocumentationFile>
+ </DocumentationFile>
<DebugSymbols>True</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>False</Optimize>
@@ -38,7 +42,8 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
- <NoWarn></NoWarn>
+ <NoWarn>
+ </NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
@@ -47,7 +52,8 @@
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>TRACE;</DefineConstants>
- <DocumentationFile></DocumentationFile>
+ <DocumentationFile>
+ </DocumentationFile>
<DebugSymbols>False</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>True</Optimize>
@@ -56,21 +62,58 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
- <NoWarn></NoWarn>
+ <NoWarn>
+ </NoWarn>
</PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x64\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x64</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>bin\x64\Release\</OutputPath>
+ <DefineConstants>TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <Optimize>true</Optimize>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x64</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x86</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>bin\x86\Release\</OutputPath>
+ <DefineConstants>TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <Optimize>true</Optimize>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x86</PlatformTarget>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="Tao.Sdl">
- <Name>Tao.Sdl</Name>
+ <Name>Tao.Sdl</Name>
<HintPath>.\Tao.Sdl.dll</HintPath>
</Reference>
<Reference Include="System">
- <Name>System</Name>
+ <Name>System</Name>
</Reference>
<Reference Include="System.Core">
- <Name>System.Core</Name>
+ <Name>System.Core</Name>
</Reference>
<Reference Include="System.Xml">
- <Name>System.Xml</Name>
+ <Name>System.Xml</Name>
</Reference>
</ItemGroup>
<ItemGroup>
@@ -139,4 +182,4 @@
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
-</Project>
+</Project>
\ No newline at end of file
Modified: trunk/Tests/Tests.csproj
===================================================================
--- trunk/Tests/Tests.csproj 2009-12-22 18:31:51 UTC (rev 1158)
+++ trunk/Tests/Tests.csproj 2009-12-25 01:16:27 UTC (rev 1159)
@@ -64,6 +64,38 @@
<NoWarn>
</NoWarn>
</PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x64\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x64</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>bin\x64\Release\</OutputPath>
+ <DefineConstants>TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <Optimize>true</Optimize>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x64</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x86</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>bin\x86\Release\</OutputPath>
+ <DefineConstants>TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <Optimize>true</Optimize>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x86</PlatformTarget>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="System">
<Name>System</Name>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2009-12-25 01:24:11
|
Revision: 1160
http://agate.svn.sourceforge.net/agate/?rev=1160&view=rev
Author: kanato
Date: 2009-12-25 01:24:03 +0000 (Fri, 25 Dec 2009)
Log Message:
-----------
Fix target directory for CPU-specific configurations.
Change output target to Binaries\Debug for debug configurations.
Modified Paths:
--------------
trunk/AgateLib/AgateLib.csproj
trunk/Drivers/AgateDrawing/AgateDrawing.csproj
trunk/Drivers/AgateFMOD/AgateFMOD.csproj
trunk/Drivers/AgateLib.WinForms/AgateLib.WinForms.csproj
trunk/Drivers/AgateOTK/AgateOTK.csproj
trunk/Drivers/AgateSDL/AgateSDL.csproj
trunk/Tests/Tests.csproj
Modified: trunk/AgateLib/AgateLib.csproj
===================================================================
--- trunk/AgateLib/AgateLib.csproj 2009-12-25 01:16:27 UTC (rev 1159)
+++ trunk/AgateLib/AgateLib.csproj 2009-12-25 01:24:03 UTC (rev 1160)
@@ -37,7 +37,7 @@
<DebugSymbols>True</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>False</Optimize>
- <OutputPath>..\Binaries\Debug\AgateLib\</OutputPath>
+ <OutputPath>..\Binaries\Debug\</OutputPath>
<RegisterForComInterop>False</RegisterForComInterop>
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -66,7 +66,7 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\x64\Debug\</OutputPath>
+ <OutputPath>..\Binaries\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;</DefineConstants>
<BaseAddress>285212672</BaseAddress>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
@@ -85,7 +85,7 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\x86\Debug\</OutputPath>
+ <OutputPath>..\Binaries\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;</DefineConstants>
<BaseAddress>285212672</BaseAddress>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Modified: trunk/Drivers/AgateDrawing/AgateDrawing.csproj
===================================================================
--- trunk/Drivers/AgateDrawing/AgateDrawing.csproj 2009-12-25 01:16:27 UTC (rev 1159)
+++ trunk/Drivers/AgateDrawing/AgateDrawing.csproj 2009-12-25 01:24:03 UTC (rev 1160)
@@ -37,7 +37,7 @@
<DebugSymbols>True</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>False</Optimize>
- <OutputPath>..\..\Binaries\Debug\Drivers\</OutputPath>
+ <OutputPath>..\..\Binaries\Debug\</OutputPath>
<RegisterForComInterop>False</RegisterForComInterop>
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -67,7 +67,7 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\x64\Debug\</OutputPath>
+ <OutputPath>..\..\Binaries\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;</DefineConstants>
<BaseAddress>285212672</BaseAddress>
<FileAlignment>4096</FileAlignment>
@@ -83,7 +83,7 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\x86\Debug\</OutputPath>
+ <OutputPath>..\..\Binaries\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;</DefineConstants>
<BaseAddress>285212672</BaseAddress>
<FileAlignment>4096</FileAlignment>
Modified: trunk/Drivers/AgateFMOD/AgateFMOD.csproj
===================================================================
--- trunk/Drivers/AgateFMOD/AgateFMOD.csproj 2009-12-25 01:16:27 UTC (rev 1159)
+++ trunk/Drivers/AgateFMOD/AgateFMOD.csproj 2009-12-25 01:24:03 UTC (rev 1160)
@@ -37,7 +37,7 @@
<DebugSymbols>True</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>False</Optimize>
- <OutputPath>..\..\Binaries\Debug\Drivers\</OutputPath>
+ <OutputPath>..\..\Binaries\Debug\</OutputPath>
<RegisterForComInterop>False</RegisterForComInterop>
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -67,7 +67,7 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\x64\Debug\</OutputPath>
+ <OutputPath>..\..\Binaries\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;</DefineConstants>
<BaseAddress>285212672</BaseAddress>
<FileAlignment>4096</FileAlignment>
@@ -83,7 +83,7 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\x86\Debug\</OutputPath>
+ <OutputPath>..\..\Binaries\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;</DefineConstants>
<BaseAddress>285212672</BaseAddress>
<FileAlignment>4096</FileAlignment>
Modified: trunk/Drivers/AgateLib.WinForms/AgateLib.WinForms.csproj
===================================================================
--- trunk/Drivers/AgateLib.WinForms/AgateLib.WinForms.csproj 2009-12-25 01:16:27 UTC (rev 1159)
+++ trunk/Drivers/AgateLib.WinForms/AgateLib.WinForms.csproj 2009-12-25 01:24:03 UTC (rev 1160)
@@ -37,7 +37,7 @@
<DebugSymbols>True</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>False</Optimize>
- <OutputPath>..\..\Binaries\Debug\AgateLib\</OutputPath>
+ <OutputPath>..\..\Binaries\Debug\</OutputPath>
<RegisterForComInterop>False</RegisterForComInterop>
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -66,7 +66,7 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\x64\Debug\</OutputPath>
+ <OutputPath>..\..\Binaries\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;</DefineConstants>
<BaseAddress>285212672</BaseAddress>
<FileAlignment>4096</FileAlignment>
@@ -83,7 +83,7 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\x86\Debug\</OutputPath>
+ <OutputPath>..\..\Binaries\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;</DefineConstants>
<BaseAddress>285212672</BaseAddress>
<FileAlignment>4096</FileAlignment>
Modified: trunk/Drivers/AgateOTK/AgateOTK.csproj
===================================================================
--- trunk/Drivers/AgateOTK/AgateOTK.csproj 2009-12-25 01:16:27 UTC (rev 1159)
+++ trunk/Drivers/AgateOTK/AgateOTK.csproj 2009-12-25 01:24:03 UTC (rev 1160)
@@ -37,7 +37,7 @@
<DebugSymbols>True</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>False</Optimize>
- <OutputPath>..\..\Binaries\Debug\Drivers\</OutputPath>
+ <OutputPath>..\..\Binaries\Debug\</OutputPath>
<RegisterForComInterop>False</RegisterForComInterop>
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -67,7 +67,7 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\x64\Debug\</OutputPath>
+ <OutputPath>..\..\Binaries\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;</DefineConstants>
<BaseAddress>285212672</BaseAddress>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
@@ -85,7 +85,7 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\x86\Debug\</OutputPath>
+ <OutputPath>..\..\Binaries\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;</DefineConstants>
<BaseAddress>285212672</BaseAddress>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Modified: trunk/Drivers/AgateSDL/AgateSDL.csproj
===================================================================
--- trunk/Drivers/AgateSDL/AgateSDL.csproj 2009-12-25 01:16:27 UTC (rev 1159)
+++ trunk/Drivers/AgateSDL/AgateSDL.csproj 2009-12-25 01:24:03 UTC (rev 1160)
@@ -37,7 +37,7 @@
<DebugSymbols>True</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>False</Optimize>
- <OutputPath>..\..\Binaries\Debug\Drivers\</OutputPath>
+ <OutputPath>..\..\Binaries\Debug\</OutputPath>
<RegisterForComInterop>False</RegisterForComInterop>
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -67,7 +67,7 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\x64\Debug\</OutputPath>
+ <OutputPath>..\..\Binaries\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;</DefineConstants>
<BaseAddress>285212672</BaseAddress>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
@@ -85,7 +85,7 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\x86\Debug\</OutputPath>
+ <OutputPath>..\..\Binaries\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;</DefineConstants>
<BaseAddress>285212672</BaseAddress>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Modified: trunk/Tests/Tests.csproj
===================================================================
--- trunk/Tests/Tests.csproj 2009-12-25 01:16:27 UTC (rev 1159)
+++ trunk/Tests/Tests.csproj 2009-12-25 01:24:03 UTC (rev 1160)
@@ -36,7 +36,7 @@
<DebugSymbols>True</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>False</Optimize>
- <OutputPath>..\Binaries\Debug\Tests\</OutputPath>
+ <OutputPath>..\Binaries\Debug\</OutputPath>
<RegisterForComInterop>False</RegisterForComInterop>
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -66,7 +66,7 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\x64\Debug\</OutputPath>
+ <OutputPath>..\Binaries\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;</DefineConstants>
<BaseAddress>285212672</BaseAddress>
<FileAlignment>4096</FileAlignment>
@@ -82,7 +82,7 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\x86\Debug\</OutputPath>
+ <OutputPath>..\Binaries\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;</DefineConstants>
<BaseAddress>285212672</BaseAddress>
<FileAlignment>4096</FileAlignment>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|