Difference between revisions of "GLScene/zh CN"

From Lazarus wiki
Jump to navigationJump to search
Line 91: Line 91:
  
 
==== 最新 (v1.0.0.2) ====
 
==== 最新 (v1.0.0.2) ====
* 新的快照可以在这里找到 [http://sourceforge.net/projects/lazarus-ccr/files/GLScene/ Lazarus CCR 页面].
+
* 新的快照可以在这里找到 [http://sourceforge.net/projects/lazarus-ccr/files/GLScene/ Lazarus CCR 页面]。今天对原CVS存储库中的功能及错误做了修正,这应该是相同的。然而,仍有一些遗失。不会有“Lazarus-with-GLScene-Installer”这个新版本,除非别人创建它。
This should be almost identical to the original cvs repository of today in terms of functionality and bugfixes, however, there are still some parts missing. There wont be a "Lazarus-with-GLScene-Installer" with this new release, unless someone else creates it.
+
--[[User:Crossbuilder|Crossbuilder]] 20:16, 18 7月 2007 (CEST)
--[[User:Crossbuilder|Crossbuilder]] 20:16, 18 July 2007 (CEST)
 
  
 
==== 过时 ====
 
==== 过时 ====

Revision as of 06:16, 22 April 2014

Deutsch (de) English (en) français (fr) Bahasa Indonesia (id) 日本語 (ja) 한국어 (ko) português (pt) русский (ru) 中文(中国大陆)‎ (zh_CN)

关于

GLScene是一个基于OpenGL的3D库。它最初是为Delphi编写的,现在它可以工作C+ + Builder、Kylix、Delphi和Lazarus中。

其主要的特征是:

场景描述

  • hierarchical objects structure, with as many objects as memory allows, easily extendable
  • 互动场景管理(许多 Delphi 专家)
  • 易于使用的对象旋转、运动功能。
  • 预定义的对象(立方到茶壶、雪碧等),易于扩展
  • structural objects (dummy cube, proxy object) for manageing composite objects
  • procedural objects (heightfield, revolution solids, pipes, tesselators...)
  • support for 2D and 1D objects (sprites, lines with spline support) fully integrated
  • HUD objects (sprites rendered in 2D coordinates)
  • Utility objects (grids, skydome, arrows...)
  • support classes for directly accessing OpenGL
  • camera and light objects that can be used anywhere in a scene objects hierarchy
  • behaviour objects can be attached to objects for animation purposes, easily extendable
  • per-object special effects (before/after object rendering and scene after-effects), easily *extendable
  • support for particle systems, any object or object structure can be a particle
  • 3D Studio file import with automatic and precise normal vector calculation (using the given *smoothing groups of the file) and texture coordinate import
  • Other imported formats : OBJ/OBJF, SMD, MD2, STL, TIN, PLY

材料(Materials)

  • easy to use, optimized, material object
  • material library to share and reuse materials
  • ambient, diffuse, emission, specular and shininess support
  • support of blending modes (transparency, additive...)
  • alpha-channel auto-generation
  • support for OpenGL texture formats, including compressed ones (DXT, S3TC etc.)
  • generic plug-in shaders support
  • High-level Cg shaders support classes
  • polymorphic image support for texturing (allows many formats as well as procedural textures), easily extendable
  • more than 150 predefined colors like clrCornflowerBlue or clrCoolCopper (easily extendable) *in addition to standard colors and direct RGBA specifications
  • easily to use texture movement and scaling properties, independently from texture coordinates
  • 32 bits Bitmap support class

渲染

  • automatically uses the hardware OpenGL driver if available
  • a well working camera model using focal length and targeting
  • multiple viewers for one or more scenes, easy change of view through camera selection
  • fog and depth-of-view support
  • render to a file, a bitmap or to the printer in any color and pixel resolution
  • full screen support with dynamic resolution changes
  • reflections and mirror effects
  • dynamic shadow casting
  • high-performance scene-wide transparent particles system support
  • automatic frustrum culling (hierarchical or per-object)

动画

  • propagation of time progression events
  • 骨骼动画(每个顶点多个骨骼)
  • frame interpolation and morph targets
  • 易于行为扩展
  • 动态物理:惯性,加速度,阻力中的应用
  • automatic, realtime scene cadenceing

接口

  • 易于使用的功能方便拾取对象
  • 摄像机运动辅助函数
  • 拾取对象平移辅助函数
  • 用于屏幕和世界坐标系之间的转换,光线投射

实用程序(Utilities)

  • optimized geometry functions and utilities (vector, quaternion and matrix...)
  • cubic spline support functions and class
  • mesh manipulation and optimization (stripification, vertex-cache awareness, etc.)
  • component to make full-featured screen-saver in a few clicks
  • precise frame speed determination
  • 异步定时器(多线程)
  • 操纵杆支持
  • 异步键盘接入,支持键盘映射

截图

Gl effect.jpg Gl cel.jpg Gl trinity.jpg
Gl ode.jpg

作者

作者: initially Mike Lischke 这段时间由 Eric Grange维护 LCL 接口: Christian Ulrich

下载

分支

一个大的更新(截止 2012-05-03)GLScene在:wiki.glscene.info

最新 (v1.0.0.2)

  • 新的快照可以在这里找到 Lazarus CCR 页面。今天对原CVS存储库中的功能及错误做了修正,这应该是相同的。然而,仍有一些遗失。不会有“Lazarus-with-GLScene-Installer”这个新版本,除非别人创建它。

--Crossbuilder 20:16, 18 7月 2007 (CEST)

过时

较旧的版本(0.9.1.6)可以在 Lazarus CCR页面 找到,连同Lazarus 安装和GLScene已经在IDE和GlScene的演示里。

更新:这个很老了,如果可能的话使用svn checkout(见下文)。

SVN

在这里检出源文件 http://svn.freepascal.org/svn/fpcprojects/glscene/trunk/

使用命令:

svn co http://svn.freepascal.org/svn/fpcprojects/glscene/trunk glscene

这将下载分支到你的glscene目录。

你Windows你可以使用tortoise SVN或其它工具。

Bug报告

Bug反馈/功能要求 请选择"Lazarus-ccr"项目中的"glscene"分类,感谢。

更新日志

  • 18.07.2007 快照发布版本 1.0.0.2
    • 调整了些东西,它能工作在最新的lazarus SVN版本
    • 添加位图对象到SceneEditor
    • 修正SceneEditor中另一个AV
    • 将所有补丁和错误修正from original glscene cvs repo like dynamic textures ..
  • 13.06.2007 快照发布版本 1.0.0.1
    • 合并所有补丁和修正原始GLscene cvs报告
    • 改进场景编辑器(崩溃较少,但仍需要一些关爱)
      提示:经常保存项目 ;-)
    • 分离mmsystem的依赖从通用声音支持,如FMOD在Linux下是可用的。
    • 更多 ..
  • 01.12.06 增加了对ODE的支持,GTK2和Cg着色器在Linux上的支持(ODE仅限于正常释放,不支持cone、ccylinder 和terrains)。
  • 10.08.05 太多的变化,张贴在这里,查看CVS历史
  • 16.07.05 GLScene 0.9.X 端口
  • 查看GLScene SourceForge帐户的完整日志

状态: Beta

安装 1.0.0.2

需要FPC 2.1.4或更高版本,及lazarus0.9.23以上。11348或更高 !!

  • 提取源文件
    • ZIP:
      • 在 "lazarus/components/" 下执行 "unzip glscene-1.0.0.2.zip",这将创建 lazarus/components/glscene/ 文件夹
    • SVN:
      • 在 "lazarus/components/" 下执行
        svn co http://svn.freepascal.org/svn/fpcprojects/glscene/trunk glscene
        ,这将创建 lazarus/componets/glscene/ 文件夹
      • Tortoise SVN: 手动在lazarus/components/下创建文件夹 "glscene", 右击文件夹的空白处选择TortoiseSVN下的 "SVN Checkout(检出)...",在 "URL of repository(版本库URL)"中添加
        http://svn.freepascal.org/svn/fpcprojects/glscene/trunk
        并确定。
  • 完成安装:
    • 复制 "lazarus/components/glscene/globallinks/*.lpl" 到 "lazarus/packager/globallinks/"
    • 打开 Lazarus
    • 在"包"菜单下选择 "配置已经安装的包 ..."
    • 在 "Available packages(可用的软件包)" 中选择 "glscenelazarus"
    • 点击 "安装所选" 按钮
    • 点击 "保存并重建IDE" 按钮
      • 注意:有可能会出现"jpegforlazarus"未找到的错误。如果是的话,你可以执行以下操作:
      • 包菜单 --> 打开包文件...
      • 选择 "glscenelazarus" (版本 1.0.0.3) 后点击 "打开..."
      • 在"Required Packages(所需的软件包)"列表中移除"jpegfromlazarus"
      • 查看"jpeg"单元,在/lazarus/components/glscene/Source/base,替换"LazJPEG"(在uses部分)为"LazJPG"(ImagesForLazarus包)
      • 保存并重复上述四个步骤。
      • 提示:你应该安装了"ImagesForLazarus"包,如果没有,操作方式和安装"glscenelazarus"类似。
    • 重复上述4个步骤安装你需要的软件包。
      • 注:在glsceneode和glscenecgshader安装时,需要将相关的库安装在系统上。
    • 注:你可以尝试选择一个或全部软件包。不过,我喜欢一个一个安装,这样可以查看它的错误,如果出现错误的话;)
    • 安装 "glscenelazarus" - 错误: (只需要使用glscene-1.0.0.2.zip,在SVN中这些已经修订)
      • 更正单元 GLLCLViewer: procedure TGLSceneViewer.CreateParams(var Params: TCreateParams); - 在 procedure TGLSceneViewerLCL.CreateParams(var Params: TCreateParams);
      • 更正单元 GLLCLViewer: procedure TGLSceneViewer.EraseBackground(DC: HDC); - 在 procedure TGLSceneViewerLCL.EraseBackground(DC: HDC);
      • 更正单元 GLLCLFullscreenViewer: Change "RegisterClasses([TGLSceneViewer, TGLFullScreenViewer]);" 为 "RegisterClasses([TGLFullScreenViewer]);"
  • 软件包列表:
    • glscenelazarus 主要包
    • glscenecgshader Cg 渲染组件
    • glsceneode ODE 组件
    • glss_fmodlaz FMOD 组件
    • gls_winonly 仅Windows,包含声音支持mmsystem,BASS支持和GLScreenSaver组件
  • 编译 "演示" - 错误:
    • 如果未找到类 - TGLSceneViewer:修改(演示)GLLCLViewer - 为 GLViewer

安装 0.9.6.1

  • 创建目录 lazarus\components\GLScene
  • 在目录中解压zip文件
  • 打开 Lazarus
  • 在组件/打开包文件(.lpk)中,选择lazarus\components\glscene\Lazarus下的glscenelazarus.lpk
  • (点击编译是必须的,如果你不想安装组件到IDE)
  • 点击安装
  • 要使用其他软件包重复这些步骤(打开.lpk,点击安装),注:这些额外的包需要额外的库(FMOD、ODE、CG)。
    • glscenecgshader.lpk : Cg着色器(仅适用于NVidia显卡?)
    • glsceneode.lpk : 对ODE库支持
    • glsss_fmodlaz.lpk : 对FMOD库支持
    • gls_winonly.lpk : 只可以安装在Windows上。包含屏幕保护以以及BASS库支持。

提示:如果出现“GLGraphics 未找到”的错误,不要担心,只要在工具中重新构建Lazarus,或许就可以解决。

Lazasrus中安全安装GLScene 可以查看:二进制Win32发布http://www.skinhat.com/lazarus

对于Linux新用户只是个警告: GLScene目前并不能“拿来就用”,需要做些添加或修改。

更新:这个不准确了。Lazarus中的Glscene 是相当出色的,可以实现在Windows及Linux中“拿来就用”。

新的trunk 版本(见上文SVN)在Linux上正常工作,一些演示(约20%)不能正常使用,但大多可以使用。我们也在努力着让它可以在其他Unix平台上完美运行。

在非Windows丢失/不能工作的组件是:glKeyboard (使用WINAPI,但不是必须的居多)、glSound(使用mm,我们需要使用OpenAL或者类似的)。

一个 全功能的Windows安装程序 计划。

帮助

  • 可以在 GLScene 首页 找到
  • 联系 #glscene channel at freenode.net