123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- #ifndef ANDROID_RS_PROGRAM_RASTER_H
- #define ANDROID_RS_PROGRAM_RASTER_H
- #include "rsProgramBase.h"
- #include <vector>
- namespace android {
- namespace renderscript {
- class ProgramRasterState;
- class ProgramRaster : public ProgramBase {
- public:
- struct Hal {
- mutable void *drv;
- struct State {
- bool pointSprite;
- RsCullMode cull;
- };
- State state;
- };
- Hal mHal;
- virtual void setup(const Context *, ProgramRasterState *);
- virtual void serialize(Context *rsc, OStream *stream) const;
- virtual RsA3DClassID getClassId() const { return RS_A3D_CLASS_ID_PROGRAM_RASTER; }
- static ProgramRaster *createFromStream(Context *rsc, IStream *stream);
- static ObjectBaseRef<ProgramRaster> getProgramRaster(Context *rsc,
- bool pointSprite,
- RsCullMode cull);
- protected:
- virtual void preDestroy() const;
- virtual ~ProgramRaster();
- private:
- ProgramRaster(Context *rsc,
- bool pointSprite,
- RsCullMode cull);
- };
- class ProgramRasterState {
- public:
- ProgramRasterState();
- ~ProgramRasterState();
- void init(Context *rsc);
- void deinit(Context *rsc);
- ObjectBaseRef<ProgramRaster> mDefault;
- ObjectBaseRef<ProgramRaster> mLast;
-
- std::vector<ProgramRaster *> mRasterPrograms;
- };
- }
- }
- #endif
|