2025-08-29 15:31 CEST

spring: develop b1993bf6 Diff ] Back to Repository ]
Author Committer Branch Timestamp Parent
jk jk develop 2008-07-13 20:06:24 develop ccf1d9f0
Changeset * moved smf ground texture loading to BFGroundDraw::Update() (more time for the PBOs to upload the textures)
* replaced two glGet's in SetupFor(Unit|S3O)Drawing
* removed redundant EndStrip()'s in MiniMap.cpp
* fixed black horizon in BumpWater
* fixed reflection offset in BumpWater

LuaOpengl
* added gl.Texture($shading) & gl.Texture($grass)
* fixed missing return;'s in gl.LoadMatrix() and gl.MulMatrix()
* allow to use gl.CopyToTexture with non GL_TEXTURE2D, i.e. GL_TEXTURE_RECTANGLE

LuaSynced(Read|Ctrl)
* new Spring.GetUnitVectors(unitID) -> {front_x,front_y,front_z},{up_x,up_y,up_z},{right_x,right_y,right_z}
* new Spring.GetUnitWeaponVectors(unitID,weaponNum) -> wpos_x,wpos_y,wpos_z, wdir_x,wdir_y,wdir_z
* new Spring.SetHeightMapFunc(lua_func,arg1,arg2,..)
  This new function allows, in contrast to the old existing heightmap interfaces,
  to make non-planar heightmap changes (like mounds) with a decent performance
  (a whole 16x16 map takes 1:30min, using multiple Spring.LevelHeightMap() took >30mins!).
  Now instead of calling Spring.LevelHeightMap() multiple times, you call
  Spring.SetHeightMapFunc() once and use the following sub-functions:

  new Spring.SetHeight(x,z,h)
    only valid in Spring.SetHeightMapFunc!
  new Spring.SetTerraform(x,z,h,terraform)
    only valid in Spring.SetHeightMapFunc!
    with 0<=terraform<=1 . It is the same equation the engine use internal,
    terraform is 0 at the beginning and goes upto 1 when finished.

 example:
   Spring.SetHeightMapFunc(function(x1,z1,x2,z2)
     local scale = math.pi/300
     for x=x1,x2 do
       for z=z1,z2 do
         Spring.SetHeight(x,z,(math.sin(scale*x)+math.cos(scale*z))*50)
       end
     end
   end, 0,0,Game.mapSizeX,Game.mapSizeZ)

git-svn-id: https://spring.clan-sy.com/svn/spring/trunk@6170 37977431-3df6-0310-b722-df95706aa16b
mod - installer/builddata/springcontent/shaders/bumpWaterFS.glsl Diff ] File ]
mod - rts/Game/Game.cpp Diff ] File ]
mod - rts/Game/UI/MiniMap.cpp Diff ] File ]
mod - rts/Lua/LuaOpenGL.cpp Diff ] File ]
mod - rts/Lua/LuaSyncedCtrl.cpp Diff ] File ]
mod - rts/Lua/LuaSyncedCtrl.h Diff ] File ]
mod - rts/Lua/LuaSyncedRead.cpp Diff ] File ]
mod - rts/Lua/LuaSyncedRead.h Diff ] File ]
mod - rts/Map/SMF/BFGroundDrawer.cpp Diff ] File ]
mod - rts/Map/SMF/BFGroundDrawer.h Diff ] File ]
mod - rts/Rendering/UnitModels/UnitDrawer.cpp Diff ] File ]
mod - rts/Rendering/UnitModels/UnitDrawer.h Diff ] File ]
mod - rts/Sim/Features/FeatureHandler.cpp Diff ] File ]
mod - rts/Sim/Projectiles/ProjectileHandler.cpp Diff ] File ]