Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strange OnRender errors

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Strange OnRender errors

    I am getting the following error in my log:

    Time Category Message
    8/28/2020 3:34:33 PM NinjaScript Chart rendering failed. There is likely a problem with a chart object's OnRender method. D2D error = 'HRESULT: [0x88990001], Module: [SharpDX.Direct2D1], ApiCode: [D2DERR_WRONG_STATE/WrongState], Message: The object was not in the correct state to process the method. '


    I am reading the Help guide section on OnRenderTargetChanged() and I noticed I am not calling this method at all in my code. However, I am using a function to do the drawing in OnRender so I am not sure how to directly use OnRenderTargetChanged() since my DX brushes are created and destroyed inside the function. My first question, is: Should I avoid using a draw function in OnRender and instead write the drawing code directly so that the DX brushes are available to OnRenderTargetChanged()? Could this be my problem or should I look elsewhere?

    #2
    Hello swcooke,

    Below is a link to an example of re-using brushes that are created/disposed in OnRenderTargetChanged().
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    670 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    379 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    111 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    575 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    582 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X