RevalSoft
Topic Author
Posts: 10
Joined: 24 Jun 2018, 15:23

2D Texture broken after GLFactory::CreateDevice

04 Jan 2022, 15:43

Hello!

After creating Renderer of View (via Factory::CreateDevice) some OpenGL state breaks and I'm getting something like this:
Image

But expected:
Image

Any tips, please?

P.S.: Working with the personal engine on C++ which uses while old OpenGL pipeline.
 
RevalSoft
Topic Author
Posts: 10
Joined: 24 Jun 2018, 15:23

Re: 2D Texture broken after GLFactory::CreateDevice

04 Jan 2022, 22:25

Resolved.
Problem invokes by uncleared Sampler, fixed via glBindSampler(0, 0) after CreateDevice.
 
User avatar
jsantos
Site Admin
Posts: 3456
Joined: 20 Jan 2012, 17:18
Contact:

Re: 2D Texture broken after GLFactory::CreateDevice

10 Jan 2022, 17:44

Yes, thanks for sharing your solution. Effectively, GLFactory::CreateDevice modifies the current context and you should restore it. We could save and restore the state internally but that would be less efficient. Source code of the renderer is available so it is easy to see the state changes that happen.

Who is online

Users browsing this forum: Ahrefs [Bot], Semrush [Bot] and 1 guest