Angella Andrea - English Blog

Infinite passion for software development !
posts - 15, comments - 20, trackbacks - 16

sabato 29 maggio 2010

Adding libraries and headers in Visual C++ 2010

When you need to use a library in your C++ application you should tell the following things to the compiler:

  1. The name of the lib file
  2. The folder where to find the lib file
  3. The folder where to find the header file

In this post, I show how you can do this using Microsoft Visual Studio 2010. All the options are available as Properties of your current project.

Right click the project name under the Solution Explorer and select Properties from the dropdown menu:



You can add all the names of your libraries in the “Configuration Properties –> Linker –> Input“ section:



At the end, you can set the lib folders (“Library Directories”) and the headers folders (“Include Directories”) in the “Configuration Properties –> VC++ Directories” section.



posted @ lunedì 1 gennaio 0001 00:00 | Feedback (1) | Filed Under [ C++ ]

XNA – DirectX Capabilities Viewer

If you want to know the capabilities available in your graphics card you can use a tool in the DirectX SDK\Utilities\Bin\x86.

This tool is called “DXCapsViewer.exe”.

Here a screenshot with the capabilities of my NVIDIA GeForce 8600M GT:



You can download the latest DirectX SDK at the following link:

posted @ lunedì 1 gennaio 0001 00:00 | Feedback (1) | Filed Under [ XNA ]

XNA – Multisampling

Multisampling is an antialiasing technique directly supported by DirectX and obviously by XNA. The problem of aliasing occurs when you draw a line on a monitor with low resolution. In that cases you see a stair step when approximating a line by a matrix of pixels. Multisampling use neighbouring pixels (called samples) to calculate the final color of a pixel.

You can enable multisampling in XNA in this simple way:

graphics.PreferMultiSampling = true;

Then you should also specify two options.

The type is an enumerator (MultiSampleType) that represent the number of samples to use in multisampling. The quality is an integer that represent the quality level. This value is always set to zero. Before to set the type of multisampling you should always check if the graphic adapter support it using the method adapter.CheckDeviceMultiSampleType()

graphics.PreparingDeviceSettings += new EventHandler<PreparingDeviceSettingsEventArgs>((sender, e) => 
PresentationParameters parameters = e.GraphicsDeviceInformation.PresentationParameters;
parameters.MultiSampleQuality = 0;

#if XBOX
pp.MultiSampleType = MultiSampleType.FourSamples;

GraphicsAdapter adapter = e.GraphicsDeviceInformation.Adapter;
SurfaceFormat format = adapter.CurrentDisplayMode.Format;

if (adapter.CheckDeviceMultiSampleType(DeviceType.Hardware, format, false, MultiSampleType.FourSamples, out quality))
parameters.MultiSampleType = MultiSampleType.FourSamples;
else if (adapter.CheckDeviceMultiSampleType(DeviceType.Hardware, format, false, MultiSampleType.TwoSamples, out quality))
parameters.MultiSampleType = MultiSampleType.TwoSamples;


For more information:

posted @ lunedì 1 gennaio 0001 00:00 | Feedback (2) | Filed Under [ XNA ]

XNA – Nuclex Framework

I would like to inform you that an interesting stable project is available on codeplex. This is the Nuclex Framework.

This is the main page of the project:

The more interesting features for me are the following:

posted @ lunedì 1 gennaio 0001 00:00 | Feedback (0) | Filed Under [ XNA ]

Powered by:
Powered By Subtext Powered By ASP.NET