BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

open GL and Kylix

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Graphics)
View previous topic :: View next topic  
Author Message
dhughes
Guest





PostPosted: Sat Oct 18, 2003 7:53 pm    Post subject: open GL and Kylix Reply with 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 <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





PostPosted: Tue Oct 21, 2003 2:15 am    Post subject: Re: open GL and Kylix Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Graphics) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.