MCPcopy Create free account
hub / github.com/vispy/vispy / definition

Method definition

vispy/visuals/shaders/variable.py:258–269  ·  view source on GitHub ↗
(self, names, version, shader)

Source from the content-addressed store, hash-verified

256 return self._var.dtype
257
258 def definition(self, names, version, shader):
259 # inherit name from source variable
260 name = names[self._var]
261 dtype = self._var.dtype
262
263 if version[0] <= 120:
264 return "varying %s %s;" % (dtype, name)
265 else:
266 if self._array:
267 return "in %s %s[];" % (dtype, name)
268 else:
269 return "in %s %s;" % (dtype, name)
270
271 def expression(self, names):
272 return names[self._var]

Callers 2

compileMethod · 0.45
test_TextExpressionFunction · 0.45

Calls

no outgoing calls

Tested by 1

test_TextExpressionFunction · 0.36