Using DirectX in Windows Forms
Windows Forms is a Microsoft technology that provides a clean and easy framework for building graphical user interfaces (GUIs) and is both extensible and componentized. However, it is sometimes desirable to have a rich 3D user interface to display 3D data or to allow the user to interact in 3D. DirectX, another Microsoft technology, is a graphics framework with support for 2D and 3D graphics, which supplies an abstraction layer between low-level system components (such as drivers) and high-level applications (such as a GUI or a game). This document will discuss the process of hosting DirectX inside of a Windows Forms application in order to provide seamless integration between the two frameworks for use in GUIs that may be graphics intensive.
Read more
Introducing the XNA Framework and XNA Game Studio Express
Most developers I know decided to enter the computer field and specifically programming because of computer games. Game development can be one of the most challenging disciplines of software engineering-it can also be the most rewarding! Never before has it been possible for the masses to create games for a game console, much less a next generation game console. We are coming in on the ground floor of a technology that is going to experience tremendous growth. Microsoft is leading the way into how content will be created for game consoles. Soon other game console manufacturers will be jumping at a way to allow the public to create content for their machines. The great news for the Xbox 360 is that Microsoft has spent so much time over the years creating productive and stable development environments for programmers. We will be installing one of Microsoft’s latest integrated development environments (IDEs) in this chapter. Before we get to that, let’s take a look at the technology we discuss in this book-XNA.
Read more
GPU programming using .NET languages
Our project, which is called IL Shader, allows writing vertex and fragment programs using general purpose programming languages on .NET platform. Our project is based on three-stage translation. First, MSIL bytecode is translated to assembly language of abstract machine with vector registers. Then we perform some optimization and finally translate abstract machine code to one of assembly language shaders (currently DirectX pixel and vertex shaders). We provide infrastructure that allows using .NET classes as shaders. This project is supported by Microsoft Research grant.
Read more
Programming .NET Windows Applications Drawing and GDI+
The designers of .NET, and especially of Visual Studio .NET, clearly had in mind a model in which you could write sophisticated Windows Applications using only the controls available in the Toolbox. This approach is very successful, and many Windows programmers will never need to go beyond the Toolbox and forms model for building powerful user interfaces. As discussed elsewhere in this book, the Toolbox includes controls for displaying data (labels, DataGrids, Calendars, listboxes, etc.) as well as for offering the user choices (radio buttons, checkboxes, listboxes, etc.) and for gathering data (text boxes, etc.) In addition, several controls and components manage date and time (Timer, etc.) or the form itself (splitter, etc.).
Read more
GDI+ Custom Controls with Visual C# 2005 Working with Images
Ever since Graphical User Interfaces (GUIs) were invented, developers have been keen to use images to make their programs easier to use, and more attractive and intuitive to their users. Images brighten up an otherwise boring and clinical computer screen, and make the general computing experience more enjoyable. Visual support facilitates the information absorption and presentation of up-to-date information. Any user can more easily understand information just by looking at a picture. Images are the most intuitive memories because the human mind in most cases has a visual memory. This means that when you recall a memory it is frequently a visual one. Think briefly of a tree. What comes to your mind first? Is it the roughness of bark, the taste of fruit or nuts, the smell of tree, the rustle of leaves-or is it a picture of a tree?
Read more