473,805 Members | 2,030 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Displaying Text with CSGL

Stu
I am working with C# in a .NET environment and I have written an
application using csgl. I need to display text on
the output viewport. I am displaying things with a
CsGL.OpenGL.Ope nGLControl but I can't figure out how to put text on
there.

The standard OpenGL solution
relies on the wglUseFontBitma ps() api to create the display
lists. CSGL doesn't have a comparable function that I can find.

I have tried using CSGL.GDITexture Font to create the display lists but
they do not display correctly. Every character that I try to display
comes out with a solid box. This is the code that I tried:
using GL=CsGL.OpenGL. GL;
using CSGL=CsGL.OpenG L;
...
Font newFont;
CSGL.GDITexture Font myGDITextureFon t;
newFont = new System.Drawing. Font("Microsoft Sans Serif", 8.25F);
myGDITextureFon t = new CsGL.OpenGL.GDI TextureFont(new Font, 'a',
'z');
GL.glColor3f(0, 1.0f, 0);
myGDITextureFon t.Draw2DString( "here you go !", 50, 50);

If anyone can help with specifics of how to do this with csgl, it
would be *greatly* appreciated.
You can mail me directly at st**********@ho tmail.com if you have any
examples.
Nov 15 '05 #1
0 4012

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2801
by: Paul M | last post by:
Hi there, i hope someone can help me out here.. I have a input screen where i want the user to enter text in 2 different languages, english and macedonian. How is it possible to make the macedonian input boxes so when you type into them, it is entered into macedonian font? I dont want the users to be downloading anything also. thanks,
2
2865
by: Joe Price | last post by:
Hi chaps I've got an XML file, within that file i've embedded html code using the <!]> tag I'm displaying that xml file through a browser using an xsl style sheet. However it is displaying any html from the xml file as text, ie its displaying as text <br/> and <b> etc
0
1586
by: Wynter | last post by:
RE: from Displaying a Document using the ASPNET user account to the Client Browser discussion (3/2/2004 Buddy Thanks for helping me on getting the document to display. But now I am left with a second issue. While I was displaying the document as an attachment I end up with an extra window open or if I remove the Target='_blank' then my main window goes blank What I am doing is using the base code from...
6
4939
by: illmatic | last post by:
Can someone post or give me a link to C# code that will allow me to save what is currently being shown in my CsGL control to disk? Any format will do, though bmp, jpg, or gif is preferred. Thanks!
3
4672
by: Vin | last post by:
Hi, I save the drwan stuff on a GLView using CsGL like this: Size s = Size; s.Width = 540; s.Height = 435; Bitmap b = new Bitmap(s.Width, s.Height, PixelFormat.Format32bppArgb); BitmapData bd = b.LockBits(new Rectangle(0, 0, s.Width, s.Height),ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
1
2438
by: Just close your eyes and see | last post by:
Hi all I am using CSGL Library , and when i am trying to make a debug build from visual studio .net 2003 it succeeded , and when i am trying to make a release build it failed and give me the following message "An unhandled exception of type 'System.ArgumentException' occurred in system.drawing.dll Additional information: Invalid parameter used "
3
2581
by: Mark Thompson | last post by:
Hi, I have an application I have written in VB.NET. Part of the application is to display 3D models of buildings and allow the user to zoom and rotate around them. I have implemented this using the CsGL wrapper library with OpenGL. When it works, it works very well. I have a problem though. On some systems, the 3D view (which is available on a sub-dialog from the main form shown modally) does not always refresh. By that I mean
1
2480
by: seadog | last post by:
Hi, I am having a problem displaying data in a textbox array. What I am trying to do is have 5 number enter 5 textboxes, starting from the first and working there way to the bottom textbox. What is happening is that the displaying of the data is not happening until the process is complete, I have tryed a for next loop, for x = 1 to 5, text1(x).text = char(5,1), next x, I have even tryed just text(0).text = char(5,1), sleep 500, text(1).text =...
0
1171
by: swathiRasamallu | last post by:
I am using CsGL in C#.Net for graphical display.I want to rotate 2D triangle continuously.But i dont know how to do that in CsGL.In OpenGL we use glutidlefunction() for animations.What about CsGL?
0
9716
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9596
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10609
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10105
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7646
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6876
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4323
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3845
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.