diff options
Diffstat (limited to 'libs/rs/rsProgramRaster.h')
-rw-r--r-- | libs/rs/rsProgramRaster.h | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/libs/rs/rsProgramRaster.h b/libs/rs/rsProgramRaster.h index 7958af9..efdb948 100644 --- a/libs/rs/rsProgramRaster.h +++ b/libs/rs/rsProgramRaster.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009 The Android Open Source Project + * Copyright (C) 2009-2011 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ #ifndef ANDROID_RS_PROGRAM_RASTER_H #define ANDROID_RS_PROGRAM_RASTER_H -#include "rsProgram.h" +#include "rsProgramBase.h" // --------------------------------------------------------------------------- namespace android { @@ -25,28 +25,36 @@ namespace renderscript { class ProgramRasterState; -class ProgramRaster : public Program { +class ProgramRaster : public ProgramBase { public: ProgramRaster(Context *rsc, bool pointSmooth, bool lineSmooth, - bool pointSprite); + bool pointSprite, + float lineWidth, + RsCullMode cull); virtual ~ProgramRaster(); - virtual void setupGL2(const Context *, ProgramRasterState *); + virtual void setup(const Context *, ProgramRasterState *); virtual void serialize(OStream *stream) const; virtual RsA3DClassID getClassId() const { return RS_A3D_CLASS_ID_PROGRAM_RASTER; } static ProgramRaster *createFromStream(Context *rsc, IStream *stream); - void setLineWidth(float w); - void setCullMode(RsCullMode mode); + struct Hal { + mutable void *drv; + + struct State { + bool pointSmooth; + bool lineSmooth; + bool pointSprite; + float lineWidth; + RsCullMode cull; + }; + State state; + }; + Hal mHal; protected: - bool mPointSmooth; - bool mLineSmooth; - bool mPointSprite; - float mLineWidth; - RsCullMode mCull; }; class ProgramRasterState { |