Classes | Namespaces | Defines

_src_shader_shader_model.cc File Reference

Modify a 3D model for rendering by shaders. More...

#include "base/module.hh"
#include "base/stack.hh"
#include "gfx/module.hh"
#include "gfx/osg.hh"
#include "shader/module.hh"
#include "shader/conf.hh"
#include "shader/shader_model.hh"
#include "shader/shader_funcs.hh"
#include "shader/shader_name.hh"

Classes

class  shader::ShaderVisitor
 ShaderVisitor (private implementation of ShaderModel). More...

Namespaces

namespace  shader
 

shader module.


Defines

#define SHADER_SHADER_MODEL_CC   1

Detailed Description

Modify a 3D model for rendering by shaders.

LastChangedDate:
2010-02-03 19:48:51 -0500 (Wed, 03 Feb 2010)
Author:
Jim E. Brooks http://www.palomino3d.org
Remarks:
A visitor is run to attach shader uniforms on appropriate osg::Drawable nodes to tell the shaders how to draw them properly. This step is necessary for legacy 3D models that weren't originally designed for shaders. Loosely based on ShaderGen (OSG 2.9) by Maciej Krol.

ShaderModel::ModifyModelForShaders() is the interface. ShaderVisitor is the private implementation.

Optimization faux-pas: This visitor traversal does seem to set uniforms redundantly, but the CULL/DRAW TRAVERSAL will follow a different path than this one.

GLSL does not have bitwise operators (so individual uniform bools).


Define Documentation

#define SHADER_SHADER_MODEL_CC   1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Palomino Flight Simulator documents generated by doxygen 1.7.1 on Tue May 15 2012 22:40:10