Thread: Re: [sdljava-users] sdljava-users Digest, Vol 1, Issue 161
Status: Beta
Brought to you by:
ivan_ganza
From: <dev...@im...> - 2006-06-16 11:25:34
|
Hi Ivan, I followed your guide line and writed a simple program in C to load a Ima= ge. In attach goes the program and the output. I think i'm having real problems here because it crashes before anything is done. Can you see if this error is known to you? Many thx, Nuno > Send sdljava-users mailing list submissions to > sdl...@li... > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/sdljava-users > or, via email, send a message with subject or body 'help' to > sdl...@li... > > You can reach the person managing the list at > sdl...@li... > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of sdljava-users digest..." > > > Today's Topics: > > 1. Re: SDLJava (Ivan Z. Ganza) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Tue, 13 Jun 2006 21:59:54 -0400 > From: "Ivan Z. Ganza" <iva...@ya...> > Subject: Re: [sdljava-users] SDLJava > To: Discussion for users of sdljava > <sdl...@li...> > Message-ID: <448...@ya...> > Content-Type: text/plain; charset=3DISO-8859-1; format=3Dflowed > > Hi Nuno, > > Sorry that your having trouble. I don't currently have a dev system > setup as I just built a 64 AMD box so I will do my best. > > First we need to narrow down where the problem is. If you could try to > load one of the picture using a straight C program that utilizes > SDL_image we could see how it looks there. If it looks funny in that > case we know its something that happening with SDL. If not the problem > must be somewhere between sdljava and the SDL layer. > > During my testing I never found that I had any problems when viewing th= e > images... > > Regarding OpenGL the only way it can be used is if you ask SDL to > initialize opengl in the setVideoMode(...) call. This will create a ne= w > GUI window (or fullscreen) -- so you do have to be within a graphical > env to have opengl. > > -Ivan/ > > Nuno Santos wrote: > >>Hi Ivan, >> >>I really need you help to put the images being displayed with color! >> >>I tought they appeared right in your initial examples but they don't >>too! >> >>Wicked!!! >> >>I've tried to make them files and read them then! They appear with >>strange colors as well. >> >>And about the OpenGl... Do i need to be within a graphical enviorment >>to have opengl? >> >>I would like to have opengl in the console with framebuffer... It's >>that possible? >> >>If so... can you tell me a opengl sdl java aplication to test it out? >>or something that can give me sure >> >>I really need you help to sort this image color thing >> >>I'm working on a project based on this tecnhologie and i have to >>present it in public and i'd love make a good image >> >>Many thx, >> >>Nuno >> >> >>_______________________________________________ >>sdljava-users mailing list >>sdl...@li... >>https://lists.sourceforge.net/lists/listinfo/sdljava-users >> >> > > > > > ------------------------------ > > > > ------------------------------ > > _______________________________________________ > sdljava-users mailing list > sdl...@li... > https://lists.sourceforge.net/lists/listinfo/sdljava-users > > > End of sdljava-users Digest, Vol 1, Issue 161 > ********************************************* > |
From: Ivan Z. G. <iva...@ya...> - 2006-06-20 01:21:46
|
Really sorry this isn't working for you. Unfortunatly I don't have a system up yet where I can develop. I have not been able to compile SDL yet under my 32 bit chroot. Working on it but time is scarce. So I'm not able to test... I noticed in the output your using the framebuffer device. I never tested with this myself. It should work though if SDL supports it, but, I never did try. Searching on Google I found this, maybe it will help you: http://mail.directfb.org/pipermail/directfb-users/2005-April/000121.html When you display the image that has strange colors is this also on the FB device? Perhaps we have a problem there... -Ivan/ dev...@im... wrote: >Hi Ivan, > >I followed your guide line and writed a simple program in C to load a Image. > >In attach goes the program and the output. > >I think i'm having real problems here because it crashes before anything >is done. > >Can you see if this error is known to you? > >Many thx, > >Nuno > > >>Send sdljava-users mailing list submissions to >> sdl...@li... >> >>To subscribe or unsubscribe via the World Wide Web, visit >> https://lists.sourceforge.net/lists/listinfo/sdljava-users >>or, via email, send a message with subject or body 'help' to >> sdl...@li... >> >>You can reach the person managing the list at >> sdl...@li... >> >>When replying, please edit your Subject line so it is more specific >>than "Re: Contents of sdljava-users digest..." >> >> >>Today's Topics: >> >> 1. Re: SDLJava (Ivan Z. Ganza) >> >> >>---------------------------------------------------------------------- >> >>Message: 1 >>Date: Tue, 13 Jun 2006 21:59:54 -0400 >>From: "Ivan Z. Ganza" <iva...@ya...> >>Subject: Re: [sdljava-users] SDLJava >>To: Discussion for users of sdljava >> <sdl...@li...> >>Message-ID: <448...@ya...> >>Content-Type: text/plain; charset=ISO-8859-1; format=flowed >> >>Hi Nuno, >> >>Sorry that your having trouble. I don't currently have a dev system >>setup as I just built a 64 AMD box so I will do my best. >> >>First we need to narrow down where the problem is. If you could try to >>load one of the picture using a straight C program that utilizes >>SDL_image we could see how it looks there. If it looks funny in that >>case we know its something that happening with SDL. If not the problem >>must be somewhere between sdljava and the SDL layer. >> >>During my testing I never found that I had any problems when viewing the >>images... >> >>Regarding OpenGL the only way it can be used is if you ask SDL to >>initialize opengl in the setVideoMode(...) call. This will create a new >>GUI window (or fullscreen) -- so you do have to be within a graphical >>env to have opengl. >> >>-Ivan/ >> >>Nuno Santos wrote: >> >> >> >>>Hi Ivan, >>> >>>I really need you help to put the images being displayed with color! >>> >>>I tought they appeared right in your initial examples but they don't >>>too! >>> >>>Wicked!!! >>> >>>I've tried to make them files and read them then! They appear with >>>strange colors as well. >>> >>>And about the OpenGl... Do i need to be within a graphical enviorment >>>to have opengl? >>> >>>I would like to have opengl in the console with framebuffer... It's >>>that possible? >>> >>>If so... can you tell me a opengl sdl java aplication to test it out? >>>or something that can give me sure >>> >>>I really need you help to sort this image color thing >>> >>>I'm working on a project based on this tecnhologie and i have to >>>present it in public and i'd love make a good image >>> >>>Many thx, >>> >>>Nuno >>> >>> >>>_______________________________________________ >>>sdljava-users mailing list >>>sdl...@li... >>>https://lists.sourceforge.net/lists/listinfo/sdljava-users >>> >>> >>> >>> >> >> >>------------------------------ >> >> >> >>------------------------------ >> >>_______________________________________________ >>sdljava-users mailing list >>sdl...@li... >>https://lists.sourceforge.net/lists/listinfo/sdljava-users >> >> >>End of sdljava-users Digest, Vol 1, Issue 161 >>********************************************* >> >> >> >>------------------------------------------------------------------------ >> >>#include <stdlib.h> >>#include "/usr/include/SDL/SDL.h" >> >>SDL_Surface *message = NULL; >>SDL_Surface *background = NULL; >>SDL_Surface *screen = NULL; >> >>SDL_Surface *load_image(char* filename) { >> SDL_Surface* loadedImage = NULL; >> SDL_Surface* optimizedImage = NULL; >> >> loadedImage = SDL_LoadBMP(filename); >> >> if (loadedImage != NULL) { >> optimizedImage = SDL_DisplayFormat(loadedImage); >> SDL_FreeSurface(loadedImage); >> } >> return optimizedImage; >>} >> >>void apply_surface(int x, int y, SDL_Surface* source, SDL_Surface* destination) { >> SDL_Rect offset; >> offset.x = x; >> offset.y = y; >> SDL_BlitSurface(source,NULL,destination,&offset); >> >>} >> >> >>main (int argc, char *argv[]) { >> if (SDL_Init(SDL_INIT_EVERYTHING)<0) { >> fprintf(stderr, "Unable to init SDL: %s\n",SDL_GetError()); >> exit(1); >> } >> screen = SDL_SetVideoMode(800,600,24,SDL_SWSURFACE); >> if (screen==NULL) { >> return 1; >> } >> >> background = load_image("icon.bmp"); >> apply_surface(0,0,background,screen); >> >> if (SDL_Flip(screen)==-1) { >> return 1; >> } >> SDL_Delay(5000); >> >> SDL_FreeSurface(background); >> SDL_Quit(); >> return 0; >> >> atexit(SDL_Quit); >>} >> >>------------------------------------------------------------------------ >> >>_______________________________________________ >>sdljava-users mailing list >>sdl...@li... >>https://lists.sourceforge.net/lists/listinfo/sdljava-users >> >> |