Actually i am importing and exporting *.DXF files in my application. So, i took the height from that dxf file that is being imported. Problem with this code is that it can draw text but when you click on it it will turn into solid Bars and nothing text can be visible after clicking .....
Yasir Nawazish Ali
Posts
-
What is problem with this Code ?? -
What is problem with this Code ??I want to ask one more thing that i am using this code ... where height is the Font height and startPoint_x and startPoint_y is the point where text is to be display CsGL.OpenGL.GDITextureFont myGDITextureFont; Font newFont; newFont = new System.Drawing.Font("Microsoft Sans Serif", (float)height); myGDITextureFont = new GDITextureFont(newFont, 'a', 'z'); GL.glTranslatef((float)startPoint_x, (float)startPoint_y, 0); myGDITextureFont.DrawString(text); and in this way text displayed but when i click on it it turns into solid bar .... What is the problem with this code ....
-
Draw Text in C# using OpenGLThanks 4 the Reply ... NeHe Lessons's Link was not Opened in my browser i think link is broken .... I want to ask one more thing that i am using this code ... where height is the Font height and startPoint_x and startPoint_y is the point where text is to be display CsGL.OpenGL.GDITextureFont myGDITextureFont; Font newFont; newFont = new System.Drawing.Font("Microsoft Sans Serif", (float)height); myGDITextureFont = new GDITextureFont(newFont, 'a', 'z'); GL.glTranslatef((float)startPoint_x, (float)startPoint_y, 0); myGDITextureFont.DrawString(text); and in this way text displayed but when i click on it it turns into solid bar .... Can you tell me, What is the problem with this code ....
-
How to draw text in OpenGL and what is problem in this CodeI want to ask one more thing that i am using this code ... where height is the Font height and startPoint_x and startPoint_y is the point where text is to be display CsGL.OpenGL.GDITextureFont myGDITextureFont; Font newFont; newFont = new System.Drawing.Font("Microsoft Sans Serif", (float)height); myGDITextureFont = new GDITextureFont(newFont, 'a', 'z'); GL.glTranslatef((float)startPoint_x, (float)startPoint_y, 0); myGDITextureFont.DrawString(text); and in this way text displayed but when i click on it it turns into solid bar .... What is the problem with this code ....
-
Draw text in C# using OpenGLYour First Link is not working .... But thanks for the Reply I want to ask one more thing that i am using this code ... where height is the Font height and startPoint_x and startPoint_y is the point where text is to be display CsGL.OpenGL.GDITextureFont myGDITextureFont; Font newFont; newFont = new System.Drawing.Font("Microsoft Sans Serif", (float)height); myGDITextureFont = new GDITextureFont(newFont, 'a', 'z'); GL.glTranslatef((float)startPoint_x, (float)startPoint_y, 0); myGDITextureFont.DrawString(text); and in this way text displayed but when i click on it it turns into solid bar .... What is the problem with this code ....
-
Draw Text in C# using OpenGLI am using C#, OpenGL and want to draw the Text on screen ... I went to OpenGL site and see the GLFont and other methods. Problem I face in these are: They give Code in C++ that uses pointers and references that are not supported in C# and it call them as unmanaged code, i write unsafe modifier in front of it but other problem arises. So, these codes are not helpful unless they are in C# language. if anyone know the method how to draw text in openGL or how to use C++ code in C# language then tell me .... I will be very pleased for your help ....
-
Draw text in C# using OpenGLI am using C#, OpenGL and want to draw the Text on screen ... I went to OpenGL site and see the GLFont and other methods. Problem I face in these are: They give Code in C++ that uses pointers and references that are not supported in C# and it call them as unmanaged code, i write unsafe modifier in front of it but other problem arises. So, these codes are not helpful unless they are in C# language. if anyone know the method how to draw text in openGL or how to use C++ code in C# language then tell me .... I will be very pleased for your help ....