Michaël Lemaire
6521d44916
git-svn-id: https://subversion.assembla.com/svn/thunderk/paysages@528 b1fd45b6-86a6-48da-8261-f70d1f35bdcc
37 lines
1 KiB
C
37 lines
1 KiB
C
#ifndef _PAYSAGES_SHARED_PREVIEW_H_
|
|
#define _PAYSAGES_SHARED_PREVIEW_H_
|
|
|
|
/*
|
|
* Preview management.
|
|
*/
|
|
|
|
#include "types.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef struct PreviewRenderer PreviewRenderer;
|
|
|
|
typedef void (*FuncPreviewCustomizeRenderer)(PreviewRenderer* preview_renderer, Renderer* renderer);
|
|
typedef void (*FuncPreviewBindDefinition)(PreviewRenderer* renderer, void* definition);
|
|
typedef Color (*FuncPreviewGetPixelColor)(PreviewRenderer* renderer, double x, double y, double scaling);
|
|
|
|
typedef struct {
|
|
PreviewRenderer* (*createRenderer)();
|
|
void (*deleteRenderer)(PreviewRenderer* renderer);
|
|
|
|
void (*setCamera)(PreviewRenderer* renderer, Vector3 location, Vector3 target);
|
|
|
|
FuncPreviewCustomizeRenderer customizeRenderer;
|
|
FuncPreviewBindDefinition bindDefinition;
|
|
FuncPreviewGetPixelColor getPixelColor;
|
|
} PreviewClass;
|
|
|
|
PreviewClass previewCreateClass(FuncPreviewCustomizeRenderer customizeRenderer, FuncPreviewBindDefinition bindDefinition, FuncPreviewGetPixelColor getPixelColor);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|