Different behavior of OgreTexture::loadImage() between OpenGL and Direct3D11

Problems building or running the engine, queries about how to use features etc.
Post Reply
vcand
Gnoblar
Posts: 3
Joined: Wed Mar 14, 2018 10:00 am

Different behavior of OgreTexture::loadImage() between OpenGL and Direct3D11

Post by vcand » Mon Nov 05, 2018 3:23 pm

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.
0 x

paroj
OGRE Team Member
OGRE Team Member
Posts: 837
Joined: Sun Mar 30, 2014 2:51 pm
x 148
Contact:

Re: Different behavior of OgreTexture::loadImage() between OpenGL and Direct3D11

Post by paroj » Mon Nov 05, 2018 5:27 pm

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
0 x

Post Reply