Page 1 of 1

OGRE EXCEPTION(3:RenderingAPIException)

Posted: Sat Mar 27, 2021 8:35 pm
by tft
Hallo,
Can someone explain to me what this error message in the Ogre.Log means. Occasionally the render thread smears.

OGRE EXCEPTION(3:RenderingAPIException): Error Presenting surfaces in D3D9Device::present at OgreD3D9Device.cpp (line 1031)

thx TFT

Re: OGRE EXCEPTION(3:RenderingAPIException)

Posted: Sun Mar 28, 2021 9:07 am
by MrBean
since there is OgreD3D9Device.cpp in the error msg, then i guess you have compiled the code with the default context (DX9) . so try compiling with Opengl context. add the word opengl in the Compiler - Compiler Options - Library Subsystem
and see what will happen

Re: OGRE EXCEPTION(3:RenderingAPIException)

Posted: Sun Mar 28, 2021 1:21 pm
by tft
it is not work, i see a black screen. Example works with opengl. I am call Renderworld() in extra Thread.

Sorry ... my english it is .... Bààààà

Re: OGRE EXCEPTION(3:RenderingAPIException)

Posted: Sun Mar 28, 2021 5:57 pm
by mk-soft
I think to read DX9 can not work in threads

Re: OGRE EXCEPTION(3:RenderingAPIException)

Posted: Sun Apr 04, 2021 1:55 pm
by DK_PETER
Don't run RenderWorld() in a thread by itself.
Each loop must contain the following sequence: Loop: 3D work : RenderWorld() : Sprite work : Flipbuffers() : Begin Loop again
It doesn't have to be a "main loop", though. All procedures can contain be a "main loop"
You can create numerous procedures which contains RenderWorld() and Flipbuffers(), you just have to exit each section properly.

Personally I use threads for handling data only.