Jump to content

Seeking documentation of queueSpot parameter in RenderingManager.AddToPostDrawQueue


Recommended Posts

I want to find out what the queueSpot parameter represents in the RenderingManager.AddToPostDrawQueue method.

public static void AddToPostDrawQueue(int queueSpot, Callback drawFunction);

All the examples I can find seem to use arbitrary values (0, 1, 3 and 5) without any explaination. I've experimented and found that apart from 0 (which results in my window being drawn even when F2 is pressed) they seem to be the same. I'm not very comfortable just passing in a random value and not knowing what I might be doing. I have seen one mention made about how the RenderingManager class has a field called postDrawQueue which is an array of callbacks and a theory that the queueSpot parameter might be linked to this array.

public Callback[] postDrawQueue;

Following that logic I tried out this code and it seems to work, but I'd still really prefer to know what the parameter is supposed to be for instead of going on a hunch.

queueSpot = RenderingManager.fetch.postDrawQueue.Length; // get next available slot?
RenderingManager.AddToPostDrawQueue(queueSpot, DrawFunction);
...
RenderingManager.RemoveFromPostDrawQueue(queueSpot, DrawFunction);

Link to comment
Share on other sites

I know this is not answering your question, but might I ask what it is that you're trying to do?

I want to draw a simple informational window tied to the application bar (something like the resource, contracts or notification bar app). To the best of my knowledge using the post-drawing queue is the correct way to do this so that it will be drawn along with the other UI elements and be automatically excluded when the user toggles the F2 key. However I don't know what queueSpot represents - is it supposed to be a unique value, is it a depth sorting value, or maybe something else entirely? As a result my current function for determining a 'valid' queueSpot value is a complete stab in the dark.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...