flagflag  
3: 2014-06-24 (Tue) 22:37:19 admin source Cur: 2014-10-02 (Thu) 09:04:17 iseki source
Line 1: Line 1:
** OpenSim ジオラマ 開発用 [#w8cfb9a8] ** OpenSim ジオラマ 開発用 [#w8cfb9a8]
 + AddDynamicTextureURL()
 + RenderPlugins[contentType].AsyncConvert​Url(updater.UpdaterID, url, extraParams);
 +   contentType を持つモジュールの AsyncConvertUrl() を呼び出す.
 +
 +#br
 +*** RenderTerrainScale [#o1907c41]
 +- void LLDrawPoolTerrain::renderFullShader() の sDetailScale
 +- デフォルトは 7, テクスチャは (リージョンサイズ/7) 個繰り返し表示される.1/7 = 0.14285714
 +- UVMap は (リージョンサイズ/7) 倍される.
 +- 256にすれば,1枚の画像.
 +#br
*** Terrain Texture [#ta44cfc7] *** Terrain Texture [#ta44cfc7]
Line 17: Line 28:
                                     ↓                ↓                                      ↓                ↓
                                     →          lldrawpoolterrain.cpp                                      →          lldrawpoolterrain.cpp
 + 
#br #br
Line 30: Line 41:
    //     //
    LLViewerTexture *detail_texture0p = compp->mDetailTextures[4];     LLViewerTexture *detail_texture0p = compp->mDetailTextures[4];
 + 
    //     //
    sDetailScale = 0.142857/36.;     sDetailScale = 0.142857/36.;
 + 
    LLVector4 tp0, tp1;     LLVector4 tp0, tp1;
 +    
    tp0.setVec(sDetailScale, 0.0f, 0.0f, 0.0);     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);
 + 
    //     //
    // detail texture 0     // detail texture 0
Line 45: Line 56:
    gGL.getTexUnit(detail0)->bind(detail​_texture0p);     gGL.getTexUnit(detail0)->bind(detail​_texture0p);
    gGL.getTexUnit(0)->activate();     gGL.getTexUnit(0)->activate();
 + 
    LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr;     LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr;
    llassert(shader);     llassert(shader);
 +    
    shader->uniform4fv(LLShaderMgr::OBJE​CT_PLANE_S, 1, tp0.mV);     shader->uniform4fv(LLShaderMgr::OBJE​CT_PLANE_S, 1, tp0.mV);
    shader->uniform4fv(LLShaderMgr::OBJE​CT_PLANE_T, 1, tp1.mV);     shader->uniform4fv(LLShaderMgr::OBJE​CT_PLANE_T, 1, tp1.mV);
 + 
    gGL.matrixMode(LLRender::MM_TEXTURE)​;     gGL.matrixMode(LLRender::MM_TEXTURE)​;
    gGL.loadIdentity();     gGL.loadIdentity();
    gGL.matrixMode(LLRender::MM_MODELVIE​W);     gGL.matrixMode(LLRender::MM_MODELVIE​W);
 + 
    // GL_BLEND disabled by default     // GL_BLEND disabled by default
    drawLoop();     drawLoop();
 + 
    // Disable multitexture     // Disable multitexture
    sShader->disableTexture(LLViewerShad​erMgr::TERRAIN_DETAIL0);     sShader->disableTexture(LLViewerShad​erMgr::TERRAIN_DETAIL0);
 + 
    //----------------------------------​----------------------------------------​--     //----------------------------------​----------------------------------------​--
    // Restore Texture Unit 0 defaults     // Restore Texture Unit 0 defaults
 +    
    gGL.getTexUnit(detail0)->unbind(LLTe​xUnit::TT_TEXTURE);     gGL.getTexUnit(detail0)->unbind(LLTe​xUnit::TT_TEXTURE);
    gGL.getTexUnit(0)->enable(LLTexUnit:​:TT_TEXTURE);     gGL.getTexUnit(0)->enable(LLTexUnit:​:TT_TEXTURE);
Line 80: Line 91:
    {     {
     LLUUID tmp_id;      LLUUID tmp_id;
 + 
     msg->getUUID("RegionInfo", "TerrainDetail0", tmp_id);      msg->getUUID("RegionInfo", "TerrainDetail0", tmp_id);
     compp->setDetailTextureID(0, tmp_id);      compp->setDetailTextureID(0, tmp_id);
Line 89: Line 100:
     msg->getUUID("RegionInfo", "TerrainDetail3", tmp_id);      msg->getUUID("RegionInfo", "TerrainDetail3", tmp_id);
     compp->setDetailTextureID(3, tmp_id);      compp->setDetailTextureID(3, tmp_id);
 + 
     // Iseki      // Iseki
     tmp_id.set("1c5e544e-9198-4681-b87e-9868ae61e461");      tmp_id.set("1c5e544e-9198-4681-b87e-9868ae61e461");


Front page   New List of Pages Search Recent changes   Help   RSS of recent changes (RSS 1.0) RSS of recent changes (RSS 2.0) RSS of recent changes (RSS Atom)

Site Search

Login

Username:

Password:


Lost Password?
Register now!!

Sub Menu

mini Calendar

Last MonthMay 2024Next Month
Su Mo Tu We Th Fr Sa
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
Today

Who's Online

31 user(s) are online (2 user(s) are browsing xpwiki)

Members: 0
Guests: 31

more...

Access Counter

Today : 4148414841484148
Yesterday : 8599859985998599
Total : 2365115423651154236511542365115423651154236511542365115423651154
Powered by XOOPS Cube 2.1© 2001-2006 XOOPS Cube Project
Design by XoopsDesign.com