summaryrefslogtreecommitdiff
path: root/LayerManagerPlugins/Renderers/Platform/X11GLESRenderer/include/X11GLESRenderer.h
blob: 7d976794b391a1e8d83c1c70d8800d739f327b2f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/***************************************************************************
*
* Copyright 2010 BMW Car IT GmbH
* Copyright (c) 2012, NVIDIA CORPORATION.  All rights reserved.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*        http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
****************************************************************************/

#ifndef _X11GLESRENDERER_H_
#define _X11GLESRENDERER_H_

#include "BaseRenderer.h"
#include "LayerList.h"
#include "GraphicSystems/GLESGraphicSystem.h"
#include "WindowSystems/X11WindowSystem.h"

class X11GLESRenderer : public BaseRenderer
{
public:
    X11GLESRenderer(ICommandExecutor& executor, Configuration& config);
    bool start(int, int, const char*, int);
    void stop();
    void doScreenShot(std::string fileToSave);
    void doScreenShotOfLayer(std::string fileToSave, uint id);
    void doScreenShotOfSurface(std::string fileToSave, uint id, uint layer_id);
    uint getNumberOfHardwareLayers(uint screenID);
    uint* getScreenResolution(uint screenID);
    uint* getScreenIDs(uint* length);
    void signalWindowSystemRedraw();
    void forceCompositionWindowSystem();
    Shader* createShader(const string* vertexName, const string* fragmentName);
    virtual bool setOptimizationMode(OptimizationType id, OptimizationModeType mode);
    virtual bool getOptimizationMode(OptimizationType id, OptimizationModeType *mode);
    virtual int getIterationCounter();

    // from PluginBase
    virtual t_ilm_const_string pluginGetName() const;

private:
    X11WindowSystem* m_pWindowSystem;
    GLESGraphicsystem* m_pGraphicSystem;
    uint m_width;
    uint m_height;
    ITextureBinder* m_binder;
    int m_maxIterationDurationInMS;
};

#endif /* _X11GLESRENDERER_H_*/