robertphillips@google.com | dd743fe | 2012-04-05 14:40:53 +0000 | [diff] [blame] | 1 | |
| 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 | //////////////////////////////////////////////////////////////////////////////// |
| 15 | class GrShaderObj : public GrFakeRefObj { |
| 16 | GR_DEFINE_CREATOR(GrShaderObj); |
| 17 | |
| 18 | public: |
| 19 | GrShaderObj() |
| 20 | : GrFakeRefObj() |
robertphillips@google.com | 0dd84a3 | 2012-04-16 16:24:35 +0000 | [diff] [blame] | 21 | , fType(GR_GL_VERTEX_SHADER) {} |
robertphillips@google.com | dd743fe | 2012-04-05 14:40:53 +0000 | [diff] [blame] | 22 | |
robertphillips@google.com | 0dd84a3 | 2012-04-16 16:24:35 +0000 | [diff] [blame] | 23 | void setType(GrGLenum type) { fType = type; } |
| 24 | GrGLenum getType() { return fType; } |
robertphillips@google.com | dd743fe | 2012-04-05 14:40:53 +0000 | [diff] [blame] | 25 | |
robertphillips@google.com | 0dd84a3 | 2012-04-16 16:24:35 +0000 | [diff] [blame] | 26 | virtual void deleteAction() SK_OVERRIDE; |
robertphillips@google.com | dd743fe | 2012-04-05 14:40:53 +0000 | [diff] [blame] | 27 | |
| 28 | protected: |
| 29 | private: |
| 30 | GrGLenum fType; // either GR_GL_VERTEX_SHADER or GR_GL_FRAGMENT_SHADER |
| 31 | |
| 32 | typedef GrFakeRefObj INHERITED; |
| 33 | }; |
| 34 | |
| 35 | #endif // GrShaderObj_DEFINED |