|
Dave, I really appreciate your help.
You guide me to understand the big picture.
Thanks.
|
|
|
|
|
Hi forum...
Im trying to use the TaoFramework libraries in c# but I always get this error
Unable to load the DLL file 'freeglut.dll'. (Excepción de HRESULT: 0x8007007E)
when i call the function at this line
Glut.glutInit();
I have this code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using Tao.FreeGlut;
using Tao.OpenGl;
...
class program
{
static int alto = 512;
static int ancho = 512;
static double imgalfaspect;
static int alto_original = alto;
static void Main(string[] args)
{
Glut.glutInit();
Glut.glutInitWindowSize(ancho, alto);
Glut.glutInitDisplayMode(Glut.GLUT_RGBA | Glut.GLUT_DOUBLE);
Glut.glutCreateWindow("test opengl");
Glut.glutDisplayFunc(display);
Glut.glutReshapeFunc(resize);%
imgalfaspect = ((double)ancho / (double)alto) * 0.5;
Glut.glutMainLoop();
}
...
}
I have added the references to my project, but i don't know what to do to fix this problem.
Thanks in advance
|
|
|
|
|
You are far more likely to get an answer from their site, than here!
taoFramework.com[^].
Is Google not working where you are?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hello Henry
Thanks for your answer...
Where i am, my google web site is working... I have been looking a lot in google, but i have could not find an answer for this.
for this reason i am here writing, because maybe you have a response for this.
thanks again
|
|
|
|
|
billy_iii wrote: for this reason i am here writing, because maybe you have a response for this.
Henry gave you the best reponse anyone is going to come up with. Ask the people who wrote the library you're having problems with.
|
|
|
|
|
Have you got the answer already?
You may create a WinForm aplication project,and try it again.
|
|
|
|
|
private void Form1_Paint(object sender, PaintEventArgs e)
{
Graphics gfx = e.Graphics;
gfx.DrawString("135", new Font("Freestyle Script",
40f, FontStyle.Bold),
new SolidBrush(Color.Red),
new Point(20,20));
How would you know when the mouse cursor is inside a rectangle area of the above drawn text??
|
|
|
|
|
well.. You need to trap mousemove to get the cursor position.
check value of EventArgs that comes along with the Event Delegate.
|
|
|
|
|
Hi,
there is a sibbling method called MeasureString, when used correctly it provides information about the size a DrawString is going to take. However there are minor deviations, there even is a CP article on that subject.
I expect most text processors (when using a proportional font) would draw only one word at a time, and store all the coordinates; so you would need MeasureString only inside a word, and visual feedback with a caret sufficiently solves inaccuracies.
BTW: the few lines of code you have shown are horrible for performance and memory, as they create new objects (Font, Brush) for every Paint, and don't Dispose of them.
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
Thanks Luc, Actually I know about the measureString thing but wanted to hear your opinions.. And don't worry, I just posted the shortest segment I can to show my problem
|
|
|
|
|
Luc Pattyn wrote: there is a sibbling method called MeasureString, when used correctly it provides information about the size a DrawString is going to take. However there are minor deviations, there even is a CP article on that subject.
I expect most text processors (when using a proportional font) would draw only one word at a time, and store all the coordinates; so you would need MeasureString only inside a word, and visual feedback with a caret sufficiently solves inaccuracies.
The inaccuracies with MeasureString make it unusable for text processors. When selecting text, you need to be able to draw text in two parts (because the selected part has a different color) at exactly the same position (other text will start to 'jump around' if you select stuff). AFAIK this isn't possible with MeasureString+DrawString - it might work for some fonts (mostly the mono-spaced ones), but the inaccuracies will cause trouble for other fonts.
Use the Measure+Draw methods from the System.Windows.Forms.TextRenderer class instead - those work much better. You might have to specify some TextFormatFlags to keep the TextRenderer from adding padding.
|
|
|
|
|
Hi Daniel,
thanks for the info. I'll have to experiment with it some day, I've never used TextRenderer so far.
Cheers.
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
Hi,
I am using unmanaged Dll in a managed C# project, where callbacks are made from the unmanaged code to the managed code.
My project compiles fine, when I run the application (in debug mode), which is basically a client that communicates with a server application, intermittently I get a NullReferenceException dialog box. But my problem is it does not point to a specific line of code where this exception is occurring. The dialog just shows in the middle of the IDE (VS 2008) and I have to stop the application.
Does anyone know how can I verify where this exception is occurring???
Appreciate your suggestions.
|
|
|
|
|
This happens sometimes when error is happening to an external dll. Say you have added a dll called a.dll which doesnt have the pdb associated with it or no Debug Symbols for that dll is loaded into memory... Thus .NET cant show you the actual source, and hence shows this error.
You can see the assembly code.. but if you dont know it, it wouldnt be meaningful to you.
What you can do is always add the dll from bin folder of your project. This ensures that the dll is loaded with debug symbols.
|
|
|
|
|
I have added the dll from bin folder of the project.
modified on Sunday, September 20, 2009 4:43 PM
|
|
|
|
|
I mean I have been doing that already before I posted this question, It did not help.
|
|
|
|
|
try copying both the DLL and the PDB file to the EXE folder.
that may suffice to get line numbers in your exception.
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
Both of them are in the "bin\x64\Debug\" along with the EXE.
|
|
|
|
|
What exactly the operation you are doing when you encounter this exception..??
the line no is not shown only when the source is not associated with debug information..
Debug line by line to find exact line where error is occurring..
Also see if there is anything in InnerException (Though I think it should be null)
|
|
|
|
|
|
nicromonicon wrote: is there such a thing?
And this relates to C# how?
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
actually i didnt know where to post it, its network related but i couldnt find network category
|
|
|
|
|
So why on earth did you pick C#? It looks like you just picked a random forum, which isn't going to get you an answer. You might as well have asked this in Pig Farmers Weekly. You could have chosen the General IT Issues or, more appropriately, the Hardware and Devices forum.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
i did it because i wanted to know - also - how to connect to a proxy via C#
anyway-Mr.O'Hanlon-dont you think by the time it took you to write down those not-so-funny rants and cheap jokes, you could've answered my question instead?
a true professional would have answered my question, or at least guide me to the correct forum
so next time, if you do know the answer,by all means, if you dont, please refrain from making useless comments..other members are not here for the jokes
|
|
|
|
|
nicromonicon wrote: i did it because i wanted to know - also - how to connect to a proxy via C#
Then you should have stated that, and not asked an unrelated question. We can't read your mind for you.
nicromonicon wrote: anyway-Mr.O'Hanlon-dont you think by the time it took you to write down those not-so-funny rants and cheap jokes, you could've answered my question instead?
No I don't. This isn't the right forum for this - think about it for a minute. People search these forums for answers to questions; why do you think that somebody would look for a network question in the C# forum? It makes no sense.
nicromonicon wrote: a true professional would have answered my question, or at least guide me to the correct forum
And had you read my reply you'd see that I suggested two possible forums for you.
Anyway, I'm not going to bother reading your replies now - whenever somebody replies in the way you just have, it's apparent they are incapable of a rational dialogue.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|