Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Kylix / GLUT Bug?????

  1. #1
    Junior Member Newbie
    Join Date
    May 2002
    Location
    Xi'an, ShaanShi, China
    Posts
    9

    Kylix / GLUT Bug?????

    I try to use GLUT with Kylix everything is fine but... When I to include in my main loop procedure :

    procedure Render(); cdecl;
    begin
    glClear(GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT);
    glLoadIdentity();
    ----=>> glutSolidCone(10,10,10,10);
    ----=>> glutSolidSphere(10,10,10);
    glFlush();
    glutSwapBuffers();
    end;

    My program end automatically with no error prompt, nothing!? If I copy and paste these two line and compile it in C/C++ no problem... Is it a bug in the library translation or I do something wrong!?

  2. #2
    Guest

    Re: Kylix / GLUT Bug?????

    I have no experience with Kylix but it can be a normal OpenGL error if you forgot something in your init code.Is or the same as | in C? (bitwise or)

  3. #3
    Junior Member Newbie
    Join Date
    May 2002
    Location
    Xi'an, ShaanShi, China
    Posts
    9

    Re: Kylix / GLUT Bug?????

    No this is the weird thing, I produce the SAME structure in C and i can see my cone or my sphere it's ONLY on kylix... I don't get it... And if I replace the two line by ANY other basic object (teapot, cube etc...) no problem, it's ONLY the sphere and the cone... It really looks like a bug but I'm not sure

  4. #4
    Guest

    Re: Kylix / GLUT Bug?????

    I have some experience with the Borland C/C++ compiler under Windows. The compiler did not mask math errors like other compilers so you had to add code for that. It was just a few lines. Perhaps is it the same with Kylix?

  5. #5
    Member Regular Contributor
    Join Date
    Feb 2002
    Posts
    377

    Re: Kylix / GLUT Bug?????

    it would be not the first and definitly not the last bug in kylix
    you can try your pascal code on fpc (www.freepascal.org), should compile without too much to be changed
    or perhaps there is some source for the kylix/glut stuff - just joking

    btw i like object pascal very much, but kylix...

  6. #6
    Junior Member Regular Contributor
    Join Date
    May 2002
    Location
    York, UK
    Posts
    128

    Re: Kylix / GLUT Bug?????

    One thought ... the specs for GLUT

    glutSolidCone( GLdouble base,
    GLdouble height,
    GLint slices,
    GLint stacks);

    Maybe the type coersion is not happening?

    so glutSolidCone( 10.0,10.0,10,10);

    may work???

    Rob.

  7. #7
    Member Regular Contributor
    Join Date
    Feb 2002
    Posts
    377

    Re: Kylix / GLUT Bug?????

    Originally posted by Rob Fletcher:
    One thought ... the specs for GLUT

    glutSolidCone( GLdouble base,
    GLdouble height,
    GLint slices,
    GLint stacks);

    Maybe the type coersion is not happening?

    so glutSolidCone( 10.0,10.0,10,10);

    may work???

    Rob.

    i would be very surprised if this is the solution
    pascal is very strict with its types and if your function requests a GLdouble it will raise an error if it doesn't get one (even kylix will do this )
    i still think it is just another kylix bug
    but without seeing the source of the glut bindings it is really hard to tell

  8. #8
    Junior Member Regular Contributor
    Join Date
    May 2002
    Location
    York, UK
    Posts
    128

    Re: Kylix / GLUT Bug?????

    I would likely agree given the Pascal origins! (This from one who's first language after various assemblers was Algol60!)

    The suspicion of course could well be the bindings for these functions such that the incorrect type is passed!

    Perhaps you could put a debug statement into the glutSolidCone() function source code and see what you are getting into the function??

    I assume you can build a system to use glut from glut sources??

    As you can guess, not a Linux/Kylix user but
    IRIX/O2 plus a little Borland C++ and a wee smattering of Delphi!

    Just some thoughts.

    The bindings sound like the best place to look, if you can.

    Rob.

  9. #9
    Junior Member Newbie
    Join Date
    Jun 2002
    Posts
    2

    Re: Kylix / GLUT Bug?????

    where did you get glut for kylix?

    [This message has been edited by AlexF (edited 06-16-2002).]

  10. #10
    Junior Member Newbie
    Join Date
    May 2002
    Location
    Xi'an, ShaanShi, China
    Posts
    9

    Re: Kylix / GLUT Bug?????

    Hummmm good question, somewhere on the internet...!??

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •