OSDN Git Service

[更新]NyARToolkit
[nyartoolkit-and/nyartoolkit-and.git] / src / jp / nyatla / nyartoolkit / core / raster / NyARGrayscaleRaster.java
index 314c9c3..03809d3 100644 (file)
@@ -38,14 +38,14 @@ import jp.nyatla.nyartoolkit.core.types.*;
 public final class NyARGrayscaleRaster extends NyARRaster_BasicClass\r
 {\r
 \r
-       protected int[][] _ref_buf;\r
+       protected int[] _ref_buf;\r
        private INyARBufferReader _buffer_reader;\r
        \r
        public NyARGrayscaleRaster(int i_width, int i_height)\r
        {\r
                super(new NyARIntSize(i_width,i_height));\r
-               this._ref_buf = new int[i_height][i_width];\r
-               this._buffer_reader=new NyARBufferReader(this._ref_buf,INyARBufferReader.BUFFERFORMAT_INT2D_GLAY_8);\r
+               this._ref_buf = new int[i_height*i_width];\r
+               this._buffer_reader=new NyARBufferReader(this._ref_buf,INyARBufferReader.BUFFERFORMAT_INT1D_GLAY_8);\r
        }\r
        public INyARBufferReader getBufferReader()\r
        {\r