Archive 17/01/2023.

[PIP] 10_RenderToTexture with only one scene?

Virgo

I was wondering if we can achieve PIP in Urho3D and so I added camera control for rttCameraNode_ in sample 10_RenderToTexture.
It worked just find if rttCamerNode_ is in a different scene from the cameraNode_, but if i used it in the same scene, any camera rotation or movement can easily lead to application crash.
Sketch
Anyone got a solution for this?

using:
Windows 10 Home 1803
Qt creator as ide (not using any Qt library)
visual studio 2017 as compiler

Eugene
  1. What’s the PIP?
  2. What GAPI is used?
  3. If you have a crash, please show callstack.
  4. I moved everything into main scene in this sample, works fine.

10_RenderToTexture_d%202018-05-25%2021-23-10-233

Virgo

1 PIP is “Picture in Picture”.
Trying to understand terms in 2 and 3, maybe update this reply later.
4 Did you try to rotate or move the rttCameraNode_?

I’m a middle school drop-out doing programming for hobbies, kinda uneducated, sry for my ignorance. xD

Virgo

Build in Debug mode encountered tons of LNK2038 mistmatch errors

Virgo

Sketch
Sry for the late reply! i finally found a way to compile in debug mode. not sure if this is the so called callstack?

Eugene

Still works fine.

Virgo

strange, i just replaced my RenderToTexture.cpp with your code, and the application just crashed on startup!

Eugene

I tested things on DX9. What API do you use?
Anyway, I recommend to build Urho from source in Debug configuration.
It’s quite hard to guess where and why it crashed.

Virgo

Sketch
Im using Dx11, and this is the debug build, finally.

edit:
okay stupid me dont know how to track the one called this function

Eugene

Fixed.

Virgo

Just add a pointer validation check huh? :joy: never imagine the solution to my problem could be simple like this

Thanks <3