source_file = [
- 'tvgGlRaster.h',
- 'tvgGlRaster.cpp',
+ 'tvgGlEngine.h',
+ 'tvgGlEngine.cpp',
]
glraster_dep = declare_dependency(
* limitations under the License.
*
*/
-#ifndef _TVG_GL_RASTER_CPP_
-#define _TVG_GL_RASTER_CPP_
+#ifndef _TVG_GL_ENGINE_CPP_
+#define _TVG_GL_ENGINE_CPP_
#include "tvgCommon.h"
-#include "tvgGlRaster.h"
+#include "tvgGlEngine.h"
-static GlRaster* pInst = nullptr;
+static GlEngine* pInst = nullptr;
struct GlShape
{
};
-void* GlRaster::prepare(const ShapeNode& shape, void* data, UpdateFlag flags)
+void* GlEngine::prepare(const ShapeNode& shape, void* data, UpdateFlag flags)
{
//prepare shape data
GlShape* sdata = static_cast<GlShape*>(data);
}
-int GlRaster::init()
+int GlEngine::init()
{
if (pInst) return -1;
- pInst = new GlRaster();
+ pInst = new GlEngine();
assert(pInst);
return 0;
}
-int GlRaster::term()
+int GlEngine::term()
{
if (!pInst) return -1;
- cout << "GlRaster(" << pInst << ") destroyed!" << endl;
+ cout << "GlEngine(" << pInst << ") destroyed!" << endl;
delete(pInst);
pInst = nullptr;
return 0;
}
-GlRaster* GlRaster::inst()
+GlEngine* GlEngine::inst()
{
assert(pInst);
return pInst;
}
-#endif /* _TVG_GL_RASTER_CPP_ */
+#endif /* _TVG_GL_ENGINE_CPP_ */
* limitations under the License.
*
*/
-#ifndef _TVG_GL_RASTER_H_
-#define _TVG_GL_RASTER_H_
+#ifndef _TVG_GL_ENGINE_H_
+#define _TVG_GL_ENGINE_H_
namespace tvg
{
-class GlRaster : public RasterMethod
+class GlEngine : public RasterMethod
{
public:
void* prepare(const ShapeNode& shape, void* data, UpdateFlag flags) override;
- static GlRaster* inst();
+ static GlEngine* inst();
static int init();
static int term();
private:
- GlRaster(){};
- ~GlRaster(){};
+ GlEngine(){};
+ ~GlEngine(){};
};
}
-#endif /* _TVG_GL_RASTER_H_ */
+#endif /* _TVG_GL_ENGINE_H_ */
source_file = [
'tvgSwCommon.h',
- 'tvgSwRaster.h',
- 'tvgSwRaster.cpp',
+ 'tvgSwEngine.h',
+ 'tvgSwEngine.cpp',
'tvgSwShape.cpp',
'tvgSwRle.cpp',
]
* limitations under the License.
*
*/
-#ifndef _TVG_SW_RASTER_CPP_
-#define _TVG_SW_RASTER_CPP_
+#ifndef _TVG_SW_ENGINE_CPP_
+#define _TVG_SW_ENGINE_CPP_
#include "tvgSwCommon.h"
-#include "tvgSwRaster.h"
+#include "tvgSwEngine.h"
/************************************************************************/
/* Internal Class Implementation */
/************************************************************************/
-static SwRaster* pInst = nullptr;
+static SwEngine* pInst = nullptr;
/************************************************************************/
/* External Class Implementation */
/************************************************************************/
-void* SwRaster::prepare(const ShapeNode& shape, void* data, UpdateFlag flags)
+void* SwEngine::prepare(const ShapeNode& shape, void* data, UpdateFlag flags)
{
//prepare shape data
SwShape* sdata = static_cast<SwShape*>(data);
}
-int SwRaster::init()
+int SwEngine::init()
{
if (pInst) return -1;
- pInst = new SwRaster();
+ pInst = new SwEngine();
assert(pInst);
return 0;
}
-int SwRaster::term()
+int SwEngine::term()
{
if (!pInst) return -1;
- cout << "SwRaster(" << pInst << ") destroyed!" << endl;
+ cout << "SwEngine(" << pInst << ") destroyed!" << endl;
delete(pInst);
pInst = nullptr;
return 0;
}
-SwRaster* SwRaster::inst()
+SwEngine* SwEngine::inst()
{
assert(pInst);
return pInst;
}
-#endif /* _TVG_SW_RASTER_CPP_ */
+#endif /* _TVG_SW_ENGINE_CPP_ */
* limitations under the License.
*
*/
-#ifndef _TVG_SW_RASTER_H_
-#define _TVG_SW_RASTER_H_
+#ifndef _TVG_SW_ENGINE_H_
+#define _TVG_SW_ENGINE_H_
-class SwRaster : public RasterMethod
+class SwEngine : public RasterMethod
{
public:
void* prepare(const ShapeNode& shape, void* data, UpdateFlag flags) override;
- static SwRaster* inst();
+ static SwEngine* inst();
static int init();
static int term();
private:
- SwRaster(){};
- ~SwRaster(){};
+ SwEngine(){};
+ ~SwEngine(){};
};
-#endif /* _TVG_SW_RASTER_H_ */
+#endif /* _TVG_SW_ENGINE_H_ */
#define _TVG_ENGINE_CPP_
#include "tvgCommon.h"
-#include "tvgSwRaster.h"
-#include "tvgGlRaster.h"
+#include "tvgSwEngine.h"
+#include "tvgGlEngine.h"
/************************************************************************/
/* Internal Class Implementation */
//TODO: Initialize Raster engines by configuration.
int ret = 0;
- ret |= SwRaster::init();
- ret |= GlRaster::init();
+ ret |= SwEngine::init();
+ ret |= GlEngine::init();
return ret;
}
int Engine::term() noexcept
{
int ret = 0;
- ret |= SwRaster::term();
- ret |= GlRaster::term();
+ ret |= SwEngine::term();
+ ret |= GlEngine::term();
return ret;
}
#include "tvgCommon.h"
#include "tvgCanvasBase.h"
-#include "tvgGlRaster.h"
+#include "tvgGlEngine.h"
/************************************************************************/
/* Internal Class Implementation */
struct GlCanvas::Impl : CanvasBase
{
- Impl() : CanvasBase(GlRaster::inst()) {}
+ Impl() : CanvasBase(GlEngine::inst()) {}
};
#include "tvgCommon.h"
#include "tvgCanvasBase.h"
-#include "tvgSwRaster.h"
+#include "tvgSwEngine.h"
/************************************************************************/
int stride = 0;
int height = 0;
- Impl() : CanvasBase(SwRaster::inst()) {}
+ Impl() : CanvasBase(SwEngine::inst()) {}
};