DirectX 12 RTT Render not called.

mattychays
Posts: 5
Joined: Sat Sep 29, 2018 10:10 pm

DirectX 12 RTT Render not called.

Postby mattychays » Thu May 14, 2020 5:05 am

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.

Postby BenBaron » Fri Jun 05, 2020 6:21 pm

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: 2167
Joined: Wed Oct 06, 2010 3:25 pm

Re: DirectX 12 RTT Render not called.

Postby Beau Hollis » Thu Aug 20, 2020 12:59 pm

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


Return to “Software Development Kit (SDK) Questions”

Who is online

Users browsing this forum: No registered users and 11 guests