Пример #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);
		}
Пример #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;
		}
Пример #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;
		}
Пример #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;
		}
Пример #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();
		}
Пример #6
0
 public VertexBuffer3D(Context3D context3D, int numVertices, int dataPerVertex, int multiBufferCount = 1)
 {
     throw new NotImplementedException();
 }
Пример #7
0
        //
        // Methods
        //

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

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

#if OPENGL

		public Program3D(Context3D context3D)
		{
		}
Пример #19
0
        //
        // Methods
        //

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