directx

How to use DirectX.DirectInput in XNA

走远了吗. 提交于 2019-12-20 05:15:40
问题 joystick.cs using System; using Microsoft.DirectX.DirectInput; namespace gameproject { /// <summary> /// Description of device. /// </summary> class joysticks { public static Device joystick; public static JoystickState state; public static void InitDevices() //Function of initialize device { //create joystick device. foreach (DeviceInstance di in Manager.GetDevices( DeviceClass.GameControl, EnumDevicesFlags.AttachedOnly)) { joystick = new Device(di.InstanceGuid); break; } if (joystick ==

How to use DirectX.DirectInput in XNA

你离开我真会死。 提交于 2019-12-20 05:15:28
问题 joystick.cs using System; using Microsoft.DirectX.DirectInput; namespace gameproject { /// <summary> /// Description of device. /// </summary> class joysticks { public static Device joystick; public static JoystickState state; public static void InitDevices() //Function of initialize device { //create joystick device. foreach (DeviceInstance di in Manager.GetDevices( DeviceClass.GameControl, EnumDevicesFlags.AttachedOnly)) { joystick = new Device(di.InstanceGuid); break; } if (joystick ==

How to write a web browser plugin for IE, Firefox and Chrome

廉价感情. 提交于 2019-12-20 02:33:14
问题 I need to write a web browser plugin that supports IE 7+, Firefox 3+, Chrome. This plugin has to be able to place a DirectX object in a web page. I have no experience with plugins. I did some investigating and decided to do it with FireBreath. I couldn't understand the way to place an image inside the plugin area. Can someone provide example? How do I place a DirectX object there? Any example? How do I trigger automatic installation? Thanks! Sara 回答1: Well, there are two problems you have to

Skeletal animation of DirectX files in OpenGL

蓝咒 提交于 2019-12-19 10:09:44
问题 I'm trying to import *.x files to my engine and animate them using OpenGL (without shaders for now, but that isn't really relevant right now). I've found the format reference at MSDN, but it doesn't help much in the problem. So - basically - I've created a file containing a simple animation of a demon-like being with 7 bones (main, 2 for the tail, and 4 for the legs), from which only 2 (the ones in the right leg) are animated at the moment. I've tested the mesh in the DXViewer, and it seems

DirectX programming in C?

微笑、不失礼 提交于 2019-12-19 07:53:23
问题 In the past I have created DirectX applications in the C++ programming language, however, I would like to know if it is possible to do this using the C programming language. Thanks. 回答1: Yes it is possible. DirectX exposes a COM interface and C is capable of consuming them. It won't be a whole boat load of fun though! 回答2: The Open Watcom C/C++ compiler comes with DirectX sample applications in both C++ and C. Both work. They are under WATCOM\samples\directx\cpp and WATCOM\samples\directx\c

How to get around the warning “rvalue used as lvalue”?

蹲街弑〆低调 提交于 2019-12-19 06:18:47
问题 I'm using this tutorial, but when I compile the code from it: D3DXMatrixLookAtLH( &matView, &D3DXVECTOR3(0.0f, 10.0f, 0.0f), // warning C4238 &D3DXVECTOR3(0.0f, 0.0f, 0.0f), // warning C4238 &D3DXVECTOR3(0.0f, 0.0f, 1.0f) // warning C4238 ); I get: warning C4238: nonstandard extension used : class rvalue used as lvalue What is the proper (warningless) way of doing this without additional lines of code? Also, I'm wondering what is so bad about that line of code? Why does it even give warning

How to get around the warning “rvalue used as lvalue”?

僤鯓⒐⒋嵵緔 提交于 2019-12-19 06:18:06
问题 I'm using this tutorial, but when I compile the code from it: D3DXMatrixLookAtLH( &matView, &D3DXVECTOR3(0.0f, 10.0f, 0.0f), // warning C4238 &D3DXVECTOR3(0.0f, 0.0f, 0.0f), // warning C4238 &D3DXVECTOR3(0.0f, 0.0f, 1.0f) // warning C4238 ); I get: warning C4238: nonstandard extension used : class rvalue used as lvalue What is the proper (warningless) way of doing this without additional lines of code? Also, I'm wondering what is so bad about that line of code? Why does it even give warning

SlimDX/DirectX9/C# - How to access pixel-data in a Texture

一笑奈何 提交于 2019-12-19 03:13:36
问题 This is my first question ever on StackOverflow, hurray! I can honestly say I use StackOverflow on daily basis for both my work and personal programming mysteries. 99,9% of the time I actually find the answer I need on here too, which is great! My current problem actually stumped me a little as I can't seem to find anything which actually works. I've already read several posts on GameDev.net and found other resources around the net but can't sort it out. I am in the process of porting a small

Is DirectX on Java possible?

自古美人都是妖i 提交于 2019-12-18 20:54:18
问题 Is there an easy way to use DirectX in Java? In particular, DirectX's video APIs. I know that C# might be a more natural choice, but I have my devious reasons for wanting to do something so perverse. 回答1: I don't know about easy, but you could always use JNI to load the DirectX libs and invoke the methods. Using something like Swig you could auto-generate a lot of the code. Not sure how workable something like that would be though. 回答2: There seems to be a standard API about dealing with 3D

Is there a SharpDx Template, for a Windows Universal App?

与世无争的帅哥 提交于 2019-12-18 17:30:22
问题 I tried to write a game for Windows and Windows Phone 8.1, with SharpDx. But when I try, to add a Windows Phone 8.1 Version to my already existing Windows 8.1 Game, I get a few errors and the App doesn't work. Now the question: Is there an SharpDx Template in XNA Style for a Windows Universal App, like the Template I got for my only Windows 8.1 Game (from the SharpDx Visual Studio Extension)? 回答1: No there isn't, yet. What you should do is open an issue (https://github.com/sharpdx/SharpDX