Advertisement

Font loading in VB

Started by October 05, 2002 01:39 PM
-1 comments, last by BoggyB 22 years, 4 months ago
I''m creating an OpenGL program in Visual Basic 6 (SP5), and have come across a weird problem. In my Form_Load code some general init stuff is being done (OpenGL init, pic loading, display list generation, font building etc.). I am using CreateFont and SelectObject to create a font, and then converting it to a display list for OpenGL (as the window is double-buffered). However, when I use wglUseFontOutlines, VB just bombs. No error, no "Access violation", it just exits as if I had click on the X (but without prompting to save or saving settings). Debugging it with Visual C++ shows that "RtlAllocHeap" is killing it, with a dodgy pointer or something. wglUseFontBitmaps works fine, however I want to use wglUseFontOutlines to simplify drawing code (I am using "buttons" in display lists, and having to use different functions to position raster and vertex based portions is a major headache. Plus, I don''t see an easy way to anti-alias/smooth/whatever bitmaps, however with polys it''s just a matter of using glEnable(GL_POLY_SMOOTH). Any help welcome. I can send more details on the error, snippets of the source etc if it will help. Some information that I can remember off the top of my head: glGenLists(96) CreateFont(size 12, Arial Narrow, Bold, TrueType, ANSI charset) wglUseFontOutlines(0.0 deviation, 0.0 thickness, polygons, start at 32 and create 96 chars) *note this is not proper source, just an idea of what params I''m using* Thank''s again for any help. --Thomas McCorkell Just what is Karma? Is it a way to rate people? A way of assigning privilege levels? Or is karma just an anti-spam system?
This piece of randomly insane randomness was brought to you by Thomas

This topic is closed to new replies.

Advertisement