
Namespace conflict when using TextPrinter
Posted Monday, 5 July, 2010 - 20:04 by jjgl| Project: | OpenTK.Text |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | open |
Jump to:
Description
Since TextPrinter class is in OpenTK.Compatibility.dll in OpenTK 1.0, and if add OpenTK.Compatibility.dll to reference in a project, it will cause namespace conflict problem, what is solution to overcame the compiling problem? I have been struggling to print text on a viewport, any help will be greately appreciated.


Comments
#1
Since TextPrinter class is in OpenTK.Compatibility.dll in OpenTK 1.0, and if add OpenTK.Compatibility.dll to reference in a project, it will cause namespace conflict problem, what is solution to overcame the compiling problem?
TheFiddler wrote: OpenTK.Compatibility is there to support projects using the Tao framework or older OpenTK versions. It's not really meant to be used outside of those circumstances (namespaces clashes will arise if you try to include namespaces from both OpenTK and OpenTK.Compatilibity in the same source file).
I have been struggling to print text on a viewport, any help will be greately appreciated.
Look in the gallery for examples.
#2
The simplest solution is to avoid adding both
using OpenTK.Graphicsandusing OpenTK.Graphics.OpenGLdirectives when using OpenTK.Compatibility. Pick one of the two and use full namespace paths for the other.#3
Thanks, it works. However, there is a warning when compiles. The message is as following:
"OpenTK.Graphics.TextPrinter' is obsolete".
What that means? Thanks again!!