示例#1
0
        /// <summary>
        ///     Gets the mapping parameters used on Texture Unit 2,
        ///     such as the wrapping mode, filtering and so on.
        /// </summary>
        /// <returns></returns>
        public RenderBase.OTextureMapper getTexUnit2Mapper()
        {
            RenderBase.OTextureMapper output = new RenderBase.OTextureMapper();

            uint value = getParameter(PICACommand.texUnit2Param);

            output.magFilter = (RenderBase.OTextureMagFilter)((value >> 1) & 1);
            output.minFilter = (RenderBase.OTextureMinFilter)(((value >> 2) & 1) | ((value >> 23) & 2));
            output.wrapU     = (RenderBase.OTextureWrap)((value >> 12) & 0xf);
            output.wrapV     = (RenderBase.OTextureWrap)((value >> 8) & 0xf);

            return(output);
        }
        /// <summary>
        ///     Gets the mapping parameters used on Texture Unit 2,
        ///     such as the wrapping mode, filtering and so on.
        /// </summary>
        /// <returns></returns>
        public RenderBase.OTextureMapper getTexUnit2Mapper()
        {
            RenderBase.OTextureMapper output = new RenderBase.OTextureMapper();

            uint value = getParameter(PICACommand.texUnit2Param);
            output.magFilter = (RenderBase.OTextureMagFilter)((value >> 1) & 1);
            output.minFilter = (RenderBase.OTextureMinFilter)(((value >> 2) & 1) | ((value >> 23) & 2));
            output.wrapU = (RenderBase.OTextureWrap)((value >> 12) & 0xf);
            output.wrapV = (RenderBase.OTextureWrap)((value >> 8) & 0xf);

            return output;
        }