Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Everything posted by Spazzarama

  1. (J.K already knows this, but for anyone else that stumbles across this)   The issue is that Visual Studio 2015 has changes to the MeshContentTask. Also the version in that download has conditions for VS 11.0 and 12.0.   You also cannot copy the Visual Studio 2015 version directly without some changes (it is designed for a C++ project). I have attached an updated version to https://github.com/spazzarama/Direct3D-Rendering-Cookbook/issues/4 and will be committed to the repository once it has been made backwards compatible.
  2. Spazzarama

    Recommeneded books for directx (C#)

    Hi Nitewalkr, I wrote a book a couple of years ago around Direct3D 11 and C# using SharpDX - Direct3D Rendering Cookbook, you can also find a heap of SharpDX tutorials that have been translated from the C++ rastertek tutes (somewhere on this forum from memory).
  3. Spazzarama

    take screenshot on secondary screen

      Yes it is possible, however it will depend what is on there as to the approach. If you want to capture the second screen regardless of what is shown there, then you might need to look down the road of mirror drivers and the like (or more traditional desktop capture approaches). If a fullscreen Direct3D window is being shown on the 2nd display then you might need to look at grabbing the image from Direct3D.   If the 2nd screen is showing the desktop, I don't think using the DirectX approach isn't going to work unless you are working with the DWM.   You may need to implement more than one approach to handle all the scenarios, but again we don't know what you are trying to do exactly.   Just a tip - capturing from the front buffer is always going to be slow, and capturing from the backbuffer from 3rd party apps is usually done through hooking (take a look at the Direct3DHook project in my signature).   Other approaches include a mirror display driver but I don't have much experience with these.
  4. I know you are currently using WinForms, however I would highly recommend trying out XAML (i.e. using WPF) - at least so you can see the difference between the two approaches. WPF is designed for dealing with this sort of layout stuff, you can bind the visibility of panels to properties on your view model, you can even implement animation transitions completely within XAML (i.e. slide in/out with almost zero coding). It has a steep learning curve but is really flexible and powerful - it might also be worth taking a look at some MVVM tutorials for WPF but this might be a bit advanced for right at the moment.   Good luck!
  5. Could you please elaborate on what you are trying to protect, your application, or your user's system?   I would probably read that caution as "don't rely solely on CAS".   You can provide a handler for the AppDomain resolve assembly name / type, and prevent particular types/assemblies from being accessed in your AppDomain. This might also help you prevent reflection from bypassing a whitelisting implementation (e.g. restrict access to the reflection types).   Btw, reflection can let you mess with non-public members as well, so don't ignore that.   Maybe all this combined with a "peer review/approved" approach to marking safe maps/plugins would be enough - then the user can be warned about the dangers of using a particular extension.   Add-ins might also be of interest: https://msdn.microsoft.com/en-us/library/bb384200.aspx and https://msdn.microsoft.com/en-us/library/bb355219.aspx
  6. Spazzarama

    Direct3D11 Multithreading

    As @MJP said you are unlikely to gain much performance using deferred contexts with D3D11 *unless* you are doing a lot of CPU intensive work that for whatever reason you cannot separate from your rendering logic *and* can actually be parallelised.   I've got a C#/SharpDX example https://github.com/spazzarama/Direct3D-Rendering-Cookbook/tree/master/Ch10_01DeferredRendering. You may need to take a good look at the code to work out how to drive it as it is assumed you are reading the book at the same time.
  7. I've just uploaded my Direct3D Rendering Cookbook projects to GitHub for ease of access. These projects are written in C# using SharpDX and can be built in VS2012 / VS2013+.   I'll be updating these projects to support current SharpDX releases, however for anyone wanting to try their hand at using SharpDX they provide a good starting point as is.   Cheers, J
  8. Here's the project list by chapter:   Chapter 1: Getting Started with Direct3D Building a Direct3D 11 application with C# and SharpDX .\Ch01_01EmptyProject\ Initializing Direct3D 11.1 device and swap chain .\Ch01_02Direct3D11_1\ Debugging your Direct3D application .\Ch01_03Debugging\ Chapter 2: Rendering with Direct3D Building a simple rendering framework .\Common\Common.csproj Rendering primitives .\Ch02_01RenderingPrimitives\ Adding texture .\Ch02_02AddingTexture\ Chapter 3: Rendering Meshes Cube and Sphere .\Ch03_01CubeAndSphere\ Material and Lighting .\Ch03_02MaterialAndLighting\ Material and Lighting with cube mapping .\Ch03_02WithCubeMapping\ Load mesh from file .\Ch03_03LoadMesh\ Chapter 4: Animating Meshes with Vertex Skinning Vertex Skinning .\Ch04_01VertexSkinning\ Bone Animation .\Ch04_02Animate\ Chapter 5: Applying Hardware Tessellation Tessellation basics .\Ch05_01TessellationPrimitives\ Tessellation of a mesh .\Ch05_02TessellatedMesh\ Chapter 6: Adding Surface Detail with Normal and Displacement Mapping Displacement Mapping .\Ch06_01DisplacementMapping\ .\Ch06_01DisplacementMapping_TangentSpace\ Displacement Decals .\Ch06_02DisplacementDecals\ Chapter 7: Performing Image Processing Techniques Image processing (compute shaders) .\Ch07_01ImageProcessing\ Chapter 8: Incorporating Physics and Simulations Physics (with BulletSharp) .\Ch08_01Physics\ Particles (compute shaders with append\consume buffers) .\Ch08_02Particles\ Chapter 9: Rendering on Multiple Threads and Deferred Contexts Multithreaded rendering - benchmark .\Ch09_01Benchmark\ Multithreaded Dynamic Cube Environment Map .\Ch09_02DynamicCubeMapping\ Multithreaded Dual Paraboloid Environment Mapping .\Ch09_03DualParaboloidMapping\ Chapter 10: Implementing Deferred Rendering Deferred rendering .\Ch10_01DeferredRendering\ Chapter 11: Integrating Direct3D with XAML and Windows 8.1 Direct3D CoreWindow Windows Store app .\Ch11_01HelloCoreWindow\ Direct3D SwapChainPanel Windows Store app .\Ch11_02HelloSwapChainPanel\ Loading resources asynchronously .\Ch11_03CreatingResourcesAsync\
  9. Spazzarama

    [SlimDX] Screencapture directX problem

      I prefer SharpDX for this exact reason! It is much easier to include with your own deployment, you can also even use ILMerge if necessary to incorporate it into your own assembly.
  10. Spazzarama

    Vector graphics

    For a 2D app it makes it heaps easier if your original assets are vector images to begin with so that you can save them off at the different resolutions necessary - assuming that you need to target a range of resolutions (but personally I found it useful even just to get the icons done, splash screens and other assets necessary for release etc etc etc). Of course you don't have to and I don't think Unity has in-built vector graphic support so you would be saving the images off as raster graphics (but I think there are various attempts to support this on the Unity 3D asset store) - I would take a look over at their forum or perhaps ask there too.
  11. Spazzarama

    Need help with Cameras

    Has it ever worked?   I'm not a wiz with Math so stepping through Matrix calculations is always a very time consuming method for me to check if they are what is expected or not   Therefore I like to do a sanity check and create the most simple version first. I.e. just facing forward from origin or something equally basic, if that works then introduce your rotation calculations and so on until it fails again. The problem could be your camera class, or it could be a shader, who knows.   Btw is this SharpDX? What version? etc... you might need to help us with more info to help you.
  12. Spazzarama

    Second programming language...

    Why learn only one or two? Dabble in it all, work out what you like about each. It will all make you a better programmer in the end (and it sounds like you have plenty of years ahead of you yet). Btw I'm coming from the opposite end with 14 years OF commercial programming experience - hmm been a long time since I was 14
  13. Spazzarama

    Best Computer Type for Game Dev?

    I know you don't need it at the moment and perhaps a bit pricey for what you want to achieve right now, however I find it helpful using a MacBook with Bootcamp for dual booting into Windows also. This allows me to develop and test games for Windows, Mac and iOS (and Android).
  14. There are many non-hack related reasons for wanting to show an overlay within a game. Yes you generally hook EndScene (for DX9 at least).   You can find a half decent overview of how to do this on my blog here. The corresponding project is on GitHub here. This example is in C# however using SharpDX and EasyHook.
  15. Switching shaders in and out doesn't require recompiling each time, you still only need to compile each one once. Assuming you don't have to change the logic within the shaders each iteration.
  16. You could include a header within your message protocol that allows you to determine the type of message, and therefore the correct datatype to be read.
  17. Spazzarama

    C# book recommendations for beginners?

    Always good to have a few good books on the subject, you may also like to take a look at: online C# tutorial (if you can handle the ads), and another. CodeCompile's General Programming channel on YouTube (there's another channel there about using Unity3D too if of interest)  lots of others.. Once you know enough to ask the right questions you will find a lot of what you want to know using your favourite search engine.
  18. Spazzarama

    Is C# in Unity3D worth learning?

    Yes there are other great engines out there, including C# based ones (e.g. Paradox3D). A quick search for popular game engines will help you find others (e.g. UE4, CryEngine, Unity, GameMaker, etc) - here is "someones" top 16 list for 2014.   Unity3D is a great place to start, not only because it is a great engine, but because there is a large on-line community. Most questions you would have are already answered and easily found with a quick Google. I doubt there would be much you cannot achieve with Unity.   With any language choice you are going to come up against the die-hard yes/no for this or that. I personally love C# and .NET in general and recommend giving it a crack - it is arguably easier to learn than C++ for newcomers, while still providing most of the same constructs (plus others) and involving the same concepts. So even if it is just a stepping stone for you yes I would say it is worth it (although like frob said I wouldn't necessarily recommend trying to learn programming from scratch from within a game engine).   Ultimately your choice should be based on the context of what you are trying to achieve, always keep this in mind, just because someone else says that engine X is more betterer than engine Y doesn't mean it will suite your specific needs any better. If learning is the goal, perhaps try a few out (trials or whatever), see what each of them gives you over others, every extra bit of knowledge you glean will help you down the road.   Good luck!
  19. Spazzarama

    Ludum Dare #31

    Screens from my Ludum Dare #31 entry http://ludumdare.com/compo/ludum-dare-31/?action=preview&uid=46554
  20. From the album: Ludum Dare #31


    © Justin Stenning

  21. From the album: Ludum Dare #31


    © Justin Stenning

  22. From the album: Ludum Dare #31


    © Justin Stenning

  23. Spazzarama

    SlimDx - ResolveSubresource

    I have almost identical code using SharpDX (and previously worked with SlimDX), everything you are doing looks ok. The only differences I have here are that I am always passing 0 as the source and dest index (I'm not sure whether what you have would be coming through as 0 or not), and I have no need to bind to the pipeline so it has no BindFlags. Here is the example in case it helps: // texture is multi-sampled, lets resolve it down to single sample textureResolved = new Texture2D(texture.Device, new Texture2DDescription() { CpuAccessFlags = CpuAccessFlags.None, Format = texture.Description.Format, Height = texture.Description.Height, Usage = ResourceUsage.Default, Width = texture.Description.Width, ArraySize = 1, SampleDescription = new SharpDX.DXGI.SampleDescription(1, 0), // Ensure single sample BindFlags = BindFlags.None, MipLevels = 1, OptionFlags = texture.Description.OptionFlags }); // Resolve into textureResolved texture.Device.ResolveSubresource(texture, 0, textureResolved, 0, texture.Description.Format);
  24.   Just make sure you wrap these in using blocks otherwise you will leak memory (if doing lots of screenshots). using (...) { }
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!