Click here to Skip to main content
15,881,248 members
Articles / Desktop Programming / WPF

Creating OpenGL Windows in WPF

Rate me:
Please Sign up or sign in to vote.
4.86/5 (23 votes)
10 Mar 2009CPOL9 min read 161.1K   7.8K   63  
A guide to creating OpenGL applications with Windows Presentation Foundation
#region License
/*
MIT License
Copyright �2003-2006 Tao Framework Team
http://www.taoframework.com
All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#endregion License

using System;

namespace Tao.Platform.Windows {
    #region Class Documentation
    /// <summary>
    ///     Injects supplied MSIL into the method's body.
    /// </summary>
    /// <remarks>
    ///     This is a hack as the C# compiler does not allow inline MSIL.  This is extracted and
    ///     the appropriate MSIL injected by the PostProcessTao utility.
    /// </remarks>
    #endregion Class Documentation
    [AttributeUsage(AttributeTargets.Method, AllowMultiple=false, Inherited=false)]
    public sealed class IlasmAttribute : Attribute
    {
        #region IlasmAttribute(string msil)
        /// <summary>
        ///     Injects the supplied MSIL into the tagged method's body.
        /// </summary>
        /// <param name="msil">
        ///     The MSIL to inject.
        /// </param>
        public IlasmAttribute(string msil) {}
        #endregion IlasmAttribute(string msil)
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer emphess
Germany Germany
Chris lives in Munich, Germany and tries to study Physics.

Alongside, he works as a self-employed software consultant on projects from various fields.

Unfortunately, he loved software ever since he started with C++, and his addiction has become a lot worse since the introduction of .NET 2.0.

In his spare time, he tries to go sailing, drink some nice single malt whisky and, in very rare cases, he also sleeps.

You can reach him at ChrisNOSPAM at emphess.net or via his blog emphess.net.

Comments and Discussions