示例#1
0
        public TexturePtr loadImage(String name, String group, Image img, TextureType texType = TextureType.TEX_TYPE_2D, int numMipmaps = -1, float gamma = 1.0f, bool isAlpha = false, PixelFormat desiredFormat = PixelFormat.PF_UNKNOWN, bool hwGamma = false)
        {
            TexturePtr ptr = getObject(TextureManager_loadImage(name, group, img.Ptr, texType, numMipmaps, gamma, isAlpha, desiredFormat, hwGamma, ProcessWrapperObjectCallback));

            OgreExceptionManager.fireAnyException();
            return(ptr);
        }
示例#2
0
 public ImageAtlasPage(String textureName, String groupName, int width, int height)
 {
     rootNode         = new ImagePackTreeNode(new Size(width, height));
     texture          = TextureManager.getInstance().createManual(textureName, groupName, TextureType.TEX_TYPE_2D, (uint)width, (uint)height, 1, 0, OgrePlugin.PixelFormat.PF_A8R8G8B8, TextureUsage.TU_STATIC_WRITE_ONLY, null, false, 0);
     bufferPtr        = texture.Value.getBuffer();
     this.TextureName = textureName;
     this.GroupName   = groupName;
 }
示例#3
0
        public TexturePtr createManual(String name, String group, TextureType texType, uint width, uint height, uint depth, int num_mips, PixelFormat format, TextureUsage usage, ManagedManualResourceLoader resourceLoader, bool hwGammaCorrection, uint fsaa, String fsaaHint = "")
        {
            IntPtr     resourceLoaderPtr = resourceLoader != null ? resourceLoader.Ptr : IntPtr.Zero;
            TexturePtr ptr = getObject(TextureManager_createManual(name, group, texType, width, height, depth, num_mips, format, usage, resourceLoaderPtr, hwGammaCorrection, fsaa, fsaaHint, ProcessWrapperObjectCallback));

            OgreExceptionManager.fireAnyException();
            return(ptr);
        }
示例#4
0
 public void remove(TexturePtr resource)
 {
     TextureManager_removeResource(resource.HeapSharedPtr);
 }