flagflag  If you want to see English page, please click "English" Button at Left.
2: 2014-06-21 (土) 21:40:39 iseki ソース 3: 2014-06-24 (火) 22:37:19 admin ソース
Line 23: Line 23:
*** Tecture Functions [#zd2d2e9c] *** Tecture Functions [#zd2d2e9c]
- lldrawpoolterrain.cpp - lldrawpoolterrain.cpp
- setVec(sDetailScale, 0.0f, 0.0f, 0.0);+ void LLDrawPoolTerrain::renderFullShaderX() 
 + { 
 +    // Hack! Get the region that this draw pool is rendering from! 
 +    LLViewerRegion *regionp = mDrawFace[0]->getDrawable()->getVObj()->​getRegion(); 
 +    LLVLComposition *compp = regionp->getComposition(); 
 +    // 
 +    LLViewerTexture *detail_texture0p = compp->mDetailTextures[4]; 
 + 
 +    // 
 +    sDetailScale = 0.142857/36.; 
 + 
 +    LLVector4 tp0, tp1; 
 + 
 +    tp0.setVec(sDetailScale, 0.0f, 0.0f, 0.0);
    tp1.setVec(0.0f, sDetailScale, 0.0f, 0.0);     tp1.setVec(0.0f, sDetailScale, 0.0f, 0.0);
Line 42: Line 55:
    gGL.loadIdentity();     gGL.loadIdentity();
    gGL.matrixMode(LLRender::MM_MODELVIE​W);     gGL.matrixMode(LLRender::MM_MODELVIE​W);
- 
-    // 
-    // detail texture 1 
-    // 
-// S32 detail1 = sShader->enableTexture(LLViewerShaderMgr​::TERRAIN_DETAIL1); 
-// gGL.getTexUnit(detail1)->bind(detail_tex​ture1p); 
- 
-    /// ALPHA TEXTURE COORDS 0: 
- // gGL.getTexUnit(1)->activate(); 
- // gGL.matrixMode(LLRender::MM_TEXTURE); 
- // gGL.loadIdentity(); 
- // gGL.matrixMode(LLRender::MM_MODELVIEW); 
- 
-    // detail texture 2 
-    // 
- // S32 detail2 = sShader->enableTexture(LLViewerShaderMgr​::TERRAIN_DETAIL2); 
- // gGL.getTexUnit(detail2)->bind(detail_tex​ture2p); 
- 
- // gGL.getTexUnit(2)->activate(); 
- 
-    /// ALPHA TEXTURE COORDS 1: 
- // gGL.matrixMode(LLRender::MM_TEXTURE); 
- // gGL.loadIdentity(); 
- // gGL.translatef(-2.f, 0.f, 0.f); 
- // gGL.matrixMode(LLRender::MM_MODELVIEW); 
- 
-  // 
-    // detail texture 3 
-    // 
- // S32 detail3 = sShader->enableTexture(LLViewerShaderMgr​::TERRAIN_DETAIL3); 
- // gGL.getTexUnit(detail3)->bind(detail_tex​ture3p); 
- 
-    /// ALPHA TEXTURE COORDS 2: 
- // gGL.getTexUnit(3)->activate(); 
- // gGL.matrixMode(LLRender::MM_TEXTURE); 
- // gGL.loadIdentity(); 
- // gGL.translatef(-1.f, 0.f, 0.f); 
- // gGL.matrixMode(LLRender::MM_MODELVIEW); 
- 
-  // 
-    // Alpha Ramp 
-    // 
-    //S32 alpha_ramp = sShader->enableTexture(LLViewerShaderMgr​::TERRAIN_ALPHARAMP); 
-    //gGL.getTexUnit(alpha_ramp)->bind(m​2DAlphaRampImagep); 
    // GL_BLEND disabled by default     // GL_BLEND disabled by default
Line 91: Line 60:
    // Disable multitexture     // Disable multitexture
- // sShader->disableTexture(LLViewerShaderMg​r::TERRAIN_ALPHARAMP); 
    sShader->disableTexture(LLViewerShad​erMgr::TERRAIN_DETAIL0);     sShader->disableTexture(LLViewerShad​erMgr::TERRAIN_DETAIL0);
- // sShader->disableTexture(LLViewerShaderMg​r::TERRAIN_DETAIL1); 
- // sShader->disableTexture(LLViewerShaderMg​r::TERRAIN_DETAIL2); 
- // sShader->disableTexture(LLViewerShaderMg​r::TERRAIN_DETAIL3); 
- 
- / gGL.getTexUnit(alpha_ramp)->unbind(LLTex​Unit::TT_TEXTURE); 
- // gGL.getTexUnit(4)->disable(); 
- // gGL.getTexUnit(4)->activate(); 
- 
- // gGL.getTexUnit(detail3)->unbind(LLTexUni​t::TT_TEXTURE); 
- // gGL.getTexUnit(3)->disable(); 
- // gGL.getTexUnit(3)->activate(); 
- 
- // gGL.matrixMode(LLRender::MM_TEXTURE); 
- // gGL.loadIdentity(); 
- // gGL.matrixMode(LLRender::MM_MODELVIEW); 
- 
- // gGL.getTexUnit(detail2)->unbind(LLTexUni​t::TT_TEXTURE); 
- // gGL.getTexUnit(2)->disable(); 
- // gGL.getTexUnit(2)->activate(); 
- 
- // gGL.matrixMode(LLRender::MM_TEXTURE); 
- // gGL.loadIdentity(); 
- // gGL.matrixMode(LLRender::MM_MODELVIEW); 
- 
- // gGL.getTexUnit(detail1)->unbind(LLTexUni​t::TT_TEXTURE); 
- // gGL.getTexUnit(1)->disable(); 
- // gGL.getTexUnit(1)->activate(); 
- 
- // gGL.matrixMode(LLRender::MM_TEXTURE); 
- // gGL.loadIdentity(); 
- // gGL.matrixMode(LLRender::MM_MODELVIEW); 
    //----------------------------------​----------------------------------------​--     //----------------------------------​----------------------------------------​--


トップ   新規 ページ一覧 単語検索 最終更新   ヘルプ   最終更新のRSS 1.0 最終更新のRSS 2.0 最終更新のRSS Atom

サイト内 検索

ログイン

ユーザー名:

パスワード:


パスワード紛失
新規登録

サブ メニュー

ミニカレンダー

前月2024年 5月翌月
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
<今日>

オンライン状況

96 人のユーザが現在オンラインです。 (20 人のユーザが xpwiki を参照しています。)

登録ユーザ: 0
ゲスト: 96

もっと...

アクセスカウンタ

今日 : 1614116141161411614116141
昨日 : 1753317533175331753317533
総計 : 2347928423479284234792842347928423479284234792842347928423479284
Powered by XOOPS Cube 2.1© 2001-2006 XOOPS Cube Project
Design by XoopsDesign.com