Makarui, not in the entire window Possible?

alamata

23-05-2011 09:31:56

hey,...

i use Makarui,...thx for it... :!: :wink:

i can put the mogre's renderwindow in a panel with mogre,...

how can do that with Makarui,...

i have try a lot of things with no result ... :oops:

is it possible to use Makarui but not in the entire window
per example in a panel in a winForm,... :arrow: :?:

if yes,... can you give to me some explaination about that process

thx for your comprehension,...

GantZ

23-05-2011 19:52:54

hi,

do you have any error when you try to add makarui to your application ? I have been able to make it work by modifying the original makarui demo. Also, you must update your makarui manager in the paint event of your form (where you have root.RenderOneFrame()). keep in mind that since it's not updated on a constant frame rate, but only when the panel need to refresh, the behavior of your flash control could be different than expected.

alamata

23-05-2011 20:23:34

Thanks You

for your comprehension and the interet bringing to my trouble,... :D :wink:

i will try to make that possible at my side,... :roll:

one more time thx a lot for all your job,...

alamata

25-05-2011 12:16:24

hey again,...

sorry to come back so quickly to you... :oops:

but after a lot of tries i m at this me not able to put makarui in a simple Winform,... :oops:

i have had several error messages with my differents tries

as example,...

Error 1 'HikariDemo.HikariScene' does not implement inherited abstract member 'HikariDemo.Core.CoreClass.CreateScene()' C:\MogreSDK\Samples\MakaruiDemo\MakaruiDemo\HikariScene.cs 10 11 HikariDemo




Error 16 'HikariDemo.OgreForm' does not contain a definition for 'SuspendLayout' and no extension method 'SuspendLayout' accepting a first argument of type 'HikariDemo.OgreForm' could be found (are you missing a using directive or an assembly reference?) C:\MogreSDK\Samples\MakaruiDemo1\OgreForm.designer.cs 25 18 HikariDemo




could you please make light about this impass for me,...

GantZ

25-05-2011 20:35:23

I have uploaded my Q&D implementation of winform in the makaruidemo, it just the source, it use the same media of the demo, just add these lines in your resources.cfg file (replace <path to mogresdk> with your local mogre installation path) :


FileSystem=<path to mogresdk>\Media\models
FileSystem=<path to mogresdk>\Media\materials\textures
FileSystem=<path to mogresdk>\Media\materials\scripts


https://bitbucket.org/mogre/mogreaddons/downloads/Makarui_winform_src.7z

it's just a proof of concept, mouse event aren't implemented and the window don't refresh (since rendering is done on paint event), if you want to have a properly displayed flash, you will need to implement some kind of loop in the winforms app.

alamata

27-05-2011 08:40:39

:D :D Many thanks :D :D

for your patiente
your comprehension
and your "proximity"


You make me very HAPPY :wink: :D

THX

alamata

27-05-2011 16:13:53

... :roll:

at this moment

... im m able to run my flash in my panel,....

it works like a charm,... :D

but if i can

i would like to ask you one more time a solution,... :oops:

where i must concentrate my efforts to make imput fonctionnal :?:

....

thx in advance

alamata

28-05-2011 08:51:20

...

i know what i have done,...

i only remplace RenderOneFrame by startRendering,...

the result : my flash is well displayed but i cant use imput,...

i try to follow your instructions about a loop

i have seen there are some posts related to this problem,...

but the particular case in this is that makarui is in a pannel,...

i have seen that

while (mRoot != null && mRoot.RenderOneFrame())
Application.DoEvents();


could be a partial solution but i cant implemented correctly the loop....

i know too im a little ennoying but i need some help ... :oops:

i continue my search,...

thx for your comprehension,...

alamata

29-05-2011 05:32:22

...

i have put the loop in the paint event

like tthis


private void Form1_Paint(object sender, PaintEventArgs e)
{
while (cScene.root != null && cScene.root.RenderOneFrame())
Application.DoEvents();

cScene.hikariMgr.Update();

cScene.root.RenderOneFrame();


}


the flash is well displayed with the RenderOneFrame and this loop,... :)

but i dont find at this time a way to make the input functionnal... :cry:

HandleInput(evt);

make some truoble

....

must i modifie this line

window.GetCustomAttribute("WINDOW", out windowHnd);

perhaps an other string that "WINDOW" as it in a panel,...

... i continue my investigations,...

GantZ

30-05-2011 10:40:55

check out this post, it's about using mois in winforms

http://www.ogre3d.org/addonforums/viewtopic.php?p=45172#p45172

also, search in the wiki / forum for resources about embedding mogre in winforms, you can find several solutions

about the rendering, you can stick with startrendering() for now.