Lines Matching refs:state
39 ShaderGenerator::ShaderGenerator (GeneratorState& state)
40 : m_state (state)
41 , m_varManager (state.getNameAllocator())
43 state.setVariableManager(m_varManager);
53 const char* getFragColorName (const GeneratorState& state)
55 switch (state.getProgramParameters().version)
92 void genVertexPassthrough (GeneratorState& state, Shader& shader)
96 std::copy(state.getVariableManager().getBegin<AnyEntry>(), state.getVariableManager().getEnd<AnyEntry>(), std::inserter(entries, entries.begin()));
114 Variable* inVar = state.getVariableManager().allocate(outVar->getType(), Variable::STORAGE_SHADER_IN, inVarName.c_str());
117 state.getVariableManager().setValue(inVar, entry->getValueRange());
124 void genFragmentPassthrough (GeneratorState& state, Shader& shader)
127 const ValueEntry* fragColorEntry = findByName(state.getVariableManager(), getFragColorName(state));
130 Variable* inColorVariable = state.getVariableManager().allocate(fragColorEntry->getVariable()->getType(), Variable::STORAGE_SHADER_IN, "v_color");
132 state.getVariableManager().setValue(inColorVariable, fragColorEntry->getValueRange());
179 // Init state