Skip to content

Instantly share code, notes, and snippets.

@CartBlanche
Last active May 20, 2016 12:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CartBlanche/5227548 to your computer and use it in GitHub Desktop.
Save CartBlanche/5227548 to your computer and use it in GitHub Desktop.
C++ DirectXTK vs C# XNA/MonoGame
For example do you prefer this C++ DirectXTK code:
std::unique_ptr<DirectX::SpriteBatch> m_pSpriteBatch;
m_pSpriteBatch = std::unique_ptr<DirectX::SpriteBatch>(new DirectX::SpriteBatch(m_d3dContext.Get()));
Or do you prefer this C# XNA/MonoGame code...
SpriteBatch _spriteBatch;
_spriteBatch = new SpriteBatch(graphicsDevice);
Thanks to @TomSpilman for the C++ code snippets.
@damian-666
Copy link

damian-666 commented May 20, 2016

m_pSpriteBatch = std::unique_ptrDirectX::SpriteBatch(new DirectX::SpriteBatch(m_d3dContext.Get())) <---noooo not any more. we are going back. I embraced COM, i needed it for interop, but i lost a team because they didnt think COM as exactly Java and they were right its hidious secret code. but i dont think c++ are object, headers and libs are a huge pain. some famous looked at the hello world for direct x and make a joke. its no joke, i might starve , i don't get a day off.! so please keep the managed stuff going.. and we konw windows 7 will be there for a long time.

I started my career in assembly making code for a Vice 20, 3583 bypes free.. using tricks..poking code to poke other poke , unloading it, DOING THE SAME MISERABLE THIS NOW!.. after 2 months research, i need to be studying running solver preconditions and moving multi grid . Nowi i have a smooth side scroller, in SL 5 and between sl4 and 5 i got 40% graphics update speed, they led us to beleive it was for keeps. Im still using it. there is alot out there for it. there is nothing yet to replace it. Windows 7 will be there and i need to support it... and 8 too.. I have 11 man years of code. so.. i am struggling to figure which shader thing to use to work with shaders. i want canvas, but the writeable bitmaps in it and the 3d in it. no full screen. macOcs and anything else. C# is in uniity. its runs games. we dont have time for c++ for games. we are not 30 men teams at Adobe. I need to make it fite in 96? instructions to make SL 5 and Mac support. i love the canvas, although i though i should be like a scene graphic, why not cull at least for me. I looked at the direct x smallest usable starter game thing and its telling me i need to mange memoryNo...sir.. thats general stuff. For example, at Autodesk, there a a raster pileline that never allocates more than the screen. to load a huge blueprint at 1bit per pixel tiff... It gave realtime pan and zoom of raster as if they were vectors.. I will check out the deep zoom.. and i hope its similar.. this isi not a mipmap . this is a resampling that takes place at any resolution, with any huge file on disk ( or better, streaming) . Also a canvas should do basic culling, not draw what is off screen, or have the option to do do. iOS uses retained mode.. you can ingore it , or put a camera and use it.

--so a zoomable raster engine also.. unity is good. i use a wpf tool and a silverlight game and its not been too bad a setup..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment