开源Ogre实时脚本编辑器Beta1.11

4 篇文章 0 订阅
3 篇文章 0 订阅

OseBeta1.11

1.11版本简化了脚本创建。好比我准备好了specular.hlsl

    我只需执行

add sm lighting
vs lighting_vs20 specular.hlsl specularVS
ps lighting_ps20 specular.hlsl phongPS
你可以用shift + enter 来输入换行

运行结果:


我就可以得到如下两个program 脚本和1个material脚本:

material lighting
{

    technique
    {

        pass
        {

            vertex_program_ref lighting_vs20
            {
            }

            fragment_program_ref lighting_ps20
            {
            }
        }
    }
}

vertex_program lighting_vs20 hlsl
{
    entry_point specularVS
    target vs_2_0
    source specular.hlsl

    default_params
    {
        param_named_auto gCameraPosObj camera_position_object_space
        param_named_auto gLightPosObj light_position_object_space 0
        param_named_auto gWorldViewProj worldviewproj_matrix
    }
}

fragment_program lighting_ps20 hlsl
{
    entry_point phongPS
    target ps_2_0
    source specular.hlsl

    default_params
    {
        param_named gSpecShine float1 20 0 0 0
        param_named_auto gAmbient ambient_light_colour
        param_named_auto gDiffuse light_diffuse_colour 0
        param_named_auto gSpecular light_specular_colour 0
    }
}


所有的constant都会自动被设置进去,只要你有统一的命名习惯,当然你也可以设置自己的命名习惯。

具体细节参见version/1.11.txt


-----------------------------------------------------------------------------------------------------------------------------

OSE简介:
   
OSE根据脚本结构建立了文档目录,通过编辑目录的形式来编辑脚本。

当前支持的脚本:

.material
.program
.particle
.compositor

当前支持的编辑命令:

  ----------------------------------------------------------------
  Edit Option                              |                Command
  ----------------------------------------------------------------
  change current dir                 |                 cd
  add child dir                            |                 add
  remove child dir                     |                 rm
  copy child dir                          |                 cp
  switch child dir                        |                 sd
  set property                             |                 set
  reset property to default        |                 reset
  ----------------------------------------------------------------     
  
当前支持的scene操作:
                         
  -------------------------------------------------------------------------------------------------
  Scene Manage Option                                    |       Command
  --------------------------------------------------------------------------------------------------
  load mesh                                                          |          lm
  unload mesh                                                     |          um
  play animation                                                  |          pa
  stop animation                                                  |          sa
  --------------------------------------------------------------------------------------------------
  attatch particle to bone or scene node         |
  attatch material to entity or subentity             |          attatch
  attatch compositor to view port                       |
  --------------------------------------------------------------------------------------------------
  detach  item(particle, material, compositor) |          detach
  --------------------------------------------------------------------------------------------------
  scene light manage                                          |         set ambient in  \system
                                                                                |         light is also a dir, it resides in \system
  --------------------------------------------------------------------------------------------------
  export scene                                                       |          es
  load  scene                                                         |          ls(only load exported from ose)
  --------------------------------------------------------------------------------------------------

目前已知的不足之处:

当前只支持DX9。 

        不支持脚本继承

        不支持shared_param

        不支持带空格的名字

        当使用shader  profile 3 时,不要在相应material被使用时做以下事件:

                添加,删除program ref

                unloadGpg

 不然程序会崩溃。

 
   

我在ogre论坛上也发了个帖子.

源代码放在bitbucket

Windows下可执行文件下载地址: peanutandchestnut

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值