Search Results

Search found 704 results on 29 pages for 'directx'.

Page 3/29 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Getting Started with 2d Game Dev (C++): DirectX or OpenGL?

    - by Dfowj
    So, i'm a student looking to get my foot in the door of game development and im looking to do something 2D, maybe a tetris/space invaders/something-with-a-little-mouse-interaction clone. I pointed my searches in the direction of C++ and 2d and was eventually lead to DirectX/OpenGL Now as i understand it, all these packages will do for me is draw stuff on a screen. And thats all i really care about at this point. Sound isn't necessary. Input can be handled with stdlib probably. So, for a beginner trying to create a basic game in C++, would you recommend DirectX or OpenGL? Why? What are some key feature differences between the two? Which is more usable?

    Read the article

  • How do I convert matrices intended for OpenGL to be compatible for DirectX?

    - by gardian06
    I have finished working through the book "Game Physics Engine Development 2nd Ed" by Millington, and have got it working, but I want to adapt it to work with DirectX. I understand that D3D9+ has the option to use either left handed, or right handed convention, but I am unsure about how to return my matrices to be usable by D3D. The source code gives returning OpenGL column major matrices (the transpose of the working transform matrix shown below), but DirectX is row major. For those unfamiliar for the organization of the matrices used in the book: [r11 r12 r13 t1] [r21 r22 r23 t2] [r31 r32 r33 t3] [ 0 0 0 1] r## meaning the value of that element in the rotation matrix, and t# meaning the translation value. So the question in short is: How do I convert the matrix above to be easily usable by D3D? All of the documentation that I have found simply states that D3D is row major, but not where to put what elements so that it is usable by D3D in terms of rotation, and translation elements.

    Read the article

  • Using DirectX Effect11 with Visual Studio 2012

    - by l3utterfly
    I recently updated to Visual Studio 2012 Ultimate. I was programming previously with DirectX 11 June 2010 SDK and want to continue to do so using Visual Studio 2012. However, I discovered that VS2012 comes with its own DirectX SDK (in Windows Kit 8.0) and I've been trying to migrate my code using the newer versions of d3d11. Everything went fine until I try to use effect files in my project (.fx files). I had to compile the Effects11 Sample in the DirectX SDK using VS2012 and link the lib file in my project. That went fine too. However, when I compile my project the function D3DX11CreateEffectFromMemory returns a E_NOINTERFACE error (no such interface is supported). Can anyone tell me why is that? Note that I'm using the d3d11.lib from the Windows Kit and the d3dx11.lib from the DirectX SDK. Perhaps I shouldn't mix them? However, everything else works fine when I mix them, except for the effect file creation. Any help would be appreciated. P.S. I don't know if this is helpful but just so you know, if I add an additional library directory in the project settings of "DirectXSDKInstallPath\lib\x86\" it works. Why is that? Does it mean I'm using the older version of the libraries? This will give a ton of warnings about redefined headers in winerror.h

    Read the article

  • DirectX Desktop

    - by Jonathan
    Hi. I'd like to make an animated desktop background for Windows 7 using DirectX. I'm using C#, SlimDX and a couple of P/Invoke imports of Windows API functions. I'm not brilliant with native Windows programming, but I've had a poke around online and I believe what I need to do is either: 1) Find the handle of the window containing the dekstop wallpaper, hook it up to a DirectX device and draw into it. 2) Make a new output window, and insert it above the desktop wallpaper but below the desktop icons. I've tried both these, but neither seems to work. If I navigate the Window heirarchy starting from the handle returned by GetDesktopWindow(), I can go Desktop - WorkerW - SHELLDLL_DefView - SysListView32. If I hook up a DirectX device to this handle, I can draw over the entire desktop, but it also covers the icons. If I create a Windows form, set its parent to SHELLDLL_DefView using SetParent() and then use SetWindowPos to play with its Z-order I can only seem to get it to go either behind the desktop wallpaper or in front of the desktop + icons. It looks as though the desktop wallpaper is background to the folder view containing the icons, and therefore what I am trying to do cannot work. The only solution then would be to not use the desktop for icons, or to find some alternative, e.g. overwriting the desktop then overlaying a transparent window containing a view of the contents of some folder. Does anyone have any idea of what I should be doing, or even whether what I want to do is possible? It seems you can draw to the desktop background using the GDI (as I believe the wxSnow program does), and I've seen something similar to what I want done by VLC Media Player under Windows XP with its DirectX wallpaper mode (interestingly, I can't seem to get this option enabled on my system). Thanks!

    Read the article

  • Running directx SDK samples on a Windows Mobile 6.1 device

    - by Sil
    I tried to run the directx samples from ..\Windows Mobile 6 SDK\Samples\PocketPC\CPP\win32\directx\d3dm\tutorials on a Samsung Omnia and on the emulator and it doesn't work because of a deployment error. I am using Microsoft Visual Studio 2008 and have installed Windows Mobile SDK Standard and Professional refresh. The device is correctly plugged in and set up for active sync (I know this because other samples work, also a creating Win32 smart device application and running it works). When I try to run a directx sample application it compiles without errors but the message: " There were deployment errors, Continue? Yes/No" appears If I manually copy the application from the debug folder to the device and run it from there, it works. The same deployment error message appears if I try it on an emulator. Other applications are deploying successfully. Is there any way to make the deployment work? Maybe there is an obscure option I need to set... What I do is: Connect the Mobile device to the PC, Open Visual Studio 2008, Open a directx sample project, Click Run (in Debug or Release mode).

    Read the article

  • Differences in cg shader code for OpenGL vs. for DirectX?

    - by Cray
    I have been trying to use an existing library that automatically generates shaders (Hydrax plugin for Ogre3D). These shaders are used to render water and somewhat involved, but are not extremely complicated. However there seems to be some differences in how the cg shaders are handled by OpenGL and DirectX, more specifically, I am pretty sure that the author of the library only has debugged all the shaders for DirectX, and they work flawlessly there, but not so in OpenGL. There are no compiler errors, but the result just doesn't look the same. (And I have to run the library in OpenGL.) Isn't cg supposed to be a language that can freely use the exact same code for both platforms? Are there any specific known caveats one should know about when using the same code for them? Are there any fast ways to find what parts of the code work differently? (I am pretty sure that the shaders are the problem. Otherwise Ogre3D has great support for both problems, and everything is abstracted away nicely. Other shaders work in OpenGL, etc...)

    Read the article

  • Publishing a game -- any way to target both WP7 and Win8 Store?

    - by Rei Miyasaka
    I'm at a dilemma which seems should soon become an important issue for a lot of developers. If I build a game in XNA, I won't be able to publish it on the Windows 8 Store, as it would be a classic application -- and classic applications can't be sold on the store. If I build a game in Metro DirectX, I would be able to sell it on the Store, but porting it to Windows Phone would involve porting it to Reach XNA, which in fact would likely involve more effort even than porting to OS X or Android -- both of which support C++. Of all the WinRT API that is supported on C++/JS/.NET, DirectX can only be programmed from C++. It's also unlikely that Microsoft will update Windows 7 or Vista to support the new DirectX features, although that would make the Metro DirectX the first new version of DirectX to stop supporting the immediate predecessor OS. If I build a game in Pre-Win8 DirectX 9/10/11, I won't be able to sell it on the Windows Store or Windows Phone, but I could sell it on something like Steam. It would also involve the most amount of manual plumbing. In fact, DirectWrite, despite being part of DirectX 11, doesn't talk to Direct3D. I'm getting really tired of all these restrictions -- artificial and otherwise -- and I'm coming to a point where I'm considering switching to a platform with a less fragmented API, like Android or Mac/iOS. As far as bringing a game into market goes, excluding the actual market share of any platforms that I might consider, what other factors would help me in making a decision? Just a few years ago this question was a lot easier to answer: if you were primarily concerned with Windows platforms, all you had to answer was whether you wanted DirectX, XNA, or something like SlimDX. If you made the wrong decision, no biggie -- all you really would have lost is XBox and the fairly small Windows Phone market.

    Read the article

  • DirectX application doesn't work over Remote Desktop

    - by emddudley
    I have a WPF application which has a DirectX component within it. This component does not work over Remote Desktop--it just shows a corrupted image. The application works fine when not using Remote Desktop. In trying to debug the problem I installed the February 2010 DirectX SDK. Now, when I run the program on the computer with the SDK and Remote Desktop to it from a separate computer, the component works just fine. However the opposite does not work--trying to use the application over Remote Desktop when it is running on the computer without the DirectX SDK (it has the original problem with the corrupted image). I have already compared the loaded DLLs (using Process Explorer) between running the application on my SDK machine and non-SDK machine. They both are loading the same DLL versions. What else could be causing this behavior?

    Read the article

  • Take screenshot of DirectX full-screen application

    - by iconiK
    This boggles me. DirectX bypasses everything and talks directly to the device driver, thus GDI and other usual methods won't work - unless Aero is disabled (or unavailable), all that appears is a black rectangle at the top left of the screen. I have tried what other have suggested on several forums, using DirectX to get the back buffer and save it, but I get the same result: device-GetFrontBufferData(0, surface); D3DXSaveSurfaceToFile("fileName", D3DXIFF_BMP, surface, NULL, NULL); Is there any way to get a screenshot of another full-screen DirectX application when Aero is enabled?

    Read the article

  • directx audio video error message in debugmode

    - by clamp
    I have a c#/winforms application that uses directx to play some video and audio. whenever i start my application in debugmode i get this annoying message. i can click "continue" and everything seems to work fine. but i still want to get rid of this message. it does not show up in releasemode. Managed Debugging Assistant 'LoaderLock' has detected a problem in 'C:\pathtoexe.exe'. Additional Information: DLL 'C:\WINDOWS\assembly\GAC\Microsoft.DirectX.AudioVideoPlayback\1.0.2902.0__31bf3856ad364e35\Microsoft.DirectX.AudioVideoPlayback.dll' is attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang.

    Read the article

  • Compiler construction and DirectX

    - by otkins
    Hi! I am a beginner in the process of designing and coding a project, I already have all the ideas on my head, but I have a problem impeding me of continuing this project. I feel the code is ugly and unreadable and I cannot continue it this way. The project is a programming language I have on my mind, and it has small graphics capabilities. Even being beginner, I want to code it using DirectX because everybody wants it. And I want to code it entirely, not depend on any wrapper libraries like SDL. I did a refactoring of the DirectX module and it exposed all the weaks. There is Direct3D code everywhere, but the code itself does very little! I would start building a project like this using DirectX or I should use just GDI and the Multimedia API of Windows? This is a good progress for a beginner?

    Read the article

  • What does SetTextureStage(0, D3DTSS_COLORARG2, 0) in DirectX mean?

    - by Vite Falcon
    I'm trying to convert some DirectX code to Ogre3D and was wondering what the following translates to: pDev->SetTextureStage(0, D3DTSS_TEXCOORDINDEX, 0) pDev->SetTextureStage(0, D3DTSS_COLORARG1, D3DTA_TEXTURE) pDev->SetTextureStage(0, D3DTSS_COLOROP, D3DTOP_MODULATE) pDev->SetTextureStage(0, D3DTSS_COLORARG2, 0) What is the modulation operation happening here? Is the texture getting modulated with the background? Or is it getting zeroed? I've tried searching for what this means and unfortunately I haven't come across anything meaningful. Any help to shed light on this matter will be much appreciated.

    Read the article

  • C# - Hook/Overlay a DirectX game?

    - by Dodi300
    Hello. Can anyone tell me how to hook/overlay a DirectX game in C#? I've tried getting a fullscreen C# window to overlap a game, however it wont. After researching a little, I found out that I need to hook the game and then display the C# window. Can anyone explain how I would do this? Would I be able to display a C# form over a DirectX game?

    Read the article

  • DirectX capabilities on different graphics cards

    - by user9876
    I'm writing a Direct3D application, using DirectX 9. Although it works on my PC, I need to make it work on a wide range of systems. I need to know what capabilities I can expect to see on other systems. Is there a list of the DirectX capabilities that graphics cards support? I've found one site, which I'll post as an answer, but it's a bit out of date.

    Read the article

  • Reverse engineering and patching a DirectX game?

    - by yodaj007
    Background I am playing Imperishable Night, one of the Touhou series of games. The shoot button is 'z', moving slower is 'shift', and the arrow keys move. Unfortunately for me, using shift-z ghosts my right arrow key, so I can't move to the right while shooting. This ghosting happens in all applications, and switching keyboards fixes it. Goal I want to locate in the disassembled code the directx function that gets the keyboard input and compares it against the 'z' key, and change that key to 'a'. I'm considering this a fun project. Assuming the size of the scan codes are the same, this should be fairly simple. And because the executable is only 400k, maybe this will provide a unique opportunity for me to explore the dark side of the computing underworld (kidding). Relevant experience I have some experience with coding in assembly, but not in the disassembly of such. I have no experience with the DirectX apis. Question I need some guidance. I've found a listing of directx keyboard scan codes, and a program called PEExplorer that looks like it will do what I need. Is there a means by which I can turn some of the assembly with C function calls so it's more easily read? I will need to locate where the game retrieves the currently pressed keys, compares those against a list, and it's that list I need to modify. Any input would be greatly appreciated.

    Read the article

  • How to copy depth buffer to CPU memory in DirectX?

    - by Ashwin
    I have code in OpenGL that uses glReadPixels to copy the depth buffer to a CPU memory buffer: glReadPixels(0, 0, w, h, GL_DEPTH_COMPONENT, GL_FLOAT, dbuf); How do I achieve the same in DirectX? I have looked at a similar question which gives the solution to copy the RGB buffer. I've tried to write similar code to copy the depth buffer: IDirect3DSurface9* d3dSurface; d3dDevice->GetDepthStencilSurface(&d3dSurface); D3DSURFACE_DESC d3dSurfaceDesc; d3dSurface->GetDesc(&d3dSurfaceDesc); IDirect3DSurface9* d3dOffSurface; d3dDevice->CreateOffscreenPlainSurface( d3dSurfaceDesc.Width, d3dSurfaceDesc.Height, D3DFMT_D32F_LOCKABLE, D3DPOOL_SCRATCH, &d3dOffSurface, NULL); // FAILS: D3DERR_INVALIDCALL D3DXLoadSurfaceFromSurface( d3dOffSurface, NULL, NULL, d3dSurface, NULL, NULL, D3DX_FILTER_NONE, 0); // Copy from offscreen surface to CPU memory ... The code fails on the call to D3DXLoadSurfaceFromSurface. It returns the error value D3DERR_INVALIDCALL. What is wrong with my code?

    Read the article

  • How should I interpret these DirectX Caps Viewer values?

    - by tobi
    Briefly asking - what do the nodes mean and what the difference is between them in DirectX Caps Viewer? DXGI Devices Direct3D9 Devices DirectDraw Devices The most interesting for me is 1 vs 2. In the Direct3D9 Devices under HAL node I can see that my GeForce 8800GT supports PixelShaderVersion 3.0. However, under DXGI Devices I have DX 10, DX 10.1 and DX 11 having Shader model 4.0 (actually why DX 11? My card is not compatible with DX 11). I am implementing a DX 11 application (including d3d11.h) with shaders compiled in 4.0 version, so I can clearly see that 4.0 is supported. What is the difference between 1 and 2? Could you give me some theory behind the nodes?

    Read the article

  • How to capture the screen in DirectX 9 to a raw bitmap in memory without using D3DXSaveSurfaceToFile

    - by cloudraven
    I know that in OpenGL I can do something like this glReadBuffer( GL_FRONT ); glReadPixels( 0, 0, _width, _height, GL_RGB, GL_UNSIGNED_BYTE, _buffer ); And its pretty fast, I get the raw bitmap in _buffer. When I try to do this in DirectX. Assuming that I have a D3DDevice object I can do something like this if (SUCCEEDED(D3DDevice->GetBackBuffer(0, 0, D3DBACKBUFFER_TYPE_MONO, &pBackbuffer))) { HResult hr = D3DXSaveSurfaceToFileA(filename, D3DXIFF_BMP, pBackbuffer, NULL, NULL); But D3DXSaveSurfaceToFile is pretty slow, and I don't need to write the capture to disk anyway, so I was wondering if there was a faster way to do this

    Read the article

  • Why does DirectX use a left-handed coordinate system?

    - by greyfade
    I considered posting on Stack Overflow, but the question strikes me as being far too subjective since I can't think of a reasonable technical explanation for Microsoft's choice in this matter. But this question has bugged me for so long and the issue keeps coming up in one of my projects, and I have never actually seen an attempt at explaining this: OpenGL uses a right-handed coordinate system, where the +Z part of the world coordinate system extends toward the viewer. DirectX uses a left-handed system where the +Z part of the world coordinate extends into the screen, away from the viewer. I never used the Glide API, so I don't know how it worked, but from what I can gather, it uses a left-handed system as well. Is there a technical reason for this? And if not, is there some conceptual advantage to a particular handedness of a coordinate system? Why would one choose one over the other?

    Read the article

  • Runing directx samples on a Windows Mobile 6.1 device

    - by Sil
    Hi, I tried to run the directx samples from ..\Windows Mobile 6 SDK\Samples\PocketPC\CPP\win32\directx\d3dm\tutorials on m Samsung Omnia and on the emulator and it doesn't work because a deployment error. I am using Microsoft Visual Studio 2008 and have installed Windows Mobile SDK Standard and Professional refresh. The device is correctly plugged in and set up for active sync(I know this because other samples work, also a creating Win32 smart device and running it works) When I try to run the application it compiles without errors but the message: " There were deployment errors, Continue? Yes/No" appears If I manually copy the application from the debug folder to the device and run it from there, it works. The same deployment error message appears if I try it on an emulator. Other applications are deploying successfully. Is there any way to make the deployment work? Maybe there is an obscure option I need to set... Thank you

    Read the article

  • Running directx samples on a Windows Mobile 6.1 device

    - by Sil
    I tried to run the directx samples from ..\Windows Mobile 6 SDK\Samples\PocketPC\CPP\win32\directx\d3dm\tutorials on a Samsung Omnia and on the emulator and it doesn't work because of a deployment error. I am using Microsoft Visual Studio 2008 and have installed Windows Mobile SDK Standard and Professional refresh. The device is correctly plugged in and set up for active sync (I know this because other samples work, also a creating Win32 smart device and running it works). When I try to run the application it compiles without errors but the message: " There were deployment errors, Continue? Yes/No" appears If I manually copy the application from the debug folder to the device and run it from there, it works. The same deployment error message appears if I try it on an emulator. Other applications are deploying successfully. Is there any way to make the deployment work? Maybe there is an obscure option I need to set...

    Read the article

  • Performance of DirectX and Recent Windows Mobile Version

    - by Kevin
    I'm seeing very poor performance while using the managed DirectDraw wrappers for WindowsMobile. Microsoft.WindowsMobile.DirectX.Direct3D I would appear the biggest bottle neck is calling Device.Present() after building up the scene. When using the System.Diagnostics.Stopwatch and running this very trivial exmaple Using Sprites on MSDN I'm seeing it's taking approximately 150ms to call the Device.Present() method. I'm seeing this on my AT&T Tilt and on the emulator. In larger applications such as the UltimateGMan sample it's taking over a second to call this method. Does anyone have any experience with using DirectX on mobile devices? What am I missing? I would prefer to stay in the managed world but if I drop back into C++ would I see better performance?

    Read the article

  • How do I improve terrain rendering batch counts using DirectX?

    - by gamer747
    We have determined that our terrain rendering system needs some work to minimize the number of batches being transferred to the GPU in order to improve performance. I'm looking for suggestions on how best to improve what we're trying to accomplish. We logically split our terrain mesh into smaller grid cells which are 32x32 world units. Each cell has meta data that dictates the four 256x256 textures that are used for spatting along with the alpha blend data, shadow, and light mappings. Each cell contains 81 vertices in a 9x9 grid. Presently, we examine each cell and determine the four textures that are being used to spat the cell. We combine that geometry with any other cell that perhaps uses the same four textures regardless of spat order. If the spat order for a cell differs, the blend map is adjusted so that the spat order is maintained the same as other like cells and blending happens in the right order too. But even with this batching approach, it isn't uncommon when looking out across an area of open terrain to have between 1200-1700 batch count depending upon how frequently textures differ or have different texture blends are between cells. We are only doing frustum culling presently. So using texture spatting, are there other alternatives that can reduce the batch count and allow rendering to be extremely performance-friendly even under DirectX9c? We considered using texture atlases since we're targeting DirectX 9c & older OpenGL platforms but trying to repeat textures using atlases and shaders result in seam artifacts which we haven't been able to eliminate with the exception of disabling mipmapping. Disabling mipmapping results in poor quality textures from a distance. How have others batched together terrain geometry such that one could spat terrain using various textures, minimizing batch count and texture state switches so that rendering performance isn't negatively impacted?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >