 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
dhughes Guest
|
Posted: Sat Oct 18, 2003 7:53 pm Post subject: open GL and Kylix |
|
|
Hi,
I've been able to get Direct X 7 working with C++ builder 3 in
windows. I'm having some real trouble getting Open GL development
working with Kylix in Linux. Using the GLUT lib available from SGI
downloaded from Redhat I compiled my code in Kylix. Here is the
probelm, it doens't do anything. I used the same code as what is in the
Open GL super bible second edition. Here is a paste of the code:
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#include <GL/glut.h>
void scene(void){
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(1.0f,0.0f,0.0f);
glRectf(100.0f,150.0f,150.0f,100.0f);
glFlush();
}
void ChangeSize(GLsizei w,GLsizei h){
if(h == 0){
h = 1;
}
glViewport(0,0,w,h);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
if(w <= h)
glOrtho(0.0f,250.0f,0.0f,250.0f*h/w,1.0, -1.0);
else
glOrtho(0.0f,250.0f*w/h,0.0f,250.0f, 1.0, -1.0);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
}
void setupRc(void){
glClearColor(0.0f,0.0f,1.0f,1.0f);
}
void main(void)
{
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
glutCreateWindow("GL Rect");
glutDisplayFunc(scene);
glutReshapeFunc(ChangeSize);
setupRc();
glutMainLoop();
}
//---------------------------------------------------------------------------
When I attempt to run the binary generated here is the message I get:
relocation error: /usr/lib/libglut.so.3 undefined symbol:
XmuLookupStandardColormap
I have an e-machine with an intel810 onboard video card.
I s my system not compliant with OpenGL? Has anyone had any luck with
developing with Kylix and openGL?
|
|
| Back to top |
|
 |
Dan Hughes Guest
|
Posted: Tue Oct 21, 2003 2:15 am Post subject: Re: open GL and Kylix |
|
|
I've gotten this working now. I've seen articles on the Borland
community web site about how to setup a OpenGL shell in C++ builder in
windows. I'm going to start by using GLUT, but does anyone have the
same type of sample code for Linux?
Thanks,
Dan Hughes
dhughes wrote:
| Quote: | Hi,
I've been able to get Direct X 7 working with C++ builder 3 in
windows. I'm having some real trouble getting Open GL development
working with Kylix in Linux. Using the GLUT lib available from SGI
downloaded from Redhat I compiled my code in Kylix. Here is the
probelm, it doens't do anything. I used the same code as what is in
the Open GL super bible second edition. Here is a paste of the code:
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#include
void scene(void){
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(1.0f,0.0f,0.0f);
glRectf(100.0f,150.0f,150.0f,100.0f);
glFlush();
}
void ChangeSize(GLsizei w,GLsizei h){
if(h == 0){
h = 1;
}
glViewport(0,0,w,h);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
if(w <= h)
glOrtho(0.0f,250.0f,0.0f,250.0f*h/w,1.0, -1.0);
else
glOrtho(0.0f,250.0f*w/h,0.0f,250.0f, 1.0, -1.0);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
}
void setupRc(void){
glClearColor(0.0f,0.0f,1.0f,1.0f);
}
void main(void)
{
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
glutCreateWindow("GL Rect");
glutDisplayFunc(scene);
glutReshapeFunc(ChangeSize);
setupRc();
glutMainLoop();
}
//---------------------------------------------------------------------------
When I attempt to run the binary generated here is the message I get:
relocation error: /usr/lib/libglut.so.3 undefined symbol:
XmuLookupStandardColormap
I have an e-machine with an intel810 onboard video card.
I s my system not compliant with OpenGL? Has anyone had any luck with
developing with Kylix and openGL?
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|