Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

108 Neutral

About pandaraf

  • Rank
  1. 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. 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 : http://lazyfoo.net/S...son09/index.php 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. 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). I want to make buttons in SDL_opengl So, How to use SDL_BlitSurface to make Button in SDL_opengl?
  5. pandaraf

    Need Help : SDL_FreeSurface doesn't work?

    Woah, that make sense. I should repaint the background before the surface appear? Thank You very much!
  6. This is the code for the SDL_FreeSurface : inside int main : Uint32 start = 0; bool running = true; start = SDL_GetTicks(); and 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 ); } and this is what the screens say : [sharedmedia=gallery:images:2080] The text appear without erasing the previous surface. Any suggest?
  7. pandaraf

    SDL on study

  8. 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 . This is the codes i wrote : //music Mix_Music *music = NULL //additional musics Mix_Chunk *muks = NULL; Mix_Chunk *music2 = NULL; Mix_Chunk *music3 = NULL; Mix_Chunk *music4 = NULL; and void clean() { Mix_HaltMusic(); Mix_FreeMusic( music ); Mix_FreeChunk( muks ); Mix_FreeChunk( music2 ); Mix_FreeChunk( music3 ); Mix_FreeChunk( music4 ); Mix_CloseAudio(); and 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; } then, the error was : --------------------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) any suggest?
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!