RaumTrug
May 3rd, 2009, 02:30 PM
recently I got fed-up with the standard ubuntu bootsplash and had a look at how to create own modules for usplash. to my delight I found the basic architecture to be "able" not only to cast static images onto the screen, but 25 fps animations...wich already works well with things like animated bitmaps, one just has to load all frames into the object, etc...
however, I'd like to go a little further and make demostyle realtime generated animations/effects - oldschool stuff should meet the prerequisites of low cpu load, low resolution and palleted colordepth very well.
unfortunately the usplash architecture doesn't provide means for this, most notably access to the framebuffer or means to pass a backbuffer to the library in order to let it update the screen itself.
is there probably any "workaround" for this, _without_ having to modify the usplash library itself as it is right now? I want my animations not only running on my own pc, but share them with others, not having to entice them to warble around with their system too much ;)
I thought about a few approaches to acchieve this, but am to timid of trying them out, in order not to render my sole pc unbootable; so I ask you to tell what you think about them:
-1. try to get access to the framebuffer via bogl; bogl.h features a putpixel method, boglP.h features a pointer to screen mem...but what happens if usplash decides to use the svgalib drivers...and is it possible to access the bogl internals in usplash this way, as it's most probably statically linked? if it's possible, would there be any way to find out wich driver usplash is using from the init method, and then get a framebuffer pointer for/from the right library?
-2. probably the "safer" method: usplash provides means to put a bitmap onto screen, but the headers say it's run-length encoded. the easiest method would of course be using a screen-sized usplash_bitmap as backbuffer, and render to screen by "putting" it. any ideas/help on how to get a standard 8bit backbuffer in this format?
-3. usplash does no retrace syncing, wich is very annoying even at the simple standard theme "pulsating" bar: it's teared horizontally almost all the time. any ideas on how to get this working properly? I fear the idea of having to watch a fullscreen animation that's spliced-up all the time...
also, does the usplash plugin really _have_ to provide a screen sized background image? it's a waste of space and memory, better for my approach would be to provide only the desired resolution(s) instead of having to suplly empty bitmaps in each resolution supported...any ideas on how to avoid wasting this memory?
-TraumFlug
...oops, I accidentally postet this to the wrong forum!! this should be in the "Programming Talk", not in the "Dev Link" forum, of course; my first post here, I apologise for this, won't happen again. ...now could this be moved...?
however, I'd like to go a little further and make demostyle realtime generated animations/effects - oldschool stuff should meet the prerequisites of low cpu load, low resolution and palleted colordepth very well.
unfortunately the usplash architecture doesn't provide means for this, most notably access to the framebuffer or means to pass a backbuffer to the library in order to let it update the screen itself.
is there probably any "workaround" for this, _without_ having to modify the usplash library itself as it is right now? I want my animations not only running on my own pc, but share them with others, not having to entice them to warble around with their system too much ;)
I thought about a few approaches to acchieve this, but am to timid of trying them out, in order not to render my sole pc unbootable; so I ask you to tell what you think about them:
-1. try to get access to the framebuffer via bogl; bogl.h features a putpixel method, boglP.h features a pointer to screen mem...but what happens if usplash decides to use the svgalib drivers...and is it possible to access the bogl internals in usplash this way, as it's most probably statically linked? if it's possible, would there be any way to find out wich driver usplash is using from the init method, and then get a framebuffer pointer for/from the right library?
-2. probably the "safer" method: usplash provides means to put a bitmap onto screen, but the headers say it's run-length encoded. the easiest method would of course be using a screen-sized usplash_bitmap as backbuffer, and render to screen by "putting" it. any ideas/help on how to get a standard 8bit backbuffer in this format?
-3. usplash does no retrace syncing, wich is very annoying even at the simple standard theme "pulsating" bar: it's teared horizontally almost all the time. any ideas on how to get this working properly? I fear the idea of having to watch a fullscreen animation that's spliced-up all the time...
also, does the usplash plugin really _have_ to provide a screen sized background image? it's a waste of space and memory, better for my approach would be to provide only the desired resolution(s) instead of having to suplly empty bitmaps in each resolution supported...any ideas on how to avoid wasting this memory?
-TraumFlug
...oops, I accidentally postet this to the wrong forum!! this should be in the "Programming Talk", not in the "Dev Link" forum, of course; my first post here, I apologise for this, won't happen again. ...now could this be moved...?