Renormalize line endings and fix copyright headers again.

This commit is contained in:
Paul Chote
2011-04-07 21:15:42 +12:00
parent 1a49b46af1
commit b0425aff3b
144 changed files with 8076 additions and 7746 deletions

View File

@@ -287,7 +287,7 @@ namespace OpenRA.Renderer.Cg
public void DrawIndexedPrimitives( PrimitiveType pt, int numVerts, int numPrimitives )
{
Gl.glDrawElements( ModeFromPrimitiveType( pt ), numPrimitives * IndicesPerPrimitive( pt ),
Gl.glDrawElements( ModeFromPrimitiveType( pt ), numPrimitives * IndicesPerPrimitive( pt ),
Gl.GL_UNSIGNED_INT, IntPtr.Zero);
CheckGlError();
}
@@ -318,9 +318,9 @@ namespace OpenRA.Renderer.Cg
public IIndexBuffer CreateIndexBuffer( int size ) { return new IndexBuffer( this, size ); }
public ITexture CreateTexture() { return new Texture( this ); }
public ITexture CreateTexture( Bitmap bitmap ) { return new Texture( this, bitmap ); }
public IShader CreateShader( string name ) { return new Shader( this, name ); }
public int GpuMemoryUsed { get { return 0; } }
public IShader CreateShader( string name ) { return new Shader( this, name ); }
public int GpuMemoryUsed { get { return 0; } }
}
}

View File

@@ -10,8 +10,8 @@
using System;
using OpenRA.FileFormats.Graphics;
using Tao.OpenGl;
using Tao.OpenGl;
using ElemType = System.UInt32;
namespace OpenRA.Renderer.Cg

View File

@@ -1,36 +1,46 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("OpenRA.Renderer.Cg")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("OpenRA.Renderer.Cg")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2010")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("5531344c-b25d-4641-bc3c-fe035cc777bd")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// 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")]
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("OpenRA.Renderer.Cg")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("OpenRA.Renderer.Cg")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2010")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("5531344c-b25d-4641-bc3c-fe035cc777bd")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// 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")]

View File

@@ -6,13 +6,13 @@
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using OpenRA.FileFormats.Graphics;
#endregion
using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using OpenRA.FileFormats.Graphics;
using Tao.OpenGl;
namespace OpenRA.Renderer.Cg
@@ -32,16 +32,16 @@ namespace OpenRA.Renderer.Cg
Gl.glGenTextures(1, out texture);
GraphicsDevice.CheckGlError();
SetData(bitmap);
}
void PrepareTexture()
{
Gl.glBindTexture(Gl.GL_TEXTURE_2D, texture);
GraphicsDevice.CheckGlError();
Gl.glTexParameteri(Gl.GL_TEXTURE_2D, Gl.GL_TEXTURE_BASE_LEVEL, 0);
GraphicsDevice.CheckGlError();
Gl.glTexParameteri(Gl.GL_TEXTURE_2D, Gl.GL_TEXTURE_MAX_LEVEL, 0);
GraphicsDevice.CheckGlError();
}
void PrepareTexture()
{
Gl.glBindTexture(Gl.GL_TEXTURE_2D, texture);
GraphicsDevice.CheckGlError();
Gl.glTexParameteri(Gl.GL_TEXTURE_2D, Gl.GL_TEXTURE_BASE_LEVEL, 0);
GraphicsDevice.CheckGlError();
Gl.glTexParameteri(Gl.GL_TEXTURE_2D, Gl.GL_TEXTURE_MAX_LEVEL, 0);
GraphicsDevice.CheckGlError();
}
public void SetData(byte[] colors, int width, int height)
@@ -53,8 +53,8 @@ namespace OpenRA.Renderer.Cg
{
fixed (byte* ptr = &colors[0])
{
IntPtr intPtr = new IntPtr((void*)ptr);
IntPtr intPtr = new IntPtr((void*)ptr);
PrepareTexture();
Gl.glTexImage2D(Gl.GL_TEXTURE_2D, 0, Gl.GL_RGBA8, width, height,
0, Gl.GL_BGRA, Gl.GL_UNSIGNED_BYTE, intPtr);
@@ -76,8 +76,8 @@ namespace OpenRA.Renderer.Cg
{
fixed (uint* ptr = &colors[0,0])
{
IntPtr intPtr = new IntPtr((void *) ptr);
IntPtr intPtr = new IntPtr((void *) ptr);
PrepareTexture();
Gl.glTexImage2D(Gl.GL_TEXTURE_2D, 0, Gl.GL_RGBA8, width, height,
0, Gl.GL_BGRA, Gl.GL_UNSIGNED_BYTE, intPtr);
@@ -97,7 +97,7 @@ namespace OpenRA.Renderer.Cg
var bits = bitmap.LockBits(
new Rectangle(0, 0, bitmap.Width, bitmap.Height),
ImageLockMode.ReadOnly,
PixelFormat.Format32bppArgb);
PixelFormat.Format32bppArgb);
PrepareTexture();
Gl.glTexImage2D(Gl.GL_TEXTURE_2D, 0, Gl.GL_RGBA8, bits.Width, bits.Height,