Axiom.RenderSystems.OpenGLES.GLESConfig.GlCheckError C# (CSharp) Method

GlCheckError() public static method

public static GlCheckError ( object caller ) : void
caller object
return void
		public static void GlCheckError( object caller )
		{
			int e = (int)OpenGL.GetError();
			if ( e != 0 )
			{
				throw new Exception( string.Format( "OpenGL error {0} from {1}", e, caller.ToString() ) );
			}
		}
	}

Usage Example

Esempio n. 1
0
        public GLESHardwareIndexBuffer(HardwareBufferManagerBase manager, IndexType type, int numIndices, BufferUsage usage, bool useShadowBuffer)
            : base(manager, type, numIndices, usage, false, useShadowBuffer)
        {
            if (type == IndexType.Size32)
            {
                throw new AxiomException("32 bit hardware buffers are not allowed in OpenGL ES.");
            }

            if (!useShadowBuffer)
            {
                throw new AxiomException("Only support with shadowBuffer");
            }

            OpenGL.GenBuffers(1, ref this._bufferId);
            GLESConfig.GlCheckError(this);
            if (this._bufferId == 0)
            {
                throw new AxiomException("Cannot create GL index buffer");
            }

            OpenGL.BindBuffer(All.ElementArrayBuffer, this._bufferId);
            GLESConfig.GlCheckError(this);
            OpenGL.BufferData(All.ElementArrayBuffer, new IntPtr(sizeInBytes), IntPtr.Zero, GLESHardwareBufferManager.GetGLUsage(usage));
            GLESConfig.GlCheckError(this);
        }
All Usage Examples Of Axiom.RenderSystems.OpenGLES.GLESConfig::GlCheckError
GLESConfig