Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
glut compile and libraries
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Apreche
Guru
Guru


Joined: 18 Sep 2003
Posts: 506
Location: Beacon, NY

PostPosted: Fri Jan 16, 2004 10:30 pm    Post subject: glut compile and libraries Reply with quote

Okay, so I'm working on a really slick project for my CG2 class. I'm doing all the graphics work on the school's Sun Solaris machines in C using glut. There are two problems I've come across that I could use a little help with.

1) How do I get my program to cpmpile on my gentoo box at home? I know very little about libraries and linking and all that jazz. The only h file I include besides stdio and stdlib and such is GL/glut.h. It would be really sweet if I could get the program to compile on my system. It would be even sweeter if I could somehow get gcc to spit out a windows .exe file, but that can be saved for later when I'm done.

2) In glut using the available methods of drawing text on the screen kills my performance. Trying to put text on the screen using the glut api just drops the framerate like a rock. Not only that, but because of the way it works it is very difficult to display things like numbers. I was thinking about learning gtk, but I don't have time for that. Is there an easy way, in C, to get a dialog box to show up that has a few text boxes in it, and have the values in those boxes be set to the variables in my program in real time. I'm pretty much looking for a little dialog on the side that the user can use to view and edit some integers.

Thanks.
Back to top
View user's profile Send private message
discoflamingo
n00b
n00b


Joined: 21 Dec 2002
Posts: 16
Location: St Paul MN, USA

PostPosted: Tue Jan 20, 2004 10:50 pm    Post subject: Reply with quote

1) - do "emerge glut" - that should install the headers in the correct place, so that "#include <GL/glut.h>" works correctly.

2) When my friends were in CompGraphics, GLUT worked fine for little things like that - there may be a specific way to do it that you haven't seen before. Otherwise, you could use a widget library for that - http://freshmeat.net/articles/view/928/
If it has to run on Windows, you will need to make sure that the library is cross-platform.

And cross-compiling to Windows is a little advanced without some major work - I have not found it a simple thing to do in Gentoo, but you can google around for info if you're desperate for it.
_________________
-=- I can take you as far as Anchorhead -=-
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming 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