I am having a problem using DrawPixels and Drawing text on the same "surface".
I have an OpenGLControl set up to show "static", randomly set pixels shown using DrawPixels in the OpenGLDraw event. If I have DrawFPS set to true, OR if I use DrawText in the same method handler, all the "static" pixels disappear and the text is shown instead. Am I doing something wrong? Is there another way to handle this? Is this behavior by design?
I have included my method below. It shows "static" properly if DrawFPS is set to false. If set to true OR if I uncomment the DrawText, there is no "static", just the drawn text and/or the FPS.
I am having a problem using DrawPixels and Drawing text on the same "surface".
I have an OpenGLControl set up to show "static", randomly set pixels shown using DrawPixels in the OpenGLDraw event. If I have DrawFPS set to true, OR if I use DrawText in the same method handler, all the "static" pixels disappear and the text is shown instead. Am I doing something wrong? Is there another way to handle this? Is this behavior by design?
I have included my method below. It shows "static" properly if DrawFPS is set to false. If set to true OR if I uncomment the DrawText, there is no "static", just the drawn text and/or the FPS.
` private void openGLControl_OpenGLDraw(object sender, RenderEventArgs args) { RGBType[] pixels = new RGBType[640 * 480]; GCHandle handle = GCHandle.Alloc(pixels, GCHandleType.Pinned); Random rndm = new Random(); try { IntPtr ptr = handle.AddrOfPinnedObject();
} `