PDA

View Full Version : Kylix / GLUT Bug?????



Cybernet_X
05-26-2002, 07:48 PM
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!?

05-27-2002, 01:10 AM
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)

Cybernet_X
05-27-2002, 03:35 AM
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 http://www.opengl.org/discussion_boards/ubb/smile.gif

05-27-2002, 05:12 AM
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?

satan
05-27-2002, 08:54 AM
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 http://www.opengl.org/discussion_boards/ubb/wink.gif - just joking

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

Rob Fletcher
05-28-2002, 05:39 AM
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.

satan
05-28-2002, 07:28 AM
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 http://www.opengl.org/discussion_boards/ubb/smile.gif)
i still think it is just another kylix bug
but without seeing the source of the glut bindings it is really hard to tell

Rob Fletcher
05-28-2002, 11:15 PM
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.

AlexF
06-16-2002, 02:18 PM
where did you get glut for kylix?

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

Cybernet_X
06-18-2002, 03:14 AM
Hummmm good question, somewhere on the internet...!??

Cybernet_X
07-03-2002, 08:17 PM
ftp://delphi-jedi.org/api/Cross_Platform/OpenGL.tar.gz

Cybernet_X
07-03-2002, 08:21 PM
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

satan
07-04-2002, 01:29 AM
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).]