Code Monkey home page Code Monkey logo

Comments (7)

bkaradzic avatar bkaradzic commented on September 26, 2024

Please create repro without modifying bgfx.

from bgfx.

johannesschaeufele avatar johannesschaeufele commented on September 26, 2024

Please create repro without modifying bgfx.

Patch:

diff --git a/examples/00-helloworld/helloworld.cpp b/examples/00-helloworld/helloworld.cpp
index 884a9ab0a..45f41741a 100644
--- a/examples/00-helloworld/helloworld.cpp
+++ b/examples/00-helloworld/helloworld.cpp
@@ -37,6 +37,7 @@ public:
 		init.resolution.width  = m_width;
 		init.resolution.height = m_height;
 		init.resolution.reset  = m_reset;
+		init.type = bgfx::RendererType::Direct3D11;
 		bgfx::init(init);
 
 		// Enable debug text.
diff --git a/examples/01-cubes/cubes.cpp b/examples/01-cubes/cubes.cpp
index 4f8084001..1dcd1a5e5 100644
--- a/examples/01-cubes/cubes.cpp
+++ b/examples/01-cubes/cubes.cpp
@@ -152,6 +152,7 @@ public:
 		init.resolution.width  = m_width;
 		init.resolution.height = m_height;
 		init.resolution.reset  = m_reset;
+		init.type = bgfx::RendererType::Vulkan;
 		bgfx::init(init);
 
 		// Enable debug text.
diff --git a/examples/02-metaballs/metaballs.cpp b/examples/02-metaballs/metaballs.cpp
index 95ca1dbe0..702a92c2d 100644
--- a/examples/02-metaballs/metaballs.cpp
+++ b/examples/02-metaballs/metaballs.cpp
@@ -511,6 +511,7 @@ public:
 		init.resolution.width  = m_width;
 		init.resolution.height = m_height;
 		init.resolution.reset  = m_reset;
+		init.type = bgfx::RendererType::OpenGL;
 		bgfx::init(init);
 
 		// Enable debug text.

Repro: Cycle through examples in order with example-glue

from bgfx.

bkaradzic avatar bkaradzic commented on September 26, 2024

I reproduced this on Windows, on Linux everything works fine.

What's your GPU/drivers?

from bgfx.

johannesschaeufele avatar johannesschaeufele commented on September 26, 2024

What's your GPU/drivers?

Most recently reproduced this with a 2080 Ti and driver version 531.29, but have reproduced this with other NVIDIA consumer GPUs and driver versions, so I don't think this issue is specific to the GPU or driver version.

from bgfx.

bkaradzic avatar bkaradzic commented on September 26, 2024

so I don't think this issue is specific to the GPU or driver version.

It's not, I just wanted to get extra data point...

from bgfx.

bkaradzic avatar bkaradzic commented on September 26, 2024

I investigated more, and it's definitely DXGI that causes this issue. This worked a few years ago but since then I rewrote parts of DXGI and changed flip model. I tried multiple things to recover HWND to get back in original state, but haven't find fix yet...

But here is someone with the same/similar issue:
https://stackoverflow.com/questions/20647359/resetting-window-after-using-directx-11

from bgfx.

johannesschaeufele avatar johannesschaeufele commented on September 26, 2024

There's also the similar Vulkan issue, which would only manifest itself in the previous repro after the DX issue is fixed - not sure if that should be separately tracked, as your finding indicates that the underlying cause may not be directly related.

diff --git a/examples/00-helloworld/helloworld.cpp b/examples/00-helloworld/helloworld.cpp
index 884a9ab0a..e5a717798 100644
--- a/examples/00-helloworld/helloworld.cpp
+++ b/examples/00-helloworld/helloworld.cpp
@@ -37,6 +37,7 @@ public:
 		init.resolution.width  = m_width;
 		init.resolution.height = m_height;
 		init.resolution.reset  = m_reset;
+		init.type = bgfx::RendererType::Vulkan;
 		bgfx::init(init);
 
 		// Enable debug text.
diff --git a/examples/01-cubes/cubes.cpp b/examples/01-cubes/cubes.cpp
index 4f8084001..1ec84f1cc 100644
--- a/examples/01-cubes/cubes.cpp
+++ b/examples/01-cubes/cubes.cpp
@@ -152,6 +152,7 @@ public:
 		init.resolution.width  = m_width;
 		init.resolution.height = m_height;
 		init.resolution.reset  = m_reset;
+		init.type = bgfx::RendererType::OpenGL;
 		bgfx::init(init);
 

from bgfx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.