blob: 0b3a3eb00890406e3d5c00dbcc1f2ff995398722 [file] [log] [blame]
Jason Sams326e0dd2009-05-22 14:03:28 -07001/*
2 * Copyright (C) 2009 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef ANDROID_RS_PROGRAM_VERTEX_H
18#define ANDROID_RS_PROGRAM_VERTEX_H
19
20#include "rsProgram.h"
21
22// ---------------------------------------------------------------------------
23namespace android {
24namespace renderscript {
25
26
27class ProgramVertex : public Program
28{
29public:
30 const static uint32_t MAX_CONSTANTS = 2;
31
32 ProgramVertex(Element *in, Element *out);
33 virtual ~ProgramVertex();
34
35 virtual void setupGL();
36
37
38 void setConstantType(uint32_t slot, const Type *);
39 void bindAllocation(uint32_t slot, Allocation *);
40 void setTextureMatrixEnable(bool e) {mTextureMatrixEnable = e;}
Jason Sams326e0dd2009-05-22 14:03:28 -070041
42protected:
43 bool mDirty;
44
45 ObjectBaseRef<Allocation> mConstants[MAX_CONSTANTS];
46 ObjectBaseRef<const Type> mConstantTypes[MAX_CONSTANTS];
47
48 // Hacks to create a program for now
49 bool mTextureMatrixEnable;
Jason Sams326e0dd2009-05-22 14:03:28 -070050
51};
52
53
54class ProgramVertexState
55{
56public:
57 ProgramVertexState();
58 ~ProgramVertexState();
59
60 ProgramVertex *mPV;
61
62 //ObjectBaseRef<Type> mTextureTypes[ProgramFragment::MAX_TEXTURE];
63
64
65};
66
67
68}
69}
70#endif
71
72