亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? fasttexturedpolygonrenderer.java

?? Java games programing--很好的java游戲編程源碼
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:

    //================================================
    // METHOD 4: reduce the number of divides
    // (interpolate every 16 pixels)
    // Also, apply a VM optimization by referring to
    // the texture's class rather than it's parent class.
    //================================================

    // the following three ScanRenderers are the same, but refer
    // to textures explicitly as either a PowerOf2Texture, a
    // ShadedTexture, or a ShadedSurface.
    // This allows HotSpot to do some inlining of the textures'
    // getColor() method, which significantly increases
    // performance.

    public class PowerOf2TextureRenderer extends ScanRenderer {

        public void render(int offset, int left, int right) {
            PowerOf2Texture texture =
                (PowerOf2Texture)currentTexture;
            float u = SCALE * a.getDotProduct(viewPos);
            float v = SCALE * b.getDotProduct(viewPos);
            float z = c.getDotProduct(viewPos);
            float du = INTERP_SIZE * SCALE * a.x;
            float dv = INTERP_SIZE * SCALE * b.x;
            float dz = INTERP_SIZE * c.x;
            int nextTx = (int)(u/z);
            int nextTy = (int)(v/z);
            int x = left;
            while (x <= right) {
                int tx = nextTx;
                int ty = nextTy;
                int maxLength = right-x+1;
                if (maxLength > INTERP_SIZE) {
                    u+=du;
                    v+=dv;
                    z+=dz;
                    nextTx = (int)(u/z);
                    nextTy = (int)(v/z);
                    int dtx = (nextTx-tx) >> INTERP_SIZE_BITS;
                    int dty = (nextTy-ty) >> INTERP_SIZE_BITS;
                    int endOffset = offset + INTERP_SIZE;
                    while (offset < endOffset) {
                        doubleBufferData[offset++] =
                            texture.getColor(
                            tx >> SCALE_BITS, ty >> SCALE_BITS);
                        tx+=dtx;
                        ty+=dty;
                    }
                    x+=INTERP_SIZE;
                }
                else {
                    // variable interpolation size
                    int interpSize = maxLength;
                    u += interpSize * SCALE * a.x;
                    v += interpSize * SCALE * b.x;
                    z += interpSize * c.x;
                    nextTx = (int)(u/z);
                    nextTy = (int)(v/z);
                    int dtx = (nextTx-tx) / interpSize;
                    int dty = (nextTy-ty) / interpSize;
                    int endOffset = offset + interpSize;
                    while (offset < endOffset) {
                        doubleBufferData[offset++] =
                            texture.getColor(
                            tx >> SCALE_BITS, ty >> SCALE_BITS);
                        tx+=dtx;
                        ty+=dty;
                    }
                    x+=interpSize;
                }

            }
        }
    }


    public class ShadedTextureRenderer extends ScanRenderer {

        public void render(int offset, int left, int right) {
            ShadedTexture texture =
                (ShadedTexture)currentTexture;
            float u = SCALE * a.getDotProduct(viewPos);
            float v = SCALE * b.getDotProduct(viewPos);
            float z = c.getDotProduct(viewPos);
            float du = INTERP_SIZE * SCALE * a.x;
            float dv = INTERP_SIZE * SCALE * b.x;
            float dz = INTERP_SIZE * c.x;
            int nextTx = (int)(u/z);
            int nextTy = (int)(v/z);
            int x = left;
            while (x <= right) {
                int tx = nextTx;
                int ty = nextTy;
                int maxLength = right-x+1;
                if (maxLength > INTERP_SIZE) {
                    u+=du;
                    v+=dv;
                    z+=dz;
                    nextTx = (int)(u/z);
                    nextTy = (int)(v/z);
                    int dtx = (nextTx-tx) >> INTERP_SIZE_BITS;
                    int dty = (nextTy-ty) >> INTERP_SIZE_BITS;
                    int endOffset = offset + INTERP_SIZE;
                    while (offset < endOffset) {
                        doubleBufferData[offset++] =
                            texture.getColor(
                            tx >> SCALE_BITS, ty >> SCALE_BITS);
                        tx+=dtx;
                        ty+=dty;
                    }
                    x+=INTERP_SIZE;
                }
                else {
                    // variable interpolation size
                    int interpSize = maxLength;
                    u += interpSize * SCALE * a.x;
                    v += interpSize * SCALE * b.x;
                    z += interpSize * c.x;
                    nextTx = (int)(u/z);
                    nextTy = (int)(v/z);
                    int dtx = (nextTx-tx) / interpSize;
                    int dty = (nextTy-ty) / interpSize;
                    int endOffset = offset + interpSize;
                    while (offset < endOffset) {
                        doubleBufferData[offset++] =
                            texture.getColor(
                            tx >> SCALE_BITS, ty >> SCALE_BITS);
                        tx+=dtx;
                        ty+=dty;
                    }
                    x+=interpSize;
                }

            }
        }
    }


    public class ShadedSurfaceRenderer extends ScanRenderer {

        public int checkBounds(int vScaled, int bounds) {
            int v = vScaled >> SCALE_BITS;
            if (v < 0) {
                vScaled = 0;
            }
            else if (v >= bounds) {
                vScaled = (bounds - 1) << SCALE_BITS;
            }
            return vScaled;
        }

        public void render(int offset, int left, int right) {
            ShadedSurface texture =
                (ShadedSurface)currentTexture;
            float u = SCALE * a.getDotProduct(viewPos);
            float v = SCALE * b.getDotProduct(viewPos);
            float z = c.getDotProduct(viewPos);
            float du = INTERP_SIZE * SCALE * a.x;
            float dv = INTERP_SIZE * SCALE * b.x;
            float dz = INTERP_SIZE * c.x;
            int nextTx = (int)(u/z);
            int nextTy = (int)(v/z);
            int x = left;
            while (x <= right) {
                int tx = nextTx;
                int ty = nextTy;
                int maxLength = right-x+1;
                if (maxLength > INTERP_SIZE) {
                    u+=du;
                    v+=dv;
                    z+=dz;
                    nextTx = (int)(u/z);
                    nextTy = (int)(v/z);
                    int dtx = (nextTx-tx) >> INTERP_SIZE_BITS;
                    int dty = (nextTy-ty) >> INTERP_SIZE_BITS;
                    int endOffset = offset + INTERP_SIZE;
                    while (offset < endOffset) {
                        doubleBufferData[offset++] =
                            texture.getColor(
                            tx >> SCALE_BITS, ty >> SCALE_BITS);
                        tx+=dtx;
                        ty+=dty;
                    }
                    x+=INTERP_SIZE;
                }
                else {
                    // variable interpolation size
                    int interpSize = maxLength;
                    u += interpSize * SCALE * a.x;
                    v += interpSize * SCALE * b.x;
                    z += interpSize * c.x;
                    nextTx = (int)(u/z);
                    nextTy = (int)(v/z);

                    // make sure tx, ty, nextTx, and nextTy are
                    // all within bounds
                    tx = checkBounds(tx, texture.getWidth());
                    ty = checkBounds(ty, texture.getHeight());
                    nextTx = checkBounds(nextTx, texture.getWidth());
                    nextTy = checkBounds(nextTy, texture.getHeight());

                    int dtx = (nextTx-tx) / interpSize;
                    int dty = (nextTy-ty) / interpSize;
                    int endOffset = offset + interpSize;
                    while (offset < endOffset) {
                        doubleBufferData[offset++] =
                            texture.getColor(
                            tx >> SCALE_BITS, ty >> SCALE_BITS);
                        tx+=dtx;
                        ty+=dty;
                    }
                    x+=interpSize;
                }
            }

        }
    }


}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美xfplay| 亚洲欧美日韩国产成人精品影院| 国产一区二区不卡在线| 国产精品成人免费| 91精品国产入口在线| 99久久综合色| 久久精品国产秦先生| 亚洲激情自拍视频| 久久久99精品免费观看| 欧美色图在线观看| 不卡视频一二三四| 国产伦理精品不卡| 婷婷成人激情在线网| 国产精品久久久久三级| www亚洲一区| 欧美视频你懂的| 91在线视频观看| 国产精品一区二区不卡| 蜜桃一区二区三区在线| 亚洲综合精品久久| 亚洲色图欧美激情| 欧美激情综合五月色丁香小说| 日韩一区二区三区电影| 亚洲国产高清在线观看视频| 欧美日韩国产综合一区二区 | 99久免费精品视频在线观看 | 91免费精品国自产拍在线不卡| 久久精品国产999大香线蕉| 午夜免费久久看| 亚洲精选在线视频| 国产精品国产三级国产专播品爱网| 日韩欧美久久一区| 欧美一区永久视频免费观看| 精品视频一区 二区 三区| 91丨porny丨首页| 99久久免费精品| 99久久伊人精品| 91香蕉视频黄| 91蜜桃视频在线| 色噜噜夜夜夜综合网| 在线精品视频免费播放| 欧美三级中文字幕| 欧美高清激情brazzers| 欧美日韩国产电影| 日韩一区二区三区电影在线观看 | 91一区二区在线观看| 91女人视频在线观看| 北条麻妃国产九九精品视频| 成人午夜精品一区二区三区| 丁香婷婷综合色啪| www.欧美日韩国产在线| 91丨porny丨中文| 欧美天堂一区二区三区| 欧美日韩在线播放三区| 欧美乱妇一区二区三区不卡视频| 欧美福利视频导航| 欧美日韩五月天| 欧美videos大乳护士334| 欧美精品一区二| 中文在线资源观看网站视频免费不卡| 国产女主播视频一区二区| 自拍偷拍欧美激情| 亚洲在线视频网站| 奇米色777欧美一区二区| 国产一区二区三区| av在线不卡电影| 久久综合一区二区| 国产精品国产自产拍高清av王其| 一区二区三区欧美| 日本不卡一区二区三区高清视频| 紧缚奴在线一区二区三区| 成人激情动漫在线观看| 欧美日韩一区二区欧美激情| 欧美zozozo| 亚洲色图.com| 日韩国产精品大片| 国产不卡视频一区二区三区| 91福利视频久久久久| 欧美电影免费观看高清完整版在线 | 欧美日韩国产高清一区二区| 日韩美女一区二区三区| 国产无人区一区二区三区| 亚洲美女少妇撒尿| 老司机精品视频一区二区三区| 成人激情免费视频| 日韩一区二区三免费高清| 中文字幕一区日韩精品欧美| 午夜精品爽啪视频| 岛国一区二区在线观看| 欧美日韩国产成人在线91| 欧美激情在线一区二区| 亚洲成av人片一区二区梦乃 | 欧美日韩免费视频| 人人精品人人爱| 成人精品gif动图一区| 欧美日韩国产一二三| 国产精品免费久久久久| 午夜电影一区二区| 成人av网在线| 精品999久久久| 偷窥国产亚洲免费视频| 成人av综合在线| 欧美成va人片在线观看| 亚洲成人午夜电影| 91热门视频在线观看| 久久久久久久久久久久电影 | 亚洲成年人影院| 白白色亚洲国产精品| 精品va天堂亚洲国产| 午夜精品在线视频一区| 91天堂素人约啪| 国产人成亚洲第一网站在线播放 | 国产在线精品视频| 91精品国产免费久久综合| 亚洲青青青在线视频| 国产91富婆露脸刺激对白| 日韩一卡二卡三卡| 午夜久久电影网| 欧美自拍偷拍一区| 亚洲欧美日韩小说| 成人av动漫网站| 久久久国产午夜精品| 美女诱惑一区二区| 欧美一区二区三区不卡| 亚洲丰满少妇videoshd| 色综合天天综合网天天狠天天| 国产精品网站一区| 国产乱码精品一区二区三| 日韩你懂的电影在线观看| 日韩国产欧美在线观看| 欧美老女人在线| 日日夜夜免费精品| 欧美另类久久久品| 日韩精品欧美成人高清一区二区| 欧美性一二三区| 亚洲午夜av在线| 精品污污网站免费看| 亚洲国产精品一区二区www| 欧美伊人精品成人久久综合97 | 国产一区 二区 三区一级| 日韩欧美高清一区| 精品一区二区三区免费观看| 欧美大尺度电影在线| 久久99精品久久久久婷婷| 精品成a人在线观看| 国产乱子伦视频一区二区三区| 久久久午夜精品| 成人av在线播放网址| 亚洲视频在线观看三级| 色吊一区二区三区| 亚洲成人综合在线| 日韩一卡二卡三卡| 欧美日韩国产另类不卡| 亚洲18影院在线观看| 欧美一区二区三区婷婷月色| 久久er99精品| 国产精品女主播av| 欧美性受xxxx| 美女脱光内衣内裤视频久久网站| 精品精品欲导航| 成人一级片在线观看| 亚洲精品免费在线观看| 欧美精品丝袜久久久中文字幕| 免费成人在线视频观看| 国产偷国产偷亚洲高清人白洁 | 精品1区2区在线观看| www.久久精品| 天天做天天摸天天爽国产一区| 精品日韩99亚洲| 99九九99九九九视频精品| 无吗不卡中文字幕| 久久精品视频一区| 欧美性高清videossexo| 久久99国产精品久久| 国产精品动漫网站| 欧美日韩dvd在线观看| 老司机一区二区| 中文字幕一区二区三区精华液 | 91美女在线观看| 另类中文字幕网| 日韩毛片一二三区| 91精品国产aⅴ一区二区| 国产成人亚洲综合a∨婷婷图片| 亚洲乱码国产乱码精品精98午夜| 制服丝袜中文字幕一区| 风间由美中文字幕在线看视频国产欧美| 一区二区三区四区精品在线视频 | 欧美日韩国产小视频| 国产精品一品视频| 午夜日韩在线观看| 国产精品视频一二| 欧美一级欧美一级在线播放| 91在线观看一区二区| 六月丁香综合在线视频| 亚洲精品国产a久久久久久| 久久亚洲私人国产精品va媚药| 色成人在线视频| 成人少妇影院yyyy| 久久精品国产久精国产爱| 亚洲一区二区三区影院|