//
		// Methods
		//

#if OPENGL

		public VertexBuffer3D(Context3D context3D, int numVertices, int dataPerVertex)
		{
			mNumVertices = numVertices;
			mVertexSize = dataPerVertex;
			// allocate temporary buffer for conversion
			mData = new float[numVertices * dataPerVertex];
			GL.GenBuffers(1, out mId);
		}
		public CubeTexture(Context3D context, int size, string format, 
		               bool optimizeForRenderToTexture, int streamingLevels)
			: base(TextureTarget.TextureCubeMap)
		{
			mContext = context;
			mSize = size;
			mFormat = format;
			mOptimizeForRenderToTexture = optimizeForRenderToTexture;
			mStreamingLevels = streamingLevels;
		}
		//
		// Methods
		//

#if OPENGL

		internal IndexBuffer3D(Context3D context3D, int numIndices, int multiBufferCount, bool isDynamic)
		{
			if (multiBufferCount < 1)
				throw new ArgumentOutOfRangeException("multiBufferCount");

			mNumIndices = numIndices;
			mIds = new uint[multiBufferCount];
			GL.GenBuffers(multiBufferCount, mIds);

			mUsage = isDynamic ? BufferUsage.DynamicDraw : BufferUsage.StaticDraw;
		}
		//
		// Methods
		//

#if OPENGL

		internal VertexBuffer3D(Context3D context3D, int numVertices, int dataPerVertex, int multiBufferCount, bool isDynamic)
		{
			if (multiBufferCount < 1)
				throw new ArgumentOutOfRangeException("multiBufferCount");

			mNumVertices = numVertices;
			mVertexSize = dataPerVertex;
			mIds = new uint[multiBufferCount];
			GL.GenBuffers(mIds.Length, mIds);

			mUsage = isDynamic ? BufferUsage.DynamicDraw : BufferUsage.StaticDraw;
		}
Beispiel #5
0
		//
		// Methods
		//

#if OPENGL

		public Texture(Context3D context, int width, int height, string format, 
		                        bool optimizeForRenderToTexture, int streamingLevels)
			: base(TextureTarget.Texture2D)
		{
			mContext = context;
			mWidth = width;
			mHeight = height;
			mFormat = format;
			mOptimizeForRenderToTexture = optimizeForRenderToTexture;
			mStreamingLevels = streamingLevels;

			// we do this to clear the texture on creation
			// $$TODO we dont need to allocate a bitmapdata to do this, we should just use a PBO and clear it
			var clearData = new BitmapData(width, height);
			uploadFromBitmapData(clearData);
			clearData.dispose();
		}
 public VertexBuffer3D(Context3D context3D, int numVertices, int dataPerVertex, int multiBufferCount = 1)
 {
     throw new NotImplementedException();
 }
Beispiel #7
0
        //
        // Methods
        //

#if OPENGL
        public Program3D(Context3D context3D)
        {
        }
Beispiel #8
0
 public Program3D(Context3D context3D)
 {
     throw new NotImplementedException();
 }
		public VertexBuffer3D(Context3D context3D, int numVertices, int dataPerVertex, int multiBufferCount = 1)
		{
			throw new NotImplementedException();
		}
 public IndexBuffer3D(Context3D context3D, int numIndices)
 {
     throw new NotImplementedException();
 }
Beispiel #11
0
		public Program3D(Context3D context3D)
		{
			throw new NotImplementedException();
		}
		public IndexBuffer3D(Context3D context3D, int numIndices)
		{
			throw new NotImplementedException();
		}
		//
		// Methods
		//

#if OPENGL

		public IndexBuffer3D(Context3D context3D, int numIndices)
		{
			mNumIndices = numIndices;
			GL.GenBuffers(1, out mId);
		}
Beispiel #14
0
        //
        // Methods
        //

#if OPENGL
        public Program3D(Context3D context3D)
        {
            mContext = context3D;
        }
		public IndexBuffer3D(Context3D context3D, int numIndices, int multiBufferCount = 1)
		{
			throw new NotImplementedException();
		}
Beispiel #16
0
		public Texture(Context3D context, int width, int height, string format, 
		               bool optimizeForRenderToTexture, int streamingLevels)
		{
			throw new NotImplementedException();
		}
Beispiel #17
0
 public IndexBuffer3D(Context3D context3D, int numIndices, int multiBufferCount = 1)
 {
     throw new NotImplementedException();
 }
Beispiel #18
0
		//
		// Methods
		//

#if OPENGL

		public Program3D(Context3D context3D)
		{
		}
        //
        // Methods
        //

#if OPENGL
        public IndexBuffer3D(Context3D context3D, int numIndices)
        {
            mNumIndices = numIndices;
            GL.GenBuffers(1, out mId);
        }