
Enable WGL Access
Posted Saturday, 5 September, 2009 - 15:50 by Acidic32| Project: | The Open Toolkit library |
| Version: | all versions |
| Component: | Code |
| Category: | support request |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | by design |
Jump to:
Description
How can i enable WGL Access in OpenTK?
I dont want to include Tao's Platform class if possible
Thanks


Comments
#11
Right, Wgl.Library is a constant that should be set to "opengl32.dll":
There's no need to load the library or anything like that, the runtime should take care of that.
#12
Just having slight problem
Text priting is really slow, i tried text printer but its still the same
I have tried using Outline fonts, but dont now how to instaniate GlymphMetricFloats
ANy ideas on how to achieve fast text rendering.
#13
Have you tried objarni's TexLib? It allows you to create and use texture fonts, which should be very fast.
#14
I must not be doing this right, but its hanging
// Load a bitmap from disc, and put it in a GL texture.
var tex = TexUtil.CreateTextureFromFile("fontmap.bmp");
var texFont = new TexLib.TextureFont(tex);
texFont.WriteStringAt("Center", 1, 50, 50, 0);
inside the Draw Routine
TexUtil.InitTexturing();
inside the Initialization routine
#15
Maybe its my Image ? :(
#16
Sorry, no idea... You'll have to create a bug report against the TexLib library.
That said, the source code is quite short and should be relatively simple to debug. Try placing a few breakpoints and seeing where exactly it hangs.
#17
ok, but its weird, my way is fast, when there is only a little bit of text, put lots of text, it slows a hell of a lot, there is about 2,000 text it needs to print, it just slows when zooming/panning. A program similar to mine, has the same if not more, and its fast
I just dont understand how? Maybe need to send all my text to a DisplayList and call that, but not sure if that would speed things up, as it needs to be re-projected everytime we pan, but it stays in same location when we zoom..
Hrmm
This is my current routine:
#18
And this is my printing routine
#19
Acidic32;
You seem to be mixing GDI and OpenTK since you are using both HDC's and GL.* calls.
I don't know whether that mix works at all..?
#20
It works, its just text when its displayed slows the rendeing down by 5 times
ie without text stopwatch reports 30ms-40ms
with text stopwatch reports 200ms +
Mmmm Need some fast text display