OpenTK and text
-
I have an application that draws a 3D perspective view of a surface plot with axes. The user can rotate the view about 3 axes. The drawing is done using OpenTK. The axes are annotated with text using QuickFont. Unfortunately I have found issues: 1) QuickFont disables the ability to transform the model view multiple times. It would appear that the projection and model view are fixed once a value is assigned to the QuickFont.QFontDrawingPimitive.ProjectionMatrix field. For example, set a matrix view, draw text, draw some lines, transform the matrix view by 90 degrees about an axis, draw the same lines as before. The second set of lines are drawn as per the first i.e. not rotated. Remove the code that draws text, and then the lines drawn as expected i.e. the second set is 90 degrees to the first set. 2) When I draw text, the lines and the surface shading change colour to dark blue. If I comment out the text code, the lines are white and the surface is coloured. Yes I have searched using Google and no I was unable to solve this. All of the examples I have seen are rather simple, with text and shapes drawn in 2D for example. Update: It looks as if QuickFont either has bugs, or is not compatible with the OpenTK build I am using. In any case, I have written my own code to display strings, which allows the strings to be displayed in 3D, with perspective, rotations and translations as required. I may post sample code if I get the time as it might help others.