Jump to content

  • Log In with Google      Sign In   
  • Create Account


pandaraf

Member Since 18 Apr 2012
Offline Last Active Jul 01 2012 07:43 PM

Posts I've Made

In Topic: Need Help : How to make buttons in SDL_opengl?

23 June 2012 - 05:21 PM

I'm not really sure about *nix, but as far as I've heard, yes, it does run. GLUI depends on GLUT.

So the dependency chain would be GLUI -> GLUT -> OpenGL (SDL_OpenGL).

Hope you manage to complete what you want Posted Image


Oh, so that is how they are work :D
Do you have a link that contain how to setting glut and glui in an IDE?

I have search in google, but it really hard to find the correct one :S

In Topic: Need Help : How to make buttons in SDL_opengl?

22 June 2012 - 06:52 PM

3) as for making buttons in SDL_openGL, you can either a) use a library such as GLUT(http://www.opengl.or...libraries/glut/) or b) roll your own menu system. I'd suggest using GLUT if you're a beginner. (being quite new to this myself, it's helped me save loads of trouble )


Hmm...

1. Is GLUT can run in Ubuntu?
2. How about GLUI, what's the difference?
3. If neither of them, is SDL_opengl can make Buttons by itself? or still need another library?

Perharps, i will use one of them.

In Topic: Need Help : SDL_FreeSurface doesn't work?

18 April 2012 - 10:29 PM

Looks to me like the problem is that you are simply repainting the time without repainting the background first. Think of the surface as an actual canvas for a second. You have a picture on the there. Then you create a picture of the time. Next you paint that time picture onto your canvas surface. Before restarting the loop, you free the time picture (this doesn't affect the canvas image which still has the time already painted onto it). Then you get the new time, and paint the new time onto the surface (over the old time, but without removing the old time). If you want to erase the previous surface, what you really need to do is at the beginning of each loop re-apply the background (thus painting over the old time).

SDL_FreeSurface frees the image from memory, but it doesn't erase the image from other surfaces on which it has already been "painted".

Does that make sense?


Woah, that make sense. I should repaint the background before the surface appear? Thank You very much! Posted Image

In Topic: Need Help : error: syntax error before `*' token

18 April 2012 - 11:01 AM

Awesome! Thank You Posted Image

PARTNERS