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 argusthome, Yesterday, 10:06 AM
    0 responses
    17 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    16 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    14 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    9 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    38 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X