Ejemplo n.º 1
0
		//
		// 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);
		}
Ejemplo n.º 2
0
		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;
		}
Ejemplo n.º 3
0
		//
		// 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;
		}
Ejemplo n.º 4
0
		//
		// 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;
		}
Ejemplo n.º 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();
		}
Ejemplo n.º 6
0
 public VertexBuffer3D(Context3D context3D, int numVertices, int dataPerVertex, int multiBufferCount = 1)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 7
0
        //
        // Methods
        //

#if OPENGL
        public Program3D(Context3D context3D)
        {
        }
Ejemplo n.º 8
0
 public Program3D(Context3D context3D)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 9
0
		public VertexBuffer3D(Context3D context3D, int numVertices, int dataPerVertex, int multiBufferCount = 1)
		{
			throw new NotImplementedException();
		}
Ejemplo n.º 10
0
 public IndexBuffer3D(Context3D context3D, int numIndices)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 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);
		}
Ejemplo n.º 14
0
        //
        // Methods
        //

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

#if OPENGL

		public Program3D(Context3D context3D)
		{
		}
Ejemplo n.º 19
0
        //
        // Methods
        //

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