Where to start with screeensaver developing for XBMC? - Printable Version
+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Development (/forumdisplay.php?fid=32)
+--- Forum: Visualization and Screensaver Development (/forumdisplay.php?fid=38)
+--- Thread: Where to start with screeensaver developing for XBMC? (/showthread.php?tid=84170)
Pages: 1 2
Where to start with screeensaver developing for XBMC? - eyes - 2010-10-27 17:18
I'm new in this forum and also developing for xbmc.
I would like to develop a screen-saver, something easy, something like the slide show of images.
Could someone tell me how can I start? which documents do I have to read? which examples should I review? If there is a template to develop.
Any help or comment will be welcome.
thanks in advance.
- spiff - 2010-10-28 09:33
actually the builtins are horrid examples. atm we have very few screensavers - the rsxs based ones for linux only from the looks of it.
- eyes - 2010-10-28 10:35
Thanks, but there is a mail list or something where I can ask from the first beginning how to start to program/develop a new screensaver, addon, or any other module for xbmc
- Ebbo - 2010-10-28 10:49
I'm also interested in developing a new slideshow.
- spiff - 2010-10-28 12:30
unfortunately it's to a large extent monkey see, monkey do (i.e. you have to read it from sources). the interface is given in xbmc/addons/ScreenSaver.h/cpp and xbmc/addons/include/xbmc_scr*.h
the rsxs ones are the only example as i said, see xbmc/screensavers/rsxs-0.9/src/euphoria/euphoria.cc for instance.
finally you have the add-on definition bits, see addons/screensaver.rsxs.euphoria/addon.xml
- phymata - 2011-02-03 05:59
I have the same question. Did you ever come across any good resources?
- outfoxer - 2011-04-05 12:53
Same question, where to start?
I want just simple text screensaver with quotes loaded from forismatic.com API.
- derossi - 2011-04-24 20:09
spiff Wrote:unfortunately it's to a large extent monkey see, monkey do (i.e. you have to read it from sources). the interface is given in xbmc/addons/ScreenSaver.h/cpp and xbmc/addons/include/xbmc_scr*.h
I've been going down this path with some progress, but it's slow. My short-term objective is to produce a minimal screensaver with source and documentation that we can all use as a starting point. At the moment, I have code compiling, loading, and running but it doesn't do anything yet except clear the screen to a solid color.
As a test case, I'm using the small classic gears example from the OpenGL docs.
My current problem is that I don't know what OpenGL state I'm allowed to mess with and what I need to save/restore so I don't mess up XBMC. If I run the gears init() function without changes, then when my screensaver stops I'm left with a black screen. XBMC is functional and responds to the keyboard, but it can't draw its GUI. Any quick answers about how to leave things in a state that XBMC needs would be appreciated.
- bobo1on1 - 2011-04-27 20:27
Can you give a link to the code you're trying to port?
- derossi - 2011-04-28 07:58
bobo1on1 Wrote:Can you give a link to the code you're trying to port?
The code is gears.c here: http://www.opengl.org/resources/code/samples/glut_examples/mesademos/mesademos.html
Since I've made further progress, let me go into some more detail--
In Start(), I'm doing this:
This actually works (yay!), but leaves some nagging questions:
If I don't include the glPushAttrib() and glPopAttrib() calls, then when the screensaver is stopped, XBMC shows only black screens. It responds to keyboard & mouse, so isn't hung, but its ability to show anything is messed up.
But doing glPushAttrib() in Start() and glPopAttrib() in Stop() seems risky. Assume XBMC someday does:
On the other hand, pushing all the attributes, setting them the way I need them, drawing my screen, and popping all the attributes every time that Render() is called would be nice to avoid if it isn't necessary. In fact, I think that popping all the attributes would release by display lists, and setting those up really should only have to happen once.
But if the rule is that the OpenGL state upon each entry to Render() is arbitrary and must always be set up completely each time, then that would be good to know and document.
A similar but less intrusive questions comes with the projection and modelview matrices. Even if my screensaver is running, I notice that XBMC changes these matrices between calling Start() and calling Render(). At the very least whatever it's doing seems unnecessary since the screensaver occupies the entire screen.
Any input appreciated.