1 /*
  2   Copyright (c) 2008 Seneca College
  3   Licenced under the MIT License (http://www.c3dl.org/index.php/mit-license/)
  4 */
  5 
  6 /**
  7 	@private
  8 	
  9 	@class ProgramObject is used to store a program object ID, which 
 10 	OpenGL generates along with the ID of the renderer which compiled
 11 	the shaders resulting in the program ID. 
 12 */
 13 c3dl.ProgramObject = function()
 14 {
 15 	this.programID = -1;
 16 	this.rendererID = -1;
 17 	
 18 	/**
 19 	*/
 20 	this.getProgramID = function()
 21 	{
 22 		return this.programID;
 23 	}
 24 	
 25 	/**
 26 		
 27 	*/
 28 	this.getRendererID = function()
 29 	{
 30 		return this.rendererID;
 31 	}
 32 	
 33 	/**
 34 		@private	
 35 		Get a string representation of this object. 
 36 	
 37 		@param {null|String} delimiter A string which will separate values. Typically will be 
 38 		","  ,  "\n" or "<br />". If none is specified, "," will be used.
 39 	
 40 		@returns {String} A string representation of this object.
 41 	*/
 42 	this.toString = function(delimiter)
 43 	{
 44 		// make sure user passed up a string if they actually decided
 45 		// to specify a delimiter.
 46 		if(!delimiter || typeof(delimiter) != "string")
 47 		{
 48 			delimiter = ",";
 49 		}
 50 
 51 		return	"Program ID = " + this.getProgramID() + delimiter +
 52 				"Renderer ID = " + this.getRendererID();
 53 	}
 54 }
 55