X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=README;h=8564c854f5d60e4249a06edd7727c0d8d645a5db;hb=e4ec2b7ca040989ab38f86144116217312c260b5;hp=54043d1c6890ac8a7b6daa91554bcd72717eac38;hpb=66a211d2b032871b8fbf156f4f7bd7467a2d3d60;p=profile%2Fivi%2Flayer-management.git diff --git a/README b/README index 54043d1..8564c85 100644 --- a/README +++ b/README @@ -3,6 +3,8 @@ Sections in this file describe: - Component Overview - Required platform capabilities - How to build on different platforms +- Change the environment during Runtime +- Running Testapplications Introduction @@ -71,6 +73,7 @@ Extensions have to be supported by the TargetPlatform : X11 Extensions: x-composite : This extension should support redirecting of egl Surfaces to x11 pixmaps too. +x-damage EGL / OpenGL ES 2.0: @@ -81,67 +84,219 @@ eglCreateImageKHR eglDestroyImageKHR Furthermore it should be supported to create an egl image from an x11 pixmap. -Beagle board platform +Platform with X11 and OpenGL === -If you have choosen the BeagleRenderer as rendering backend, than the following -kernel module must be available too : +If you have choosen the GLXRenderer as rendering backend, then the following +Extensions have to be supported by the TargetPlatform : -CMEM Module is needed, it can be downloaded from +X11 Extensions: -http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/linuxutils/index.html +x-composite : This extension should support redirecting of egl Surfaces to x11 pixmaps too. +x-damage : This extension is required to render surfaces only, if there content has changed. -The EGL implementation on the beagle board should support the following egl config: +GLX / OpenGL : -EGL_SURFACE_TYPE = EGL_WINDOW_BIT | EGL_PIXMAP_BIT -EGL_RENDERABLE_TYPE = EGL_OPENGL_ES2_BIT, -EGL_RED_SIZE = 8 -EGL_ALPHA_SIZE = 8 -EGL_BIND_TO_TEXTURE_RGBA = EGL_TRUE +GLX_TEXTURE_FROM_PIXMAP : +The following functions should be supported by the vendor specific graphic driver +Furthermore it should be supported to create an texture from an x11 pixmap. -Furthermore the application which should be rendered by the layermanagement, should initialize egl -by the following steps: - -1. Get EGL Display -2. Initialize EGL -3. Bind API -4. Choose EGL Config -5. Allocate native pixmap Structure -6. Allocate native pixmap space by CMEM_alloc -7. Get physical address of native pixmap using the CMEM module, and assign the address to the native pixmap structure. -8. Create egl pixmap surface using the allocated native pixmap. -9. Create egl context. -10. Make egl context with the surface as current. How to build on different platforms ==================================== -If you want to build the layermanagement on your own platform than you have to use the following -command line call: +These conditions need to be met in order to build the LayerManager component: + +- CMake required (version 2.6 or higher) + +Building the LayerManager breaks down to the following steps: + +1. Pull the current codebase from the git repository to your target source directory [referred to as ] + + Example: git clone https://git.genivi.org/srv/git/layer_management + + This should give you a directory called "layer_management" in your current directory. + +2. Create a build directory, e.g. IVILayerManagement_build [referred to as ] + + Example: mkdir IVILayerManagement_build -make all [CONFIG=PLATFORM COMMUNICATOR=MyCommunicator RENDERER=MyRenderer] +3. In Generate build system for your platform using CMake. + This step provides some customization options to configure build options. -Example for Beagle Board: -make all CONFIG=Beagle + Example: cd + cmake [optional_build_options] + + For a full list of available build options in [optional_build_options] see "Supported Build Options" -If you want you have to provide an additional platform definition file which -should located at LayerManagerPlatform. The file should provide the following content : +4. Start the build. -MyPlatform.defs: + Example: make -RENDERER=MyRenderer -COMMUNICATOR=MyComunicator +5. Install LayerManager on local system. + Note: This step will require root priviledges on most systems. -CXXFLAGS = -Wall -fPIC -O2 + Example: sudo make install + +The LayerManager may now be started by calling "LayerManagerService". + +Needed Libraries +=== + +You need both development packages and libraries for + +LayerManagerService +-- +libdbus-1-dev + +X11GLESRenderer: +-- +Core X11 libraries +X11 Composite libraries + +Vendor specific EGL 1.4 Libraries, which are support the EGL_IMAGE_KHR Extension including +build an EGL Image from X11Pixmap +Vendor specific OpenGL ES 2.0 Libraries, with JIT compiler to support shader which are +delivered as source code + +X11Renderer: +--- +Core X11 libraries +X11 Composite libraries + +OpenGL 1.1 +GLX + +Supported Build Options +=== -ADD_INCLUDE_DIR+= +- Build configuration: + Option: -DCMAKE_BUILD_TYPE=Debug or + -DCMAKE_BUILD_TYPE=Release -ADD_LIB_DIR+= +- Build for X11 Desktop with OpenGL / GLX Renderer + Option: -DWITH_DESKTOP=ON or + -DWITH_DESKTOP=OFF -LINKFLAGS = -Xlinker -export-dynamic +- Build for X11 with OpenGL ES 2.0 Renderer + Option: -DWITH_X11_GLES=ON or + -DWITH_X11_GLES=OFF + +- Build EGL examples + Option: -DWITH_EGL_EXAMPLE=ON or + -DWITH_EGL_EXAMPLE=OFF + +- Build OpenGL / GLX examples + Option: -DWITH_GLX_EXAMPLE=ON or + -DWITH_GLX_EXAMPLE=OFF + +- Build Client examples + Option: -DWITH_CLIENT_EXAMPLES=ON or + -DWITH_CLIENT_EXAMPLES=OFF + +- Build with copy of textures for target platform which does not support the + GLX_TEXTURE_FROM_PIXMAP or EGL_IMAGE_KHR on X11 pixmaps Extensions + Option: -DWITH_FORCE_COPY=ON or + -DWITH_FORCE_COPY=OFF + +- Build available tests + Option: -DWITH_TESTS=ON or + -DWITH_TESTS=OFF + + Remark: Test File are currently not upstreamed. + +- Build for different Platforms + + You have the choice to use GLXRenderer or X11GLESRenderer. + + GLXRenderer (X11Renderer.so) which is normaly used for a Desktop, VMWare Image and GMA500 based Headunits + + cmake / -DWITH_DESKTOP=ON -DWITH_GLX_EXAMPLE=ON -DWITH_TESTS=OFF -DWITH_EGL_EXAMPLE=OFF -DWITH_X11_GLES=OFF + + X11GLESRenderer which is used on more embedded device which are supporting EGL and OpenGL ES 2.0 + + cmake / -DWITH_DESKTOP=OFF -DWITH_GLX_EXAMPLE=OFF -DWITH_TESTS=OFF -DWITH_EGL_EXAMPLE=ON -DWITH_X11_GLES=ON + +Change the Environment during Runtime +===================================== +The following environments can be set to change the runtime behaviour. + +LM_PLUGIN_PATH set the path for the location of communicator and renderer PlugIns + default : /usr/lib/layermanager + Example : export LM_PLUGIN_PATH= /usr/local/lib/layermanager + +LM_USE_SESSION_BUS enables the DBUS communication to run on Session bus instead of Systembus + default : disabled run on system bus + Example : export LM_USE_SESSION_BUS=enable + +Commandline parameter : +LayerManagerService : -w - default 1280 + -h - default 480 + -c - default 2 (only errors and info) + -f - default 0 (disabled) log file location is /tmp/LayerManagerService.log + possible debug levels : 0 disabled + 1 errors + 2 info,errors + 3 info,errors, warnings + 4 info,errors, warnings,debug + -v shows version of layermanager + +Running Testapplications +===================================== + +1. Starting the service + +precondition : + +install prefix is /usr/local +no compositing manager is running like openbox xfce metacity, kill these if needed + +run: +#> export DISPLAY=:0 +#> export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib +#> export LM_PLUGIN_PATH=/usr/local/lib/layermanager +#> LayerManagerService & + +2. Running OpenGL / OpenGL ES 2.0 Example Applications + +precondition : + +install prefix is /usr/local +LayerManagerService Running + +run: +#> export DISPLAY=:0 +#> export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib +OpenGL ES Example +#> EGLX11ApplicationExample & +OpenGL Example +#> GLX11ApplicationExample & + +3. Running LayerManagerControl + +The LayerManagerControl can be used to change and debug +the runtime behaviour of the service. + +Please Call : +LayerManagerControl without arguments to see a list of supported commands + +Examples + LayerManagerControl get scene + LayerManagerControl get layers + LayerManagerControl get layer 1000 + LayerManagerControl get surfaces + LayerManagerControl get surface 0xa + LayerManagerControl analyze surface 10 + LayerManagerControl scatter + LayerManagerControl watch surface 0xa -CXX = - +precondition : +install prefix is /usr/local +LayerManagerService Running +run: +#> export DISPLAY=:0 +#> export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib +#> LayerManagerControl [command]