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