Jump to content
  • Advertisement

cozzie

Member
  • Content count

    1951
  • Joined

  • Last visited

Community Reputation

5036 Excellent

1 Follower

About cozzie

  • Rank
    Contributor

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. cozzie

    IDXGISwapChain::Present crashing

    Do you get a HRESULT back from the present call, or doesn't it come to that point? (perhaps a code paste to see what you're doing)
  2. For future reference/ who's interested, answer from the GD chat: - because in this case you use the same RT for 3D and 2D, it's better to prevent trying to do stuff with the same resource and get possible conflicts. Therefor option 1 is preferred (could also be 2D first, then 3D, as long as you either BeginDraw after 3D is done, or EndDraw before you draw 3D) @jpetrie: thanks!
  3. Thanks.Good to know different strategies that can be used. Do you know if the moment when you call BeginDraw/EndDraw on the D2D RT, has any influence? (As in the original post/question)
  4. cozzie

    Why are member variables called out?

    I think it's very use-case specific which ones 'win' in logics to give them a prefix/convention, so I always do both. The tricky thing when you only apply it for example to member vars OR function parameters, how would you then distinguish local vars within member functions :)
  5. cozzie

    Why are member variables called out?

    First of all, I don't think it's a nonsense topic :) In the end I think it all depends on your preference and the team's 'playing rules'/ coding conventions. Personally I'm a prefix guy, all my members are prefixed with m, e.g. mWorldPos, mWorldMat etc. And function parameters for me are always pSomething (which can also be interpreted as pointer,but in my case it isn't perse :)) For all conventions, I think if it's in your system/ head, it helps. For me seeing mSomething is directly clear that it's a member variable (Without thinking about it), same for pSomething.
  6. Hi all, I was wondering it it matters in which order you draw 2D and 3D items, looking at the BeginDraw/EndDraw calls on a D2D rendertarget. The order in which you do the actual draw calls is clear, 3D first then 2D, means the 2D (DrawText in this case) is in front of the 3D scene. The question is mainly about when to call the BeginDraw and EndDraw. Note that I'm drawing D2D stuff through a DXGI surface linked to the 3D RT. Option 1: A - Begin frame, clear D3D RT B - Draw 3D C - BeginDraw D2D RT D - Draw 2D E - EndDraw D2D RT F - Present Option 2: A - Begin frame, clear D3D RT + BeginDraw D2D RT B - Draw 3D C - Draw 2D D - EndDraw D2D RT E- Present Would there be a difference (performance/issue?) in using option 2? (versus 1) Any input is appreciated.
  7. Sure, no problem. Not being on GitHub has no thought through reasons, just didn't see benefits yet. Currently on the job, I'll make a ZIP and put it on my FTP tonight (and send you the link, using contact details on GitHub).
  8. @Baldur: I did some additional testing, in short: - D2D RT BeginDraw = OK - D2D RT DrawText = OK - D2D RT EndDraw -> crashes the executable within Renderdoc (no crash in VS debug, or debug EXE outside of VS) I also tried to catch the HRESULT of the EndDraw call, but it seems to crash during the call itself, so doesn't finish it (and doesn't return a HRESULT). What would be the way to go to see if this is solvable? (didn't use GitHub earlier, but could dig into it for sure if needed :))
  9. Hi. Nice to meet the one responsible Really love your application for debugging my 3d engine. I just tried the nighly build dated 13th of May, unfortunately both test applications (using D2D), crash when I try to run them through renderdoc. When I comment out the D2D part, it doesn't crash. Some debugging learned me that it's somehow related to the D2D rendertarget, being nullptr/ invalid at some point. Creating the D2D/DirectWrite factories, brush etc. all works fine. I'll give it some more tests, if I figure it out, I'll let you know.
  10. Hi all, Last week I noticed that when I run my test application(s) in Renderdoc, it crashes when it enable my code that uses D2D/DirectWrite. In Visual Studio no issues occur (debug or release), but when I run the same executable in Renderdoc, it crashes somehow (assert of D2D rendertarget or without any information). Before I spend hours on debugging/ figuring it out, does someone have experience with this symptom and/or know if Renderdoc has known issues with D2D? (if so, that would be bad news for debugging my application in the future ); I can also post some more information on what happens, code and which code commented out, eliminates the problems (when running in RenderDoc). Any input is appreciated.
  11. cozzie

    Input Layout question

    I had the same question some time ago. My conclusions where that it's a good idea to use D3DReflect, but that it's also a good idea to define a number of combinations you want to support, because in the end most likely you also need the structs with the data (loading mesh data and storing it somewhere etc.). If you want I can paste some of the code on how I did it, let me know,
  12. @Adam_42 thanks. I did some more tests, and it's kind off unpredictable, also had it working a few runs with FR_PRIVATE. Better not use FR_PRIVATE and Unregister in the CTor to be on the safe side.
  13. Ok. Unless you want to Render both the zoomed in and not zoomed in scene, moving the camera closer to your target is the same as zooming.
  14. It could have something to do with the origin, if it's not the 'wanted' center, you could either change the origin or use the position/translation part of the matrix to simulate the zoom effect (instead of scaling).
  15. Thanks, I actually tried that first. But somehow that didn’t work, that’s why I switched to this version. The return value seemed correct though (1), but CreateTextFormat still called/ used the fallback font. Just tried it again, with FR_NOT_ENUM it works, but with FR_PRIVATE, it doesn't. Documentation says that when using FR_PRIVATE, the font is available for the process the called AddFontResourceEx, whatever 'the process' might mean, it looks like it doesn't stay available during the runtime of my application.
  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!