We need you!

We're working hard on the next version of Developer Fusion. Let us know what you think we should be up to!

Members

Technology Zones

Articles

Hosted By

MaximumASP

Info

[3930] OpenGL and C# - Part 1

Last post 02-01-2008 3:26 PM by mpuma. 15 replies.
Page 1 of 2 (16 items) 1 2 Next >
Sort Posts: Previous Next
  • 01-01-1999 12:00 AM

    [3930] OpenGL and C# - Part 1

    This thread is for discussions of OpenGL and C# - Part 1.

    • Post Points: 65
  • 08-11-2003 9:54 AM In reply to

    Outdated?

    I wrote this article almost 9 months ago so it could be a little outdated. Hope you all like it

    Regards,

    John
    • Post Points: 0
  • 12-01-2003 2:30 AM In reply to

    i have a problem

    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.
    • Post Points: 0
  • 01-07-2004 7:26 AM In reply to

    • oysters
    • Not Ranked
    • Joined on 01-07-2004
    • New Member
    • Points 5

    I have the same problem

    Did you find a solution to the problem. I am trying to compile the same sample and getting the same message
    • Post Points: 0
  • 07-28-2004 4:28 PM In reply to

    Cube doesn't appear

    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.
    • Post Points: 0
  • 10-12-2004 3:37 PM In reply to

    • ifconfig
    • Not Ranked
    • Joined on 10-12-2004
    • New Member
    • Points 10

    A possible solution

    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.
    • Post Points: 0
  • 10-12-2004 3:45 PM In reply to

    • ifconfig
    • Not Ranked
    • Joined on 10-12-2004
    • New Member
    • Points 10

    Solution

    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.
    • Post Points: 0
  • 11-03-2004 4:44 AM In reply to

    • rana1
    • Not Ranked
    • Joined on 11-03-2004
    • New Member
    • Points 10

    rana_m_75@hotmail.com

    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
    • Post Points: 0
  • 12-11-2004 1:31 AM In reply to

    • moh286
    • Not Ranked
    • Joined on 12-11-2004
    • New Member
    • Points 5

    Some Thing is messing

    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
    • Post Points: 0
  • 04-03-2005 11:06 AM In reply to

    The "entry point" is the Main() function, check that you have included it with its right spelling.
    • Post Points: 0
  • 06-13-2005 3:29 PM In reply to

    Draw into OpenGL-Context from a thread

    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?
    • Post Points: 0
  • 07-10-2005 1:18 PM In reply to

    • echoSwe
    • Not Ranked
    • Joined on 07-10-2005
    • New Member
    • Points 5
    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!
    • Post Points: 0
  • 11-24-2005 10:27 AM In reply to

    • specode
    • Not Ranked
    • Joined on 11-24-2005
    • New Member
    • Points 5

    Cube doesn't appear...

    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
    • Post Points: 0
  • 06-02-2006 7:32 AM In reply to

    • dreamlabs
    • Not Ranked
    • Joined on 06-02-2006
    • United States
    • New Member
    • Points 10

    Re: [3930] OpenGL and C# - Part 1

    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.   
    • Post Points: 10
  • 02-10-2007 6:49 AM In reply to

    Re: [3930] OpenGL and C# - Part 1

    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();
                }








    • Post Points: 10
Page 1 of 2 (16 items) 1 2 Next >