I want to know if we can develop C#, WPF application using DirectX 11. I have an application (medium size) which is written using DirectX. We need to use features from Directx 11 like parallel rendering. Is it possible to develop applications using DirectX 11? If yes can anyone provide me some sample application for that? We can't go for other options like SlimDX as we can't afford to rewrite whole code.
Please suggest what is the best option for me?
I haven't tried using C# with DirectX myself, but from what I've read, your main options for DirectX and C# are either SlimDX (which you count out) or XNA, which many users seem to find lacking in features, especially from the newer versions of DirectX.
Related
I have an idea to develop a website that would help people to model 3D worlds, use 3D models and so on.
For example, based on my reseach, I could use Unity Framework to create this type of application for PC/MAC.
I am wondering if there are similar frameworks available for pure WEB?
This is my first time looking into this and I do not have any expertize in this topic. Please advise if you have any opinions or expertise in it.
Unity indeed has support for 3d on web, but it requires from user that it has installed Unity player. Users might not like that.
However, with webGL, you would have absolute control over the look and capabilities of your product, users wouldn't have to install anything new, it would all be pure web and only IE users would be damaged, because IE still doesn't have full support for webGL.
To develop with webGL you can do it from scratch, or you could use some of the existing libraries/3D engines that would speed up your work and give results much faster.
Here's a list of webGL engines: http://ffwd.typepad.com/blog/2011/04/webgl-what-flavor-is-your-engine.html, it seems that most used are Three.js, Scene.js and there is also Goo Engine (http://www.gooengine.com/).
Hope this helps.
Check out 3DTin, it does seem to deliver a part of what you want to build, using WebGL:
http://www.3dtin.com/
If I write a DirectX 11 application using the DX11 SDK, and I don't have a DirectX card, will I be able to run the application?
I can't find the requirements for actually using the DX11 SDK.
Thanks!
Yes you can. What you are looking for is called Direct3D feature levels. With this
paradigm you can write an application with the features supported by your graphic card. Before the creation of the D3D device you can query the card and find the feature level supported, then you use this level in the device creation.
Of course you cannot use the new features provided by DirectX 11 on your hardware.
This tutorial site states that when setting up a device and swap chain, a D3D_DRIVER_TYPE of D3D_DRIVER_TYPE_REFERENCE can be used to allow DX11 features
to be explored even if you don't have a DX11 graphics card.
For further reading, click that link and scroll down halfway until you see D3D11CreateDeviceAndSwapChain().
I would like to have a go at making some simple games for personal/learning purposes. By simple games I mean games like platform, maze, arcade games for example. I would also one day like to create a platform game with a simple editor to allow others to edit and design their own game levels.
I am not sure if Delphi is the way to go though, I don't see or hear many people writing games in Delphi, but Delphi is the only language I understand on an intermediate level.
If Delphi is acceptable to create simple games as I mentioned, am I right in thinking that I would require some libraries that would help me do this, maybe Direct X for example?
I am using Delphi XE, I wish I had waited and upgraded to Delphi XE2 instead as it seems that includes some built in Drawing libraries.
I look forward to hearing your responses on this.
Thanks.
Check out Asphyre
And to encourage you; Soldat, C-evo and many more quality games were built with Delphi, Game Maker too.
There are to many options ...
If you are really new to this take a look at this site and get some good examples from children that try to make games Pascal programming for schools ...
If you are one level up here some library's that give you the a great start for small and big games... this is for new and very advance pascal programming...
GLScene just get the svn version... (Windows,MacOsX,Linux and hear for android and iphone ;) ) -- 2D,3D,isometric........
CastII Great engine (Windows,MacOsX,Linux) -- Mostly 3D....
Asphyre Sphinx 2 One of my favorite i allready start a big big game with that library... NOW (Windows32-64,MacOsX,Linux,and IOS) with DelphiXE2
ZenGL Fantastic and quite easy to use (Windows,Linux,MacOsX and i hear android too) --Mostly 2D but i hear 3D is in way out...
Castle Great library for me not to easy... (Windows,Linux,MacOsX) compine great with freepascal and lazarus...
Andorra 2d This is going to be the best but suddenly stops ... 2d programming at its best...
there are many other libraries and i here a few of them come out before the new year...
But if you go deeper you can try the hard way... the headers so ...
for opengl use the header from here delphigl
for SDL use the Jedi-SDL header (great by the way)...
for directX use the clootie and good luck...
But the most important thing in the game programming is the paper...
Every think write in the paper is the most value object in object programming...
Hope that helps...
Delphi is great for games! Here is a very good resource to get you started: http://www.pascalgamedevelopment.com/
It has a friendly forum where you can ask questions.
I have personally used Delphi for graphics programming for many years and written a free open source game engine in Delphi called ZGameEditor.
azrael11
GLScene doesn't support Android(work in progress as I know)
Cast II works only on Windows
Asphyre Sphinx 2 doesn't support Linux
ZenGL supports also iOS. Android - work in progress. 3D - I'm not interested in it currently, so only fast 2D is main goal.
I've been reading about Andrew Russell's ExEn project and I'm wondering what the flow would be like for creating a WP7 accelerometer-based game and then porting it to another platform, say iOS. Here's what I hope would happen:
Create fully functional game in XNA, avoiding dependance on device
specific items like the 'back' button.
Run the project through ExEn (I have no idea on how this would
happen), creating fully functional iOS game.
Run game on iPhone.
Sorry for that pitiful outline, but I just don't have a solid high-level view after reading about it.
Also, being software conversion, surely it wouldn't totally work. How would you iron out the wrinkles? I assume you'd have to know iOS or Android fairly well to pin it down.
Anyway, if anyone can move me one step closer I would appreciate it.
ExEn is an implementation of a subset of the XNA API that runs on different platforms (including iOS and Android). Put simply, it makes the classes and methods that you use when writing XNA code available to you on these other platforms. (Plus appropriate instructions, examples, etc.)
When using ExEn, the bulk of your code should simply "just work". However in most real-world cases you will need to write at least some platform-specific code (and probably provide some platform-specific assets). In particular to support different device resolutions, and also in cases where you use XNA features not available in ExEn.
At time of writing, ExEn does not implement the XNA/WP7 APIs for accelerometer support. At some time in the future they may be added (either by me or anyone who wants to contribute a patch). ExEn is distributed as source code, so you could even add the necessary support yourself.
The alternative would be to write platform-specific code for the parts of your game that query the accelerometer. Using ExEn does not prevent you from also using the APIs of the underlying platform.
ExEn (on iOS and Android) runs on top of Xamarin's MonoTouch and Mono for Android products. These two products provide C# bindings for the underlying platform APIs. Also, much like ExEn implements the XNA APIs, Mono implements the .NET APIs. These products also provide you with the tools you need (IDE, compiler, debugger, etc).
So the iOS API that you would use is UIAccelerometer (doc). This is exposed in C# via MonoTouch.UIKit.UIAccelerometer (doc). I'll leave looking up the Android equivalents as an exercise.
You can't expect:
porting a game to other platform and don't modify it.
porting a game with special platform inherent abilities to other platform that lacks this abilities, or vice versa
GPGPU is the principle of using the parallel processors on video cards for massive increases in performance.
Does anyone have any ideas about using GPGPU in Delphi, using either OpenCL or CUDA? CUDA was/is NVidia only, but they have also adopted the OpenCL "standard".
I found a few Delphi samples from Google searches but they either crash or don't compile/run.
The ultimate instruction sample would be:
Download and install the OpenCL DLLs from here.
Download the OpenCL SDK from from here.
Download this sample Delphi project from here.
Open and compile the Delphi project. If all goes to plan it will do "whatever it is supposed to do"
At that stage I can then start researching the OpenCL SDK and writing/compiling DLLs to call from any Delphi app.
This sort of stuff is really starting to take off. Embarcadero do not have to do anything themselves at this stage (unless they want to), but if there were a tutorial and samples for Delphi available it would be great. Many samples are available for other languages, but we do also need a good and simple Delphi example to show how easy it is to use Delphi for GPGPU apps.
CUDA is still nVidia only, and that won't change. OpenCL is a true standard in this case, not only limited to GPGPU.
As for using it in Delphi, all I know of is how to use it in Free Pascal. However, there's quite some chance that the code will be portable, here's a link to updated headers:
FreePascal Mantis RFE OpenCL
As for DLL's, if you use nVidia, they can be found here.
Here however we have a sample project in Delphi.
You could be interested in GPGPUonDelphi2007.
GPGPU example plus needed OpenGL and CG libraries for Delphi 2007 now available!
I created the necessary OpenGL and CG (delphi) packages yesterday and finished converting/translating/porting a C GPGPU OpenGL/CG example to Delphi today, and I would like to share it with you so that maybe some more (Delphi) people will look into GPGPU programming, especially with OpenGL 3.0 for (older) DX9 graphics cards.
You should use CUDA DELPHI
In native pascal code you can run CUDA kernels
I made a floating point test, using OpenCL and Delphi, some time ago:
https://plus.google.com/110131086673878874356/posts/eWcipK16MV7
(contains link to demo and sources)