Beispiel #1
0
        PixelInternalFormat GetOpenTKInternalPixelFormat(e_InternalPixelFormat a_pixelFormat)
        {
            switch (a_pixelFormat)
            {
            case e_InternalPixelFormat.Depth:
            {
                return(PixelInternalFormat.DepthComponent);
            }

            case e_InternalPixelFormat.Alpha:
            {
                return(PixelInternalFormat.Alpha);
            }

            case e_InternalPixelFormat.RGB:
            {
                return(PixelInternalFormat.Rgb);
            }

            case e_InternalPixelFormat.RGBA:
            {
                return(PixelInternalFormat.Rgba);
            }
            }

            return(PixelInternalFormat.Rgba);
        }
Beispiel #2
0
        public RenderTexture(int a_width, int a_height, e_PixelFormat a_pixelFormat, e_InternalPixelFormat a_pixelInternalFormat, Pipeline a_pipeline)
        {
            m_colorBuffer = new Texture(a_width, a_height, a_pixelFormat, a_pixelInternalFormat, a_pipeline);
            m_depthBuffer = new Texture(a_width, a_height, e_PixelFormat.Depth, e_InternalPixelFormat.Depth, a_pipeline);

            m_pipeline = a_pipeline;

            m_pipeline.AddObject(this);
        }
Beispiel #3
0
        internal void WriteData(int a_width, int a_height, e_PixelFormat a_pixelFormat, e_InternalPixelFormat a_internalPixelFormat, e_PixelType a_pixelType, IntPtr a_data)
        {
            m_width  = a_width;
            m_height = a_height;

            m_pixelFormat         = a_pixelFormat;
            m_pixelInternalFormat = a_internalPixelFormat;

            m_internalObject.WriteData(a_data, a_pixelType);
        }
Beispiel #4
0
        public Texture(int a_width, int a_height, e_PixelFormat a_pixelFormat, e_InternalPixelFormat a_pixelInternalFormat, Pipeline a_pipeline)
        {
            m_width  = a_width;
            m_height = a_height;

            m_pipeline = a_pipeline;

            m_pixelFormat         = a_pixelFormat;
            m_pixelInternalFormat = a_pixelInternalFormat;

            if (a_pipeline.ApplicationType == e_ApplicationType.Managed)
            {
                m_internalObject = new OpenTKTexture(this);
            }

            m_pipeline.AddObject(this);
        }
Beispiel #5
0
        Texture(Pipeline a_pipeline)
        {
            m_width  = 0;
            m_height = 0;

            m_pixelFormat         = e_PixelFormat.BGRA;
            m_pixelInternalFormat = e_InternalPixelFormat.RGBA;

            m_pipeline = a_pipeline;

            if (a_pipeline.ApplicationType == e_ApplicationType.Managed)
            {
                m_internalObject = new OpenTKTexture(this);
            }

            m_pipeline.AddObject(this);
        }