ShaderPlatformData.js 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. function ShaderPlatformData() {
  2. Object.defineProperties(this, {
  3. 'shaderID': { enumerable: true, configurable: true, get: ShaderPlatformData.prototype.__get_shaderID, set: ShaderPlatformData.prototype.__set_shaderID},
  4. 'vertexProgramID': { enumerable: true, configurable: true, get: ShaderPlatformData.prototype.__get_vertexProgramID, set: ShaderPlatformData.prototype.__set_vertexProgramID},
  5. 'fragmentProgramID': { enumerable: true, configurable: true, get: ShaderPlatformData.prototype.__get_fragmentProgramID, set: ShaderPlatformData.prototype.__set_fragmentProgramID}
  6. })
  7. }
  8. ShaderPlatformData.prototype.__get_shaderID = function() {
  9. var retVal = new GLuint()
  10. retVal.__ptr = Polycode.ShaderPlatformData__get_shaderID(this.__ptr)
  11. return retVal
  12. }
  13. ShaderPlatformData.prototype.__set_shaderID = function(val) {
  14. Polycode.ShaderPlatformData__set_shaderID(this.__ptr, val.__ptr)
  15. }
  16. ShaderPlatformData.prototype.__get_vertexProgramID = function() {
  17. var retVal = new GLuint()
  18. retVal.__ptr = Polycode.ShaderPlatformData__get_vertexProgramID(this.__ptr)
  19. return retVal
  20. }
  21. ShaderPlatformData.prototype.__set_vertexProgramID = function(val) {
  22. Polycode.ShaderPlatformData__set_vertexProgramID(this.__ptr, val.__ptr)
  23. }
  24. ShaderPlatformData.prototype.__get_fragmentProgramID = function() {
  25. var retVal = new GLuint()
  26. retVal.__ptr = Polycode.ShaderPlatformData__get_fragmentProgramID(this.__ptr)
  27. return retVal
  28. }
  29. ShaderPlatformData.prototype.__set_fragmentProgramID = function(val) {
  30. Polycode.ShaderPlatformData__set_fragmentProgramID(this.__ptr, val.__ptr)
  31. }
  32. Duktape.fin(ShaderPlatformData.prototype, function (x) {
  33. if (x === ShaderPlatformData.prototype) {
  34. return;
  35. }
  36. Polycode.ShaderPlatformData__delete(x.__ptr)
  37. })