Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Blend the OGRE Graphics Engine into your WPF projects

, 9 Sep 2008 CPOL
Blend a First Class Gaming Graphics Engine into your WPF application
OgreInWpf_Part1.zip
OgreInWpf
DemoApps
DemoApps.suo
OrgreHead
OgreHead.csproj.user
Properties
Settings.settings
Release
OgreHead.vshost.exe.manifest
SmokeyCheeseCompany
bin
Release
Properties
Settings.settings
Libraries
MogreWpf.Interop
app.ico
MogreWpf.Interop.suo
MogreWpf.Interop.vcproj.FRED-COMPUTER.Fred.user
MogreWpf.Interop.vcproj.LESLIEG.Fred.user
OgreLib
Properties
Release
Media
DeferredShadingMedia
COPYING
deferred.glsl.program
deferred.hlsl.program
deferred.material
deferreddemo.material
DeferredShading
material
glsl
nm_notex_ps.glsl
nm_ps.glsl
nm_vs.glsl
notex_ps.glsl
ps.glsl
vs.glsl
hlsl
nm_notex_ps.hlsl
nm_ps.hlsl
nm_vs.hlsl
notex_ps.hlsl
ps.hlsl
vs.hlsl
post
glsl
Ambient_ps.glsl
GlobalLight_ps.glsl
LightMaterial_ps.glsl
LightMaterial_vs.glsl
ShowColour_ps.glsl
ShowDS_ps.glsl
ShowNormal_ps.glsl
SinglePass_ps.glsl
vs.glsl
hlsl
Ambient_ps.hlsl
GlobalLight_ps.hlsl
LightMaterial_ps.hlsl
LightMaterial_vs.hlsl
ShowColour_ps.hlsl
ShowDS_ps.hlsl
ShowNormal_ps.hlsl
SinglePass_ps.hlsl
vs.hlsl
deferred_post_debug.glsl.program
deferred_post_debug.hlsl.program
deferred_post_debug.material
deferred_post_minilight.glsl.program
deferred_post_minilight.hlsl.program
deferred_post_minilight.material
deferred_post_multipass.glsl.program
deferred_post_multipass.hlsl.program
deferred_post_multipass.material
deferred_post_onepass.glsl.program
deferred_post_onepass.hlsl.program
deferred_post_onepass.material
fonts
bluebold.ttf
bluecond.ttf
bluehigh.ttf
sample.fontdef
solo5.ttf
gui
ogregui.layout
materials
programs
AmbientOneTexture.glsl
Bloom_ps20.hlsl
Bloom_vs11.hlsl
Blur0_ps20.hlsl
Blur0_vs.glsl
Blur0_vs11.hlsl
Blur1_ps20.hlsl
Blur1_vs.glsl
Blur1_vs11.hlsl
Blur_ps.glsl
Combine_fp.cg
crowdVp.glsl
DepthShadowmap.hlsl
DepthShadowmapCasterFp.glsl
DepthShadowmapCasterVp.glsl
DepthShadowmapNormalMapReceiverFp.glsl
DepthShadowmapNormalMapReceiverVp.glsl
DepthShadowmapReceiverFp.glsl
DepthShadowmapReceiverVp.glsl
DOF_ps.cg
Example_Basic.cg
Example_Basic.hlsl
Example_BumpMapping.cg
Example_CelShading.cg
Example_Fresnel.cg
Example_Projection.cg
GlassFP.cg
Grass.cg
GrayScale.cg
hdr.cg
hdr.hlsl
hdr_bloom.glsl
hdr_downscale2x2luminence.glsl
hdr_downscale3x3.glsl
hdr_downscale3x3brightpass.glsl
hdr_finalToneMapping.glsl
hdr_tonemap_util.glsl
HeatVision.cg
instancing.cg
instancingVp.glsl
InvertFP.cg
LaplaceFP.cg
Ocean2GLSL.frag
Ocean2GLSL.vert
Ocean2HLSL_Cg.frag
Ocean2HLSL_Cg.vert
oceanGLSL.frag
oceanGLSL.vert
oceanHLSL_Cg.frag
oceanHLSL_Cg.vert
OffsetMapping.cg
OffsetMapping.hlsl
OffsetMappingFp.glsl
OffsetMappingVp.glsl
OldMovieFP.cg
OldTV.cg
PosterizeFP.cg
SharpenEdgesFP.cg
skinningTwoWeightsVp.glsl
StdQuad_vp.cg
StdQuad_vp.glsl
TilingFP.cg
varianceshadowcasterfp.cg
varianceshadowcastervp.cg
varianceshadowreceiverfp.cg
varianceshadowreceivervp.cg
scripts
Bloom.material
Example-DynTex.material
Example.material
Examples-Advanced.material
Examples.compositor
Examples.program
Glass.material
Ogre.material
OldMovie.material
OldTV.material
smoke.material
StdQuad_vp.program
textures
aureola.png
basic_droplet.png
cel_shading_diffuse.png
cel_shading_edge.png
cel_shading_specular.png
Dirt.jpg
dirt01.jpg
droplet.png
flare.png
flaretrail.png
GreenSkin.jpg
NoiseVolume.dds
Random3D.dds
smoke.png
smokecolors.png
spheremap.png
WaterNormal1.tga
WeirdEye.png
models
ogrehead.mesh
overlays
Compositor.overlay
DP3.overlay
Example-CubeMapping.overlay
Example-DynTex.overlay
Example-Water.overlay
Shadows.overlay
packs
OgreCore.zip
particle
emitted_emitter.particle
Example-Water.particle
Example.particle
smoke.particle
Release
D3DX9_37.dll
OgreInWpf_Part2.zip
cg.dll
Mogre.dll
MogreWpf.Interop.dll
ogre.cfg
OgreHead.exe
OgreHead.vshost.exe
OgreHead.vshost.exe.manifest
OgreLib.dll
OgreMain.dll
plugins.cfg
Plugin_BSPSceneManager.dll
Plugin_CgProgramManager.dll
Plugin_OctreeSceneManager.dll
Plugin_ParticleFX.dll
RenderSystem_Direct3D9.dll
resources.cfg
SmokeyCheeseCompany.exe
using System.Collections.Generic;
using System.ComponentModel;
using System.Windows;
using Mogre;

namespace SmokeyCheeseCompany
{
    /// <summary>
    /// Interaction logic for Window1.xaml
    /// </summary>
    public partial class Window1 : Window
    {
        public Window1()
        {
            InitializeComponent();
        }

        private void RenterTargetControl_SizeChanged(object sender, SizeChangedEventArgs e)
        {
            _ogre.ViewportSize = e.NewSize;
        }

        private void Window1_OnLoaded(object sender, RoutedEventArgs e)
        {
            _ogre.InitOgre();

            _list.ItemsSource = new List<string>
                                    {
                                        "Things to do with cheese.",
                                        "Lastest smokey news."
                                    };
        }

        private void _ogre_OnInitialised(object sender, RoutedEventArgs e)
        {
            SceneManager sceneMgr = _ogre.SceneManager;

            SceneNode node = sceneMgr.RootSceneNode.CreateChildSceneNode();

            // smoke
            ParticleSystem smokeSystem = sceneMgr.CreateParticleSystem(
                "fountain1",
                "Examples/Smoke");

            node.AttachObject(smokeSystem);
            node.Translate(new Vector3(-150,-200,-400));
        }

        private void Window1_OnClosing(object sender, CancelEventArgs e)
        {
            _ogre.Dispose();
        }
    }
}

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)

Share

About the Author

Leslie Godwin
Technical Lead FNB Connect
South Africa South Africa
iOS Technical Lead at FNB
-
 
Computers are really sweet. Aren't they?
Yup they are...
 
I've always loved writing tools and components...never been very interested in playing games....always wanted to be able to write them though.
 
And, yes. I'm still pretty annoyed they discontinued the Amiga computer.
Follow on   Twitter   Google+

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.141220.1 | Last Updated 9 Sep 2008
Article Copyright 2008 by Leslie Godwin
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid