blob: 200c8b650cde1f3a9e60ed69940b5912a856f49b [file] [log] [blame]
robertphillips@google.comdd743fe2012-04-05 14:40:53 +00001
2/*
3 * Copyright 2012 Google Inc.
4 *
5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
7 */
8
9#ifndef GrShaderObj_DEFINED
10#define GrShaderObj_DEFINED
11
12#include "GrFakeRefObj.h"
13
14////////////////////////////////////////////////////////////////////////////////
15class GrShaderObj : public GrFakeRefObj {
16 GR_DEFINE_CREATOR(GrShaderObj);
17
18public:
19 GrShaderObj()
20 : GrFakeRefObj()
robertphillips@google.com0dd84a32012-04-16 16:24:35 +000021 , fType(GR_GL_VERTEX_SHADER) {}
robertphillips@google.comdd743fe2012-04-05 14:40:53 +000022
robertphillips@google.com0dd84a32012-04-16 16:24:35 +000023 void setType(GrGLenum type) { fType = type; }
24 GrGLenum getType() { return fType; }
robertphillips@google.comdd743fe2012-04-05 14:40:53 +000025
robertphillips@google.com0dd84a32012-04-16 16:24:35 +000026 virtual void deleteAction() SK_OVERRIDE;
robertphillips@google.comdd743fe2012-04-05 14:40:53 +000027
28protected:
29private:
30 GrGLenum fType; // either GR_GL_VERTEX_SHADER or GR_GL_FRAGMENT_SHADER
31
32 typedef GrFakeRefObj INHERITED;
33};
34
35#endif // GrShaderObj_DEFINED