Hi Roy,

as you use forum I do not see your email address ( otherwise I would likely
send personal message ) but anyway, might be that someone else will benefit
of such discussion in future in similar situation.

one quite unusual, but useful example for your purposes was discussed  in
discussion group some time ago - to use gldirect to run osg to translate
opengl calls to dx, the example claimed to be working well ( I did not try
it though as it was over 1 gb size and was offered over very slow
connection )

You may try this way  as it proved to be working for dx9 and thus  might
prove most easy way to follow  in case you do not use shaders in your  osg
output as gldirect supports only fixed pipeline

( gldirect could be taken here
https://raw.githubusercontent.com/bfosterjr/windowsrtdev/master/libs/gldirect5/src/gldirect5.7z
)

otherwise there are quite few examples to use nv extention besides  a lib I
already linked there is also:

https://github.com/tliron/opengl-3d-vision-bridge/blob/master/opengl_3dv.c

While to insert it into already existing code of the game might be
intimidating

the idea is quite straightforward: dx creates a texture which is then
shared with opengl as fbo

and as osg supports rendering to fbo a code to glue rendering might be
inserted to osg setting rendering target as that provided by dx fbo, after
rendering to fbo, the texture can be used in dx, such as being attached for
hud over already rendered scene.

Regards
Sergey


On Sun, Dec 14, 2014 at 8:07 PM, Sergey Kurdakov <[email protected]>
wrote:
>
> Hi Roy,
>
> I think the next step is just to run osg with simple dx app.
>
> I think that osg can be combined with dx via *GraphicsWindowEmbedded* and
>
> https://sites.google.com/site/snippetsanddriblits/OpenglDxInterop
>
> so - that osg renders inside pair
>
> dxRenderer->BeginGlDraw();
>
> dxRenderer->EndGlDraw();
>
>
> if you would   achive that, then you would need to subclass those dx calls
> via intercept dll which provide necessary info to OpenglDxInterop
> <https://sites.google.com/site/snippetsanddriblits/OpenglDxInterop> code
>
> the other way is to use ANGLE as it will translate opengl es calls to dx -
> but I think it will be few month hacking vs a week/two with above approach.
>
> Regards
> Sergey
>
> On Sun, Dec 14, 2014 at 3:10 PM, Roy Arents <[email protected]> wrote:
>>
>> Hi,
>>
>> I've found another example which allows drawing over directx:
>> http://www.codeforfun.it/2012/08/30/directx-hooking-with-a-proxy-dll/
>>
>> This one works for splash screen and menu's as well. Now the second step
>> seems more difficult as I expected... How to add osg on top of it.
>> There are quite a few solutions on how to add openGL on top of it, but I
>> have not been succesfull with them so far. Perhaps someone can point me in
>> the right direction?
>>
>> Thank you very much!
>>
>> Roy
>>
>> ------------------
>> Read this topic online here:
>> http://forum.openscenegraph.org/viewtopic.php?p=62050#62050
>>
>>
>>
>>
>>
>> _______________________________________________
>> osg-users mailing list
>> [email protected]
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to