Acidic32's picture

Enable WGL Access

Project:The Open Toolkit library
Version:all versions
Category:support request
Status:by design

How can i enable WGL Access in OpenTK?

I dont want to include Tao's Platform class if possible



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
objarni's picture


Acidic32: I wouldn't mix GL-contexts/GDI rendering if I were you, it just seems like a bad ideas performance-wise.

Go for a full GL-rendering solution instead.

Acidic32's picture


Right, any chance of some help? Speed is what im after maybe some help printing text, sometimes needs like 100-500 text strings on the screen.

Any help would be great

objarni's picture


Sure - try downloading my TexUtil.cs file from here:

There are some examples to get you started. Look at these blog posts about the "FontBitmap" technique, which should be quite fast. (this describes the development which started as an experiment) (this contains some bitmaps that can get you started)

Note: the TextureFont class has these limitations:

1) It is fixed-width (like Courier New font in windows)
2) It does not support Unicode so english letters is what works (it uses only 256 characters ASCII table)
3) It is not visually appealing if the font is scaled outside of double size or half size (stay in range 0.75 to 1.25 and you should be reasonably fine)

Acidic32's picture


Is there a way to do this with Raster3 ? as my current routine involves this:

private void PrintString(double lon, double lat, double z, int listBase, string text)
// Raster the position
GL.RasterPos3(lon, lat, z);

// Call the List
GL.ListBase(listBase - 32);
GL.CallLists(text.Length, ListNameType.UnsignedShort, text);

i would like to use lon and lat for text positions not percentage

How could i achieve this?