Community discussion forum
[3930] OpenGL and C# - Part 1
-
This thread is for discussions of OpenGL and C# - Part 1.
-
Advertisement
Simply the fastest line-level profiler for .NET ever
“The low overhead means it has minimal impact on the execution of my program”
Mark Everest, Development Team Leader, Renault F1 Team Ltd.Try out the new ANTS Profiler 4 for yourself. Download your 14-day trial now
-
I wrote this article almost 9 months ago so it could be a little outdated. Hope you all like it
Regards,
John -
i'm trying to use the control named (OpenGLControl) as in this example
but every time i'm trying to resize this control the following exception occurs:
An unhandled exception of type 'CsGL.Util.NativeException' occurred in csgl.dll
Additional information: A dynamic link library (DLL) initialization routine failed. -
Did you find a solution to the problem. I am trying to compile the same sample and getting the same message
-
I have completed this tutorial, and created the Windows Form with the OpenGL window, and added the Cube Class, and if compiles with no errors or warnings, but for some reason, I see no cube when I run the application.
Thanks for your help, so far a very helpful tutorial!
Please reply to kev@draven007.com if you can. -
Make sure you install CsGL correctly. You need to have csgl.native.dll in your path, usually either in c:\windows\system32 or in the executable's directory. This could solve your problems.
-
Add the line
Code: new Cube().glDrawCube();
To your OurView.glDraw() function.
Put it instead of the
Code: // TODO: Draw a box or something
line. -
Hallo all...
thanks for the person who made this great web site!
i have a problem in this program. This program compiles with this error:
no entry points defind
and i do not know what that mean
!!!!
please i need your answer quickly
thanks
Rana -
first i like to thank you for your help. put i think ther is some thing is messing in this code.
1- when compile a compile error appear Sayes:'Cube' does not contain a definition for 'Position'
. So I commented this line and try to recompile.
2- The application ran but there is no cube . This was expected becouse we didn't even make an Object from the Cube class "this is so strange".
3- a last thing , How the 'view' Object will draw the cube without any code that till the 'view' Object to draw the cube.
Please reply becouse i want to learn programming OpenGl very much.
thanx
-
The "entry point" is the Main() function, check that you have included it with its right spelling.
-
Hi everyone
I got a problem when trying to draw into gl-context from a thread that is spawned from within the main program thread.
Instead of having one function that does all the drawing stuff, i want separate threads that "draw themselves".
I read about the possibility to copy the opengl-context handle to pass it to another thread...but as it seems,
the glCopyContext function was not ported to csgl (or i am to stupid, may be).
Has anyone hints for me? -
I have the same problem, but I do actually have that line in place in the constructor of OurView.
I tried this:
Code:
Cube cb = new Cube();
cb.CubeColorBlue = 0.7f;
cb.CubeColorGreen = 0.7f;
cb.CubeColorRed = 0.5f;
cb.glDrawCube();
this.SwapBuffer(); // swap Buffers
and then about the missing Position property:
Code: /// <summary>
/// The position of the cube
/// </summary>
public float Position
{
get { return fPosition; }
set { fPosition = value; }
}
I wrote that... Now, it still doesn't work... Help plz! -
I am not sure but I think there is a misstyped variable name "Position", I wonder if its "fPlusPostion".
Cube.cs Line 76
this.ViewPort = 0;
this.fMinusPosition = 0f;
this.fPlusPosition = 2f;
I have to say that after this I still see nothing on the screen except a black layout.
I had another problem with Thread function OpenGL_Start, exxception says that there is a cross-thread problem with this.view.Refresh(), so I disabled the Threading.
Any ideas?
Best Regards -
when i download the zip file for Csgl one of the files is missing, what should I do? I have looked over the web for other places that have the file, no luck.
-
I get the fallowing exception: Cross-Thread operation not valid: Control "accessed from a thread other than it was created on.
in this:
for (; ; ) // infinity loop for rendering
{
this.view.Refresh();
} -
I have tried to run this code on my machine. Every time i run it says an error "'SimpelOpenGL.Form1' does not contain a definition for 'view' ". Please reply.
Post a reply
Quick links
Recent activity
- qwe qwe replied to we search the company in I...
- Konstantin Kovshenin replied to Can't seem to submit a blog
- Barry Roberts replied to connecting to a database
- MOHAMMED SEIDU replied to How to Export Datagridview ...
- MOHAMMED SEIDU replied to How to Export Datagridview ...
- Alexis Méndez replied to how to select item to datag...
Enter your message below
Sign in or Join us (it's free).