|
...I saw a post that you made earlier asking the same thing, but you specifically mentioned OpenGL, but you mentioned in this post that you specifically want to write in C#. If you REALLY want to write OpenGL code in C#, you're going to need to get the CsGL library from sourceforge. ..Only problem is that the project was ended back in 2003. If you run into any problems, it might be a bit difficult to find any support at all, especially since you don't know OpenGL coming into it. If you want to write OpenGL, you're probably going to want to write it in either C or C++. There are several toolkits available to make your life easier...especially the GLU, & the GLUT. ...There are 2 major reference manuals that you're going to want to get. They're called the "Red Book" and the "Blue Book" (There's also a "Green Book", an "Orange Book" and the "White Book") but the Red and Blue will get you started. You can find deprecated copies of Red and Blue all over the place.
Red is the Programming Guide
Blue is the Reference Manual
Orange is for the OpenGL Shading Language(Don't worry about it for now)
Green is for X Windows programming
White explains how OpenGL interfaces with Windows (95 & NT specifically)
Welcome my son...Welcome..to the Machine
|
|
|
|
|
Nice... I started with the Red Book, but my problem was how to start a new project. I mean what to choose? and how to initial the classes!!
Noha.Y
|
|
|
|
|
Check out the tutorials at Nehe. They're pretty good, and C# source code is included for most tutorials...
Standards are great! Everybody should have one!
|
|
|
|
|
..Nehe is maintained by gamedev.
...what implementation of the OpenGL spec are you using? ...Which spec does your implementation build off of? Are you using Mesa? Glut? CsGL? ...Try going to opengl.org. There should be information in their wiki as well as getting started information
Welcome my son...Welcome..to the Machine
|
|
|
|
|
Is there a routine in C# that can be called to obtain a randowm number?
I am attempting to name many files with unique names. Do not want to use a counter writing to disk each time. Does anyone know of a unique number random generator in C#
|
|
|
|
|
System.Random
Though I don't believe this will work for your application as depending on the number of files and seed value, the possiblity of getting the same random number is likely.
System.IO.GetRandomFileName may be better in this case.
only two letters away from being an asset
|
|
|
|
|
I will try to use System.IO.GetRandomFileName
have a question though... will this be truly random, and not repeat at least within a large number of files generated , like maybe, every 1000 files names?
|
|
|
|
|
the next number after 13 in a truly random sequence can well be 13 again. If not,
it would not be a truly random sequence.
For non-conflicting filenames, you MUST include a trial-and-error loop, since
whatever scheme you come up with, the filename you generate may already exist.
|
|
|
|
|
In order to use GetRandomFileName, do i have to use anything but System.IO?
It says it is not a member.
If i do System.IO.GetRandomFileName OR Path.GetRandomFileName
|
|
|
|
|
This available only in 2.0 and higher
only two letters away from being an asset
|
|
|
|
|
maybe a GUID[^] is what you're looking for
|
|
|
|
|
System.IO.Path.GetTempFilename[^]
This returns the full path in the user temp directory, though, so it may not be what you are looking for.
-----
Formerly MP(2)
If atheism is a religion, then not collecting stamps is a hobby. -- Unknown
|
|
|
|
|
why are you creating random numbers
why dont you take an interger and increment it every time for every time the file name already exists
if you are dealing with larger number of files prefix or suffix ddmmyy to that number
Regards
Amar
It is Good to be Important but!
it is more Important to be Good
[My Question]
|
|
|
|
|
I'd concur with an earlier poster, use a GUID. In my experience the System.Random class isn't all that random, at least so far as generating 1000's of numbers a minute, unless you provide a good variation of seeds.
I'm largely language agnostic
After a while they all bug me
|
|
|
|
|
I am generating file names could be anywhere from 5 to 1000 in say 5 minutes or less. Just want to have unique names. Do not want to write to disk and increment numbers. Someone suggested that i use GetRandomFileName, but that does not seem to be able to build. Am i missing something?
|
|
|
|
|
Maybe i can datetime stamp the file to the millisecond.
What is the best class to use for that?
|
|
|
|
|
Hi!
My application uses a dll named "GsmCommunication.dll" which needs to be registered before running application. i want to register this dll programmaticlly when application is installed, using regsvr32 or any other command. Some one told me to use
Process.Start("regsvr32", "GsmCommunication.dll");
but it does not work, thats may be because dll is not available in "System32" folder. how can i register dll by giving its current path, i.e. the path in which application is installed..?
Please help me solving my problem...Thanks,
Regards,
Affan Ahmad Toor
..................
QUAIDIAN FOR ONCE, QUAIDIAN FOR EVER!
|
|
|
|
|
You can write a small application that registers the dll you need. The application will run only after installation process. You can get the path of the folder of the application by Application class
|
|
|
|
|
Thnx for reply...can you be more specific about what to write in that small application? i dont have a clue of how to register dll, what classes/functions to use...?
more help please...!
Regards,
Affan Ahmad Toor
..................
QUAIDIAN FOR ONCE, QUAIDIAN FOR EVER!
|
|
|
|
|
Use process class to launch regsvr32.exe and specify the path of the dll as an argument to the Process.
|
|
|
|
|
Thnx for reply...
I tried following methods but all gave error:
System.Diagnostics.Process.Start("regsvr32", Application.StartupPath + "\\GsmCommunication.dll");
Error: LoadLibrary("E:\Affan") failed - The specified module could not be found.
System.Diagnostics.Process.Start("regsvr32", Application.StartupPath);
Error: same error as above..
and then after placing GsmCommunication.dll in system32 folder i tried this:
System.Diagnostics.Process.Start("regsvr32", "GsmCommunication.dll");
Error: GsmCommunication.dll was loaded but the DLLRegisterServer entry point was not found. This file can not be registered.
please help!
Regards,
Affan Ahmad Toor
..................
QUAIDIAN FOR ONCE, QUAIDIAN FOR EVER!
|
|
|
|
|
Affan Toor wrote: and then after placing GsmCommunication.dll in system32 folder i tried this:
System.Diagnostics.Process.Start("regsvr32", "GsmCommunication.dll");
Error: GsmCommunication.dll was loaded but the DLLRegisterServer entry point was not found. This file can not be registered.
Have you tried registering the dll from command line? Does it work? It seems that your dll can't be registered.
|
|
|
|
|
Hi!
Thanks for reply, i tried registering dll through command line but it gave the same error. may be dll is corrupt...i will try to get its correct version.
Kindly tell me am i using the correct code to register dll and is there any way i can register dll by giving a path other than System32 folder? Because when i try to give a path, wherever a [space] comes in path it considers it as dll name and gives error.
Regards,
Affan Ahmad Toor
..................
QUAIDIAN FOR ONCE, QUAIDIAN FOR EVER!
|
|
|
|
|
Affan Toor wrote: Kindly tell me am i using the correct code to register dll and is there any way i can register dll by giving a path other than System32 folder? Because when i try to give a path, wherever a [space] comes in path it considers it as dll name and gives error.
You need to surround the full path with " "
|
|
|
|
|
Giorgi!
Thanks alot, your tip helped me in solving my problem..
Regards,
Affan Ahmad Toor
..................
QUAIDIAN FOR ONCE, QUAIDIAN FOR EVER!
|
|
|
|