Upload
stella-mclaughlin
View
212
Download
0
Embed Size (px)
Citation preview
G3D Design Goals
•C++ library of code common to every 3D project
•Write once, compile everywhere
•Safe and fast
•Prototype a game in one week
•Maximize flexibility
Architecture
Application FrameworkHardwar
e Renderin
g
3DMath
NetworkFile System
Data Struct.
CPU GPU
OS OpenGL
Your Program
Transparency Example
•G3D::Texture:
•Independent of other rendering classes
•fromGLID(), openGLID()
•invertY
Key Design Decisions
•Reference counting memory management
•No scene graph (i.e., no Entity, Model)
•No boost
•zlib, libpng, libjpeg, ODE
G3D Programmable Pipeline
Pixel Processo
r
Vertex Processo
r
Rasterizer
Output Merger
CPU
Shader, ArgList
Texture
RenderDevice::setBlendFunc, setAlphaTest, setStencilTest, setStencilFunc, setDepthTest
VAR
Framebuffer
Display
Alternative Designs
Proposed Design Why Rejected?
Java Performance, OpenGL integration, user base
No RenderDevice Need GL abstraction to minimize state changes
Bohm Collector Performance concerns, complicates API, runtime compatibility
libSDL for Windowing LGPL concerns, requires extra DLL on Win32
wxWidgets Requires major build system integration, no UI inside 3D