I am making a game engine and I am going to support both OpenGL and Direct2D. I heard that rendertargets can return an error on EndDraw(), needing to recreate every resource created with it. I was wondering if that happens frequently, should I handle that error and how does it happen. In OpenGL you don't lose a context just because so. So, what causes the loss of a render target and should I use direct2D for games even with this problem? Thanks in advance.
Why do Direct2D rendertargets need to be recreated?
381 Views Asked by A cool programmer At
1
There are 1 best solutions below
Related Questions in GRAPHICS
- How to fix "Access violation executing location" when using GLFW and GLAD
- Why is the value of `gl_FragCoord.z` is always 0.5?
- A way to warp an image based on a map
- Spacing out overlapping rectangles: how to translate pseudocode?
- 3D graph in Rstudio (time vs intensity vs coefficient)
- I want to create a creative website based on my project. I am new in this field
- Color each field in a mosaic plot in R
- How to convert raw RGB luminance using OCIO
- CPU Ray Tracer finds intersection for only a certain setup
- How do I dynamically change vertex colors using Direct3d 12 and Visual C++?
- Python Mediapipe replace chest pose landmark lines with custom image
- I was following Computer Graphics from Scratch -- Getting distorted spheres
- Convert coordinates in android
- Python Mediapipe replace pose landmark line drawings with custom image drawings
- Is there a way to automatically export OpenOffice/LibreOffice drawings to bitmaps, with options?
Related Questions in 2D
- How can I get the inverse Transformation of in 2D
- How do you use a shader on an entire GPUParticles2D system rather than the individual particles?
- update multidimensional array in unity
- how to generate a sequence from a two dimensional array
- 2D Isometric depth sorting entities (only) formula not working
- How to make wall collision with staticbody2d & collisionshape2d ( using an area2D for player with collisionshape2d as a child ) in GODOT?
- How do I create a click and drag system for a sprite in Godot?
- How drag and drop 2D UI elements of Canvas in OVR ray interactable?
- How to make a Unity 2D hinge joint that springs to a given angle?
- How can I make user input name unto UI and not into console in Java?
- Simplify 2D map to optimize pathfinding
- How do I check if a player has inputted the same coordinates twice?
- 2D interlocking puzzle script not working
- How can I rig this 2D character so I can animate it without warping
- Using metatables in Lua or functions for OOP
Related Questions in DIRECTX
- Decal renderer does not discard pixels properly
- how to fix CREATEGRAPHICSPIPELINESTATE_VS_ROOT_SIGNATURE_MISMATCH?
- Why do we only create one render target view?
- DirectX12 development, character steering problem
- DirectX rendering Transparency
- Which format should be more smooth for complex R8 textures - BC4 or BC7?
- Missing HLSL Debug Symbols with D3Dcompile in Visual Studio
- C++ DirectX compress 3D texture into 2D texture
- Nvidia HDR Encoder
- Delphi FMX: How to write a custom shader filter?
- Ternary operator with SamplerStates
- How to export symbols in rust binaries
- How can I safely alter a texture from multiple threads? (seems like there is no `InterlockedAdd`)
- How can I use (resource) barriers to sync access to a `RWTexture2D` between different shaders?
- Point light shadows work wrong, how can I debug it?
Related Questions in DIRECT2D
- HDR video publishing
- Direct2D bitmap with Alpha channel is not drawing properly on black background
- Direct2D to XPS file without print queue
- Proper way to create Direct2D bitmap from FreeType bitmap
- How can I get the ENUM field name from an d2d effect property by using the GetValueByName method
- How can share a WriteableBitmap back buffer to use alongside Direct2D rendering?
- Does ID2D1DeviceContext::GetTarget() create a new pointer via AddRef()
- How to tell memory usage of SharpDX.Direct2D1.Bitmap?
- Direct2D different image loadings APIs
- How to draw transparent graphics using Direct2D
- Troubleshooting Windows Preview Handler Issues: GDI+ and Direct2D Integration
- How to render pixels from IMFMediaBuffer or IMF2DBuffer into HWND?
- Detect optimal position for text
- How does Direct2D do non-MSAA Anti-Aliasing?
- using SharpDX.Direct2D1 to render on specific element
Related Questions in RENDERTARGET
- (Unreal) How can I draw on a UI image?
- Merge two scenes in Three.js and React Three Fiber
- Cloning a texture created with THREE.WebGLRenderTarget
- How can I store and later retrieve Textures in three.js?
- How to create render target views on swap chain with multiple frame buffers in directx 11
- Set a Render Target View to part of a texture direct X 11
- How do you update a UTextureRenderTarget2D in C++?
- Three.JS camera controls in a scene thats rendered onto a planes texture?
- Three.js: Trouble combining stencil clipping with EffectComposer
- UE4 - How to scale a texture or material given 4 screen coordinates?
- Vulkan - Rendering into multi-planar YUV render target
- How to access bitmap data of Direct2D Hardware RenderTarget?
- my Simple render target view is not working
- how can i write new color info to back buffer
- Drawing on one Whiteboard (Render Target) is copied to all Whiteboards?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
In the past (read DirectX 9 and earlier), a lost device usually occurred when you switched focus away from a full screen application. Then, during the time that your application was not visible, you had no graphics device to draw to. And when the focus was set back to your application, you had to re-initialize the device and all resources that were created on that device.
Today (DirectX 10 and beyond), this is not the case anymore. Access to the graphics device is virtualized, so you keep your device handle when the application loses focus. However, there are still a few cases when you can loose your device, e.g., physical changes to the computer, crash and reset of the driver, etc. So, the situations in which you loose your device are very rare and somewhat extreme. You can handle those situations if you want (and you should if you want to create a stable application), but the average user will most likely not run into any of these extreme situations. For more information, take a look at this MSDN article.