ZigTheHedge Posted November 5, 2020 Report Share Posted November 5, 2020 For my "Trade'o'mat" mod I want to display the requested and offered items on top of my model, so players wouldn't need to open the UI to know the price and the offer. I tried to use IRenderer interface for rendering items in a texture of Quad, just like SignRenderer does. But I cannot find suitable method for this task: I found that I could use ImageSurface to get the context, render item there, and convert it to texture afterwards, but that thingies requires Cairo lib, and I'm not sure, we're allowed to use it for modding (can we btw?). Second attempt: I found cApi.Render.RenderItemstackToGui(...), but I cannot use it inside IRenderer::OnRenderFrame (getting NullPointerException). So, what's the correct way to do it? 1 Link to comment Share on other sites More sharing options...
Rhonen Posted November 10, 2020 Report Share Posted November 10, 2020 maybe @Dauron can help you. he added that rendering on his crates-mod Link to comment Share on other sites More sharing options...
ZigTheHedge Posted November 10, 2020 Author Report Share Posted November 10, 2020 I saw his approach, and it's over complicated. There must be a simpler way: using Cairo directly, for example. Link to comment Share on other sites More sharing options...
Rhonen Posted November 10, 2020 Report Share Posted November 10, 2020 okay Link to comment Share on other sites More sharing options...
Recommended Posts