Ogre Version: :1.10:
Operating System: :Windows:
Render System: :Direct3D11:
Hi,
I have a manual texture object that I'm uploading an image to using the OgreTexture::loadImage() method. I have discovered out that this method behaves differently between OpenGL and Direct3D11 mode. In OpenGL, the state of the resource is updated to LOADSTATE_LOADED (OgreTexture::isLoaded() returns true) after the method is successfully completed. However, when running with D311 Rendersystem, the method will not set the resource state to LOADSTATE_LOADED, even though the method has successfully loaded the image.
Looking in the the source code of the D3D11Texture class, it has overriden the loadImage() method and just performed the loading operation and did neither check nor set any resource states afterwards.
Is this intentional or a bug? I wonder also why it would want to override the base implementation of OgreTexture in the first place, since its implementation is just the same as the base, except the state checking and management?
Thanks for any insight into this.
Different behavior of OgreTexture::loadImage() between OpenGL and Direct3D11
-
- Gnoblar
- Posts: 3
- Joined: Wed Mar 14, 2018 10:00 am
-
- OGRE Team Member
- Posts: 1298
- Joined: Sun Mar 30, 2014 2:51 pm
- x 555
- Contact:
Re: Different behavior of OgreTexture::loadImage() between OpenGL and Direct3D11
I guess that it is overloaded due to its interal use in D3D11Texture. However it is against the documented behavior:
https://codedocs.xyz/OGRECave/ogre/clas ... c1a1b65618
so this is a bug. Thanks for tracing it down: https://github.com/OGRECave/ogre/pull/928
https://codedocs.xyz/OGRECave/ogre/clas ... c1a1b65618
so this is a bug. Thanks for tracing it down: https://github.com/OGRECave/ogre/pull/928