PolycodeModule.lua 460 B

12345678910111213141516171819202122232425262728
  1. class "PolycodeModule"
  2. TYPE_GENERIC = 0
  3. TYPE_SHADER = 0
  4. function PolycodeModule:PolycodeModule(...)
  5. for k,v in pairs(arg) do
  6. if type(v) == "table" then
  7. if v.__ptr ~= nil then
  8. arg[k] = v.__ptr
  9. end
  10. end
  11. end
  12. if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
  13. self.__ptr = Polycore.PolycodeModule(unpack(arg))
  14. end
  15. end
  16. function PolycodeModule:getType()
  17. local retVal = Polycore.PolycodeModule_getType(self.__ptr)
  18. return retVal
  19. end