pandaraf

Member
  • Content count

    8
  • Joined

  • Last visited

Community Reputation

108 Neutral

About pandaraf

  • Rank
    Newbie
  1. [quote name='bollµ' timestamp='1340464256' post='4952014'] 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 [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img] [/quote] Oh, so that is how they are work 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
  2. [quote name='bollµ' timestamp='1340370862' post='4951727'] 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 ) [/quote] 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.
  3. How to make buttons in SDL_opengl? When i'm using SDL and use BlitSurface to make button, it's work! But, currently i'm using SDL_opengl, How can i make buttons in SDL_opengl? SDL_BlitSurface isn't work in SDL_OpenGL. Any Help?
  4. Hi, i want to make buttons like Lazyfoo has : [url="http://lazyfoo.net/SDL_tutorials/lesson09/index.php"]http://lazyfoo.net/S...son09/index.php[/url] It use SDL_BlitSurface, i try that and work! But, actually i use SDL_opengl for the project. So, i can't use syntax like : "apply_surface( box.x, box.y, buttonSheet, screen, clip )" again. [img]http://public.gamedev.net//public/style_emoticons/default/sad.png[/img] I use this : "void muncul(int x, int y, int x2, int y2, int x3, int y3, int x4, int y4, GLuint xyz)" that work for show texture correctly. Of course, its only image that appeared. Not like buttons that has mouse_over, mouse_up, mouse_down and mouse_out(like lazyfoo). [img]http://public.gamedev.net//public/style_emoticons/default/biggrin.png[/img] I want to make buttons in SDL_opengl [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img] So, How to use SDL_BlitSurface to make Button in SDL_opengl?
  5. Need Help : SDL_FreeSurface doesn't work?

    [quote name='Zael' timestamp='1334807632' post='4932679'] 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? [/quote] Woah, that make sense. I should repaint the background before the surface appear? Thank You very much! [img]http://public.gamedev.net//public/style_emoticons/default/wink.png[/img]
  6. This is the code for the SDL_FreeSurface : inside int main : [CODE] Uint32 start = 0; bool running = true; start = SDL_GetTicks(); [/CODE] and [CODE] while(QUIT==false){ if( running == true ) { std::stringstream time; time << "Timer: " << SDL_GetTicks() - start; seconds = TTF_RenderText_Solid( font, time.str().c_str(), black ); apply_surface(( SCREEN_WIDTH - seconds->w ) / 2, 100, seconds, SCREEN ); //This line : SDL_FreeSurface( seconds ); } [/CODE] and this is what the screens say : [sharedmedia=gallery:images:2080] The text appear without erasing the previous surface. Any suggest? [img]http://public.gamedev.net//public/style_emoticons/default/mellow.png[/img]
  7. SDL on study

    sdl
  8. Need Help : error: syntax error before `*' token

    Awesome! Thank You [img]http://public.gamedev.net//public/style_emoticons/default/biggrin.png[/img]
  9. Until this topic posted, i didn't found the solution. This thing made me told there's something wrong in the MinGW Developer Studio. Or perharps, it's only my depression [img]http://public.gamedev.net//public/style_emoticons/default/blink.png[/img] . This is the codes i wrote : [CODE] //music Mix_Music *music = NULL //additional musics Mix_Chunk *muks = NULL; Mix_Chunk *music2 = NULL; Mix_Chunk *music3 = NULL; Mix_Chunk *music4 = NULL; [/CODE] and [CODE] void clean() { Mix_HaltMusic(); Mix_FreeMusic( music ); Mix_FreeChunk( muks ); Mix_FreeChunk( music2 ); Mix_FreeChunk( music3 ); Mix_FreeChunk( music4 ); Mix_CloseAudio(); [/CODE] and [CODE] bool load_files() { music = Mix_LoadMUS( "vq.wav" ); if( music == NULL ) { return false; } muks = Mix_LoadWAV( "01.wav" ); music2 = Mix_LoadWAV( "02.wav" ); music3 = Mix_LoadWAV( "03.wav" ); music4 = Mix_LoadWAV( "04.wav" ); if( ( muks == NULL ) || (music2 == NULL ) || (music3 == NULL ) || (music4 == NULL ) ) { return false; } [/CODE] then, the error was : [CODE] --------------------Configuration: my project - Debug-------------------- Compiling... ini.cpp ini.cpp:21: error: syntax error before `*' token ini.cpp: In function `bool load_files()': ini.cpp:223: error: `muks' undeclared (first use this function) ini.cpp:223: error: (Each undeclared identifier is reported only once for each function it appears in.) ini.o - 3 error(s), 0 warning(s) [/CODE] any suggest? [img]http://public.gamedev.net//public/style_emoticons/default/mellow.png[/img]