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!?

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)

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

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?

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…

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.

Originally posted by Rob Fletcher:
[b]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.

[/b]

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

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.

where did you get glut for kylix?

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

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

ftp://delphi-jedi.org/api/Cross_Platform/OpenGL.tar.gz

This is where is the ERROR that appear when I execute the program on the command line…

glutSolidCone(5,5,10,10); —=>

error while loading shared libraries: /usr/lib/libglut.so: undefined symbol: gluNewQuadric

Don’t know about Kylix but in FreePascal you have to tell the linker which libs to link to.
If you don’t do you get the same error you got.
So perhaps in Kylix you have to do this, too.

Just a guess.

p.s.:I think you did take a look if glut.so is actually there

[This message has been edited by satan (edited 07-04-2002).]

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.