DirectX 12 RTT Render not called.

SDK supports Prepar3D’s philosophy of an open development architecture and encourages third parties to bring new innovations with improved add-ons and training content.
Post Reply
mattychays
Posts: 5
Joined: Sat Sep 29, 2018 10:10 pm

DirectX 12 RTT Render not called.

Post by mattychays »

I am trying to implement the DirectX12 Render-to-Texture feature and cannot get the "Render" function to call. I successfully obtain the PDK, create a texture and get "Prerender" to call, however, I cannot get the "Render" function to call.

I inspected the "RenderFlags" and rendering is enabled.
BenBaron
Posts: 80
Joined: Fri Jan 16, 2015 7:51 am

Re: DirectX 12 RTT Render not called.

Post by BenBaron »

Hi,

for me, this works. Render() is being called. So I guess there must be something with your code somewhere.

Greets, Ben
User avatar
Beau Hollis
Lockheed Martin
Posts: 2452
Joined: Wed Oct 06, 2010 3:25 pm

Re: DirectX 12 RTT Render not called.

Post by Beau Hollis »

Render is only called when the texture is in use. If you use the texture in a model, gauge, or panel it will be requested for render and then your render callback should get hit. The easiest way to debug an RTT texture is to add a texture entry to a panel.cfg. If you add a window to Gauges\missionpanels.cfg and set nomenu = 0 it will show up in the panels dropdown regardless of aircraft selected.

For example:
[Window Titles]
Window00=Points of Interest
Window01=Timer Window
Window02=Droppable Objects
Window03=Race Map
Window04=Engine Data
Window05=Race Info
Window06=Next Racing Maneuver
Window07=G meter
Window08=Race Penalty
Window09=Countdown
Window10=MenuWindow
Window11=ATCWindow
Window12=SimConnectWindow
Window13=PanelManager
Window14=AppMenuWindowPanel
Window15=Eye Tracking //Eye Tracking
Window16=VR-Textures
Window17=Texture Test

...

[Window17]
size_mm = 100, 100
window_size = 1.0, 1.0
position = 2
background_color = 0, 0, 0
visible = 0
zorder = 5
type = UI
nomenu = 0
3DP_CAMERA_TRANSFORM_REFERENCE = NONE
Texture00 = YourTextureName, 0,0,100,100
Beau Hollis
Prepar3D Software Architect
Post Reply