MSDN Blogs

Jean-Sébastien Dupuy
Tech Evangelist - Windows Phone Development

  • Jean-Sébastien Dupuy

    Xbox Music Service: Ajouter de la musique dans votre application Windows Phone ou Windows Store

    Xbox Music Platform API Xbox Music , c’est avant tout une plateforme musicale qui permet d’écouter gratuitement en streaming votre musique (en mode web et sur Windows 8) ou d’emporter votre musique avec vous sur l’ensemble des plateformes en s’abonnant...
  • Jean-Sébastien Dupuy

    Tutorial Series - Introduction au développement d'application Direct3D avec XAML pour Windows Phone 8 : Matrices

    Matrices de transformation On va consacrer ce post aux matrices. Si vous avez allégrement séché cette discipline mathématique en pensant que ça ne servait probablement à rien, pas de bol, dans le monde de la 3D c’est essentiel! :) La seule explication...
  • Jean-Sébastien Dupuy

    Tutorial Series - Introduction to Direct3D with XAML application development for Windows Phone 8 : Transformation Matrices


    Transformation matrices

    I will dedicate this post to matrices. If you missed this mathematical discipline thinking it was probably useless: bad luck, in the world of 3D rendering this topic is essential! :)

    A simple explanation (basically) is that each matrix is ​​defined as an array of numbers (4x4 in our case) which will simplify our life for applying transformations to the cube mesh (rotation, translation and scaling). As I do not claim to give you an algebra class (that my notions are actually quite limited), I suggest you to visit the resources section at the end of this article (stolen on a previous post from my colleague David Rousset ^^):

    Before depressing, the good news is that Direct3D manages much of the inherent complexity of the matrices, the important point to understand is that the coordinates of our object (vertices in first) will be transformed in the following way.

    1. In the first place, we will apply transformations on the object (model) to position it appropriately in the scene.
    2. Then, we'll look at this object from a certain point of view. Imagine a camera that fits over our cube. We will apply the appropriate transformations to see the object in the new coordinates system.
    3. And finally the projection. It is nice to be in a 3D world, but our screen is a flat surface where each pixel is represented by 2 values (x and y). Projection will help us to switch from the 3D world to the 2D surface.

    These transformations are defined by different matrices: model, view and projection. Our initial data (stored in the Vertex Buffer) will be transformed by these matrices to obtain the final coordinated of our pixel on the screen.

    This is largely the role of the Vertex Shader (yet another technical term ^^) to perform this operation. How does it do? It will simply multiply the starting coordinates with each matrix model, view and projection, job completed!

  • Jean-Sébastien Dupuy

    Tutorial Series - Introduction au développement d'application Direct3D avec XAML pour Windows Phone 8 : Création d’un mesh

    Le dernier épisode nous a démontré qu’on pouvait se compliquer la vie pour afficher un fond bleu :) ; mais en contrepartie vous venez d’ouvrir la porte sur DirectX. Pour ce deuxième article, je vais donc tenter de vulgariser les concepts principaux de...
  • Jean-Sébastien Dupuy

    Tutorial Series - Introduction to Direct3D with XAML application development for Windows Phone 8 : Create a basic mesh


    The previous episode showed us that we could display a blue background by using lot of code :) but in return you have now opened the door on DirectX. In this second article, I will attempt to explain the main concepts of Direct3D to help you start. These points are, however, not specific to Windows Phone, and you will find at the bottom of this article additional resources to help you.

    Direct3D Initialization

    Good news, you do not have to manage this part of code, DrawingSurfaceBackgroundGrid control (or DrawingSurface) supports this point to you, it’s a gift! Of course, if you do not use the XAML controls and you want to develop an application 100% native, you must perform this initialization ... do not dream either :)

    Specifically, what are the supported operations during this initialization??

    1. Creating device and device context objects

    Communication with the graphics card (or more broadly the device) is done through these two objects. These are the main entry points to use Direct3D.

    • The device object (ID3D11Device) is primarily responsible for creating the graphic resources (textures, vertex buffers, shaders, ...).
    • The device context object (ID3D11DeviceContext) takes care of rendering operations using resources initialized by the device object.      


    2. Creating swap chain

    The rendering is not performed directly on the screen, it is made into a buffer memory (aka. an array of pixels of the screen size) named back buffer. The swap chain is responsible for copying the contents of the back buffer directly on the screen. For information, the swap chain can theoretically use multiple back buffers, but Windows Phone limit its use to a single buffer.

    In addition, Direct3D provides access to data located in the back buffer (our array of pixels) via the render target view object (ID3D11RenderTargetView).

    Lost? Let us take for example the lines of code from the previous post. The code Direct3DBackground::Draw method initializes our screen with a blue color.

    a/ ClearRenderTargetView method is called from the device context object
    b/ We target the back buffer via render target view object. It becomes clearer?

    HRESULT Direct3DBackground::Draw(_In_ ID3D11Device1* device, _In_ ID3D11DeviceContext1* context, _In_ ID3D11RenderTargetView* renderTargetView)
    // Clear the render target to default values.
    const float midnightBlue [] = { 0.098f, 0.098f, 0.439f, 1.000f };


    return S_OK;

    For additional information, I suggest you to read the following article: Creating a Direct3D device and swap chain for Windows Phone 8.

  • Jean-Sébastien Dupuy

    Tutorial Series - Introduction au développement d'application Direct3D avec XAML pour Windows Phone 8



    Bienvenue dans ce tutoriel sur Direct3D pour Windows Phone 8 ! Dans le cadre de cet article, j'ai décidé de construire l'application Direct3D depuis un projet Windows Phone vide (au lieu d'utiliser les modèles proposés par Visual Studio). Nous allons donc ajouter la plomberie progressivement pour comprendre, étape par étape : 1/ comment la communication entre les composants C # et C ++ est effectuée et 2/ comment créer et manipuler les assets 3D à l’aide de Direct3D.

    A la fin de cette série, vous serez en mesure d'afficher le vaisseau spatial Omega Crusher conçu par Michel en appliquant la texture et l’éclairage (comme affiché dans la vidéo). Pour ce premier post, nous allons créer la structure de notre solution et ajouter le code pour initialiser la surface avec superbe bleu. De fait, beaucoup de plomberie aujourd'hui, la partie plus amusante avec Direct3D débutera dans le prochain post :).

  • Jean-Sébastien Dupuy

    Tutorial Series - Introduction to Direct3D with XAML application development for Windows Phone 8



    Welcome to this tutorial about Direct3D for Windows Phone 8! As part of this tutorial, I decided to start with an empty Windows Phone project instead using default Visual Studio templates to build Direct3D application. We are going to add the plumbing to figure out, step by step, how communication between C# and C++ components is performed, and then how 3D assets can be created and manipulated by using Direct3D.

    At the end of this tutorial series, you will be able to display the Omega Crusher space ship designed by Michel with textures and lightning (as displayed in the video). For this first post, I will start by creating the structure of the solution and the code to initialize 3D surface with a beautiful midnight blue. By the way, lot of plumbing today, the fun part with 3D will come in futures posts :).

    Few words about Direct3D templates provided by Visual Studio

    I will start with an empty project to explain how components interacts with each other. Anyway, if you start a new development, you can of course use one of these templates to save time. For reference, Windows Phone SDK 8.0 provides three native templates to create Direct3D applications.

    Windows Phone Direct3D App (Native Only)

    This template is located in Visual C++ folder, this is a pure native application that does not support XAML. If your app needs standard controls, like text boxes, buttons, or check boxes, you will need to write these from scratch or utilize third-party libraries.

    Windows Phone Direct3D with XAML App

    This template is located in Visual C++ folder too but provides a structure with two components, one managed with C#, the other one in pure native C++. The managed part is based on a DrawingSurfaceBackgroundGrid control which allows you to use Direct3D to render graphics that are displayed across the entire background of your app; the Direct3D code for rendering graphics is implemented in a separate Windows Phone Runtime component (the C++ part).

    This is the project structure that I will implement into this tutorial today.

    Windows Phone XAML and Direct3D App

    This template is located in Visual C# or Visual Basic folders. The project structure is quite similar to the previous one, however the XAML interface host a DrawingSurface control instead DrawingSurfaceBackgroundGrid.

    DrawingSurface control can be placed anywhere in the screen (as any standard XAML control) unlike DrawingSurfaceBackgroundGrid which must be placed at the root of the XAML tree and always covers the entire screen. The frame rate of an application using DrawingSurfaceBackgroundGrid control is slightly better than DrawingSurface application.

  • Jean-Sébastien Dupuy

    Build your design data with Blend - The Lorem Ipsum Power


    Lorem Ipsum ?

    A short wikipedia definition to start this post :

    In publishing and graphic design, lorem ipsum is placeholder text (filler text) commonly used to demonstrate the graphic elements of a document or visual presentation, such as font, typography, and layout, by removing the distraction of meaningful content. The lorem ipsum text is typically a section of a Latin text by Cicero with words altered, added and removed that make it nonsensical in meaning and not proper Latin.

    Ok ... but what is the relationship between Cicero and Windows Phone ?

    Microsoft has long used the Lorem Ipsum in their products to optimize the layout before we have finalized the content. You can for example use the function = lorem() in Word to see a dummy paragraph (cf.

    Well, but still no connection with Windows Phone. The purpose of this article is to explain how Blend for Visual Studio can make your life easier by generating dummy data for your Windows Phone interface.

  • Jean-Sébastien Dupuy

    Générer vos données factices avec Blend - Le pouvoir du Lorem Ipsum

    Lorem Ipsum ? Une petite définition wikipedia pour débuter cet article : Le faux-texte (également appelé lorem ipsum , lipsum ) est, en imprimerie, un texte sans valeur sémantique, permettant de remplir des pages lors d'une mise en forme afin d'en calibrer...
  • Jean-Sébastien Dupuy

    Windows Phone 8 - Company Hub Development


    A Company Hub ?

    Since the arrival of Windows Phone 8, Microsoft offers businesses the opportunity to develop enterprise portals (Company Hub) to publish applications for their employees. The aim is to provide business applications, necessary for the needs of a corporation, without validation or publication on the Microsoft Windows Phone Store. In addition to the applications management part, an enterprise portal is also a communication tool: it can relay information to employees (organizational changes, health server status ...). You can use Push Notifications, Live Tiles and Lock Screen to improve the visibility of these communications.imageThis article covers the steps prior to the establishment of a Company Hub and the development parts used to make this portal. Deployment is manual and I do not use MDM (Mobile Device Management) solution such as Windows Intune or System Center Configuration Manager 2012. If you opt for a managed deployment, keep in mind that these softwares natively offer a company portal (Windows Phone 8 Company Portal App) ready to use. For more details, I suggest to read the following articles:

    Let’s go ! Although the procedure can seem a bit long, the idea is relatively simple. To install applications outside of Windows Phone Store, you must obtain a certificate that gives you this privilege and that identifies your company. Once this certificate in hand, you must associate the phones to your company and sign all your applications with the certificate. The Company Hub is an application like any other, it must also be signed.

  • Jean-Sébastien Dupuy

    Windows Phone 8 - Développement d’un Portail d’Entreprise

    Un Company Hub ? Depuis l’arrivée de Windows Phone 8, Microsoft offre aux entreprises l'opportunité de développer des portails d'entreprise (Company Hub) pour publier des applications destinés à leurs employés. Le but est de proposer des applications...
  • Jean-Sébastien Dupuy

    TechDays 2013


    techdays2013Merci à tous pour votre participation à l’édition 2013 des TechDays !! Et un grand merci à Julie, Samuel et Julien pour nos sessions communes, hâte de remettre ça en jeu l’année prochaine ^^

    Je profite également de cet évènement pour publier mon premier billet, beaucoup d’autres suivront prochainement ! Be connected.

Page 1 of 1 (12 items)