Field
Show
Ignore:
Timestamp:
08/05/2008 07:44:31 PM (5 months ago)
Author:
hyposurface@hyposurface-corporations-mac-pro.local
branch:
default
Message:

various fixes to classloader based on work in Boston

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • development/java/field/graphics/core/AdvancedTextures.java

    r76 r145  
    5454                } 
    5555 
     56                public Base1ByteTexture allwaysDirty() 
     57                { 
     58                        allwaysDirty = true; 
     59                        return this; 
     60                } 
     61                 
     62                boolean allwaysDirty = false; 
     63                 
    5664                public Base1ByteTexture setTextureRange(TextureRange in) { 
    5765                        this.in = in; 
     
    8290                        assert gl.glGetError() == 0; 
    8391 
     92                        if (allwaysDirty) 
     93                                dirty = true; 
     94                         
    8495                        if (dirty) { 
     96                                System.out.println(" pixel buffer is <"+pixelBuffer+">"); 
     97                                pixelBuffer.rewind(); 
    8598                                gl.glTexSubImage2D(gl.GL_TEXTURE_RECTANGLE_EXT, 0, 0, 0, width, height, gl.GL_LUMINANCE, gl.GL_UNSIGNED_BYTE, pixelBuffer); 
    8699                                // gl.glTexSubImage2D(gl.GL_TEXTURE_RECTANGLE_EXT, 0, 0, 0, width, height, gl.GL_BGRA, gl.GL_UNSIGNED_INT_8_8_8_8_REV, pixelBuffer); 
     
    239252                } 
    240253 
     254                public Base3ByteTexture allwaysDirty() 
     255                { 
     256                        allwaysDirty = true; 
     257                        return this; 
     258                } 
     259                 
     260                boolean allwaysDirty = false; 
     261                 
    241262                @Override 
    242263                public void post() { 
     
    261282                        assert gl.glGetError() == 0; 
    262283 
     284                        if (allwaysDirty) 
     285                                dirty = true; 
     286                         
    263287                        if (dirty) { 
     288                                pixelBuffer.rewind(); 
    264289                                gl.glTexSubImage2D(this.textureTarget, 0, 0, 0, width, height, gl.GL_RGB, gl.GL_UNSIGNED_BYTE, pixelBuffer); 
    265290                                // gl.glTexSubImage2D(this.textureTarget, 0, 0, 0, width, height, gl.GL_BGRA, gl.GL_UNSIGNED_INT_8_8_8_8_REV, pixelBuffer); 
     
    429454                        super(name); 
    430455                } 
     456                public BaseFastRawTexture allwaysDirty() 
     457                { 
     458                        allwaysDirty = true; 
     459                        return this; 
     460                } 
     461                 
     462                boolean allwaysDirty = false; 
     463                 
    431464 
    432465                public void deallocate(TaskQueue atRenderTime) { 
     
    464497                        if (in != null) in.declareNow(gl); 
    465498 
     499                        if (allwaysDirty) 
     500                                dirty = true; 
     501                         
    466502                        if (dirty) gl.glTexSubImage2D(gl.GL_TEXTURE_RECTANGLE_EXT, 0, 0, 0, width, height, gl.GL_BGRA, gl.GL_UNSIGNED_INT_8_8_8_8_REV, from); 
    467503                        // if (dirty) gl.glTexSubImage2D(gl.GL_TEXTURE_RECTANGLE_EXT, 0, 0, 0, width, height, gl.GL_RGBA, gl.GL_UNSIGNED_INT_8_8_8_8, from);