Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages

# Ogre::Quake3Shader Class Reference

Class for recording Quake3 shaders. More...

`#include <OgreQuake3Shader.h>`

Inheritance diagram for Ogre::Quake3Shader:

[legend]
List of all members.

## Public Types

typedef std::vector< Pass > | PassList

## Public Methods

| Quake3Shader (const String &name)
| Default constructor - used by Quake3ShaderManager (do not call directly).
| ~Quake3Shader ()
virtual void | load (void)
| Generic load - called by Quake3ShaderManager.
virtual void | unload (void)
| Generic unload - called by Quake3ShaderManager.
Material * | createAsMaterial (SceneManager *sm, int lightmapNumber)
| Creates this shader as an OGRE material.
virtual size_t | getSize (void) const
| Retrieves info about the size of the resource.
virtual void | touch (void)
| 'Touches' the resource to indicate it has been used.
time_t | getLastAccess (void) const
| Gets the last time the resource was 'touched'.
const String & | getName (void) const
| Gets resource name.
ResourceHandle | getHandle (void) const
bool | isLoaded (void) const
| Returns true if the Resource has been loaded, false otherwise.
virtual void | destroy ()
| A method to make the resource delete itself.

## Public Attributes

unsigned int | flags
int | numPasses
PassList | pass
bool | farbox
String | farboxName
bool | skyDome
Real | cloudHeight
DeformFunc | deformFunc
Real | deformParams [5]
ManualCullingMode | cullMode
bool | fog
ColourValue | fogColour
Real | fogDistance

## Protected Methods

String | getAlternateName (const String &texName)

## Protected Attributes

String | mName
ResourceHandle | mHandle
bool | mIsLoaded
time_t | mLastAccess
size_t | mSize

## Detailed Description

Class for recording Quake3 shaders.

This is a temporary holding area since shaders are actually converted into Material objects for use in the engine proper. However, because we have to read in shader definitions en masse (because they are stored in shared .shader files) without knowing which will actually be used, we store their definitions here temporarily since their instantiations as Materials would use precious resources because of the automatic loading of textures etc.

Definition at line 47 of file OgreQuake3Shader.h.

## Member Typedef Documentation

typedef std::vector<Pass> Ogre::Quake3Shader::PassList

| Definition at line 103 of file OgreQuake3Shader.h.

## Constructor & Destructor Documentation

Ogre::Quake3Shader::Quake3Shader | ( | const String & | name | ) |

| Default constructor - used by Quake3ShaderManager (do not call directly). Definition at line 40 of file OgreQuake3Shader.cpp. References cullMode, DEFORM_FUNC_NONE, deformFunc, farbox, flags, fog, Ogre::MANUAL_CULL_BACK, Ogre::Resource::mName, numPasses, skyDome, and Ogre::String.

Ogre::Quake3Shader::~Quake3Shader | ( |  | ) |

| Definition at line 53 of file OgreQuake3Shader.cpp.

## Member Function Documentation

Material * Ogre::Quake3Shader::createAsMaterial | ( | SceneManager * | sm,
|  | int | lightmapNumber
| ) |

Creates this shader as an OGRE material.

Creates a new material based on this shaders settings. Registers it with the SceneManager passed in. Material name shader::lightmap.

Definition at line 67 of file OgreQuake3Shader.cpp.

References cloudHeight, Ogre::SceneManager::createMaterial(), Ogre::CULL_NONE, cullMode, Ogre::Quaternion::FromAngleAxis(), getAlternateName(), Ogre::Technique::getPass(), Ogre::Material::getTechnique(), Ogre::Material::isTransparent(), Ogre::LBO_MODULATE, Ogre::LBO_REPLACE, Ogre::LML_CRITICAL, Ogre::Material::load(), Ogre::Resource::mName, numPasses, pass, Ogre::Real, Ogre::SBF_SOURCE_ALPHA, Ogre::TextureUnitState::setAlphaRejectSettings(), Ogre::TextureUnitState::setAnimatedTextureName(), Ogre::TextureUnitState::setColourOperation(), Ogre::Material::setCullingMode(), Ogre::Material::setDepthWriteEnabled(), Ogre::TextureUnitState::setEnvironmentMap(), Ogre::Material::setLightingEnabled(), Ogre::Material::setManualCullingMode(), Ogre::TextureUnitState::setRotateAnimation(), Ogre::Material::setSceneBlending(), Ogre::TextureUnitState::setScrollAnimation(), Ogre::SceneManager::setSkyDome(), Ogre::TextureUnitState::setTextureAddressingMode(), Ogre::TextureUnitState::setTextureCoordSet(), Ogre::TextureUnitState::setTextureUScale(), Ogre::TextureUnitState::setTextureVScale(), Ogre::TextureUnitState::setTransformAnimation(), SHADER_FUNC_INVERSESAWTOOTH, SHADER_FUNC_NONE, SHADER_FUNC_SAWTOOTH, SHADER_FUNC_SIN, SHADER_FUNC_SQUARE, SHADER_FUNC_TRIANGLE, TEXGEN_BASE, TEXGEN_ENVIRONMENT, TEXGEN_LIGHTMAP, Ogre::WaveformType, Ogre::WFT_INVERSE_SAWTOOTH, Ogre::WFT_SAWTOOTH, Ogre::WFT_SINE, Ogre::WFT_SQUARE, and Ogre::WFT_TRIANGLE.

Referenced by Ogre::BspLevel::loadQuake3Level().

virtual void Ogre::Resource::destroy | ( | void |  | ) | `[virtual, inherited]`

A method to make the resource delete itself.

Note:
  This exists because Resource objects could be created in other processes, and they need to be destroyed in the process that created them.

Definition at line 137 of file OgreResource.h.

String Ogre::Quake3Shader::getAlternateName | ( | const String & | texName | ) | `[protected]`

| Definition at line 270 of file OgreQuake3Shader.cpp. References Ogre::String. Referenced by createAsMaterial().

ResourceHandle Ogre::Resource::getHandle | ( | void |  | ) | const`[inherited]`

| Definition at line 120 of file OgreResource.h. References Ogre::ResourceHandle. Referenced by Ogre::Material::clone(), Ogre::BspLevel::loadQuake3Level(), and Ogre::ResourceManager::unload().

time_t Ogre::Resource::getLastAccess | ( | void |  | ) | const`[inherited]`

| Gets the last time the resource was 'touched'. Definition at line 108 of file OgreResource.h.

const String& Ogre::Resource::getName | ( | void |  | ) | const`[inherited]`

Gets resource name.

Reimplemented in Ogre::Material, and Ogre::Overlay.

Definition at line 115 of file OgreResource.h.

References Ogre::String.

Referenced by Ogre::D3D9Texture::_loadCubeTex(), Ogre::Mesh::_notifySkeleton(), Ogre::ResourceManager::add(), Ogre::PopupMenuGuiElement::addListItem(), Ogre::ListGuiElement::addListItem(), Ogre::PopupMenuGuiElement::addMenuItem(), Ogre::MeshManager::createPrefabPlane(), Ogre::TTYGuiElement::getFontName(), Ogre::TextAreaGuiElement::getFontName(), Ogre::PopupMenuGuiElement::getListItemName(), Ogre::ListGuiElement::getListItemName(), Ogre::GpuProgramUsage::getProgramName(), Ogre::MeshSerializer::importMesh(), Ogre::GLTexture::load(), Ogre::TextureManager::loadImage(), Ogre::TextureManager::loadRawData(), Ogre::FontManager::logBadAttrib(), Ogre::MeshSerializerImpl::readMeshLodInfo(), Ogre::MeshSerializerImpl::readMeshLodUsageGenerated(), Ogre::MeshSerializerImpl::readMeshLodUsageManual(), Ogre::PopupMenuGuiElement::removeListItem(), Ogre::ListGuiElement::removeListItem(), Ogre::SceneManager::setSkyBox(), Ogre::SceneManager::setSkyDome(), and Ogre::ResourceManager::unload().

virtual size_t Ogre::Resource::getSize | ( | void |  | ) | const`[virtual, inherited]`

| Retrieves info about the size of the resource. Definition at line 93 of file OgreResource.h. Referenced by Ogre::ResourceManager::unload().

bool Ogre::Resource::isLoaded | ( | void |  | ) | const`[inherited]`

| Returns true if the Resource has been loaded, false otherwise. Definition at line 127 of file OgreResource.h. Referenced by Ogre::GpuProgramUsage::_load(), Ogre::SceneManager::deriveShadowCasterPass(), Ogre::SceneManager::deriveShadowReceiverPass(), Ogre::Technique::isLoaded(), Ogre::D3D9Texture::load(), Ogre::D3D9Texture::unload(), and Ogre::D3D9Texture::~D3D9Texture().

void Ogre::Quake3Shader::load | ( | void |  | ) | `[virtual]`

| Generic load - called by Quake3ShaderManager. Implements Ogre::Resource. Definition at line 57 of file OgreQuake3Shader.cpp.

virtual void Ogre::Resource::touch | ( | void |  | ) | `[virtual, inherited]`

| 'Touches' the resource to indicate it has been used. Reimplemented in Ogre::Material. Definition at line 100 of file OgreResource.h. Referenced by Ogre::Mesh::clone(), Ogre::MeshManager::createCurvedIllusionPlane(), Ogre::MeshManager::createCurvedPlane(), Ogre::MeshManager::createPlane(), and Ogre::ResourceManager::load().

void Ogre::Quake3Shader::unload | ( | void |  | ) | `[virtual]`

| Generic unload - called by Quake3ShaderManager. Reimplemented from Ogre::Resource. Definition at line 62 of file OgreQuake3Shader.cpp.

## Member Data Documentation

Real Ogre::Quake3Shader::cloudHeight

| Definition at line 108 of file OgreQuake3Shader.h. Referenced by createAsMaterial(), and Ogre::Quake3ShaderManager::parseShaderAttrib().

ManualCullingMode Ogre::Quake3Shader::cullMode

| Definition at line 111 of file OgreQuake3Shader.h. Referenced by createAsMaterial(), Ogre::Quake3ShaderManager::parseShaderAttrib(), and Quake3Shader().

DeformFunc Ogre::Quake3Shader::deformFunc

| Definition at line 109 of file OgreQuake3Shader.h. Referenced by Quake3Shader().

Real Ogre::Quake3Shader::deformParams[5]

| Definition at line 110 of file OgreQuake3Shader.h.

bool Ogre::Quake3Shader::farbox

| Definition at line 105 of file OgreQuake3Shader.h. Referenced by Ogre::Quake3ShaderManager::parseShaderAttrib(), and Quake3Shader().

String Ogre::Quake3Shader::farboxName

| Definition at line 106 of file OgreQuake3Shader.h. Referenced by Ogre::Quake3ShaderManager::parseShaderAttrib().

unsigned int Ogre::Quake3Shader::flags

| Definition at line 101 of file OgreQuake3Shader.h. Referenced by Quake3Shader().

bool Ogre::Quake3Shader::fog

| Definition at line 113 of file OgreQuake3Shader.h. Referenced by Ogre::Quake3ShaderManager::parseShaderAttrib(), and Quake3Shader().

ColourValue Ogre::Quake3Shader::fogColour

| Definition at line 114 of file OgreQuake3Shader.h. Referenced by Ogre::Quake3ShaderManager::parseShaderAttrib().

Real Ogre::Quake3Shader::fogDistance

| Definition at line 115 of file OgreQuake3Shader.h. Referenced by Ogre::Quake3ShaderManager::parseShaderAttrib().

ResourceHandle Ogre::Resource::mHandle`[protected, inherited]`

| Definition at line 57 of file OgreResource.h. Referenced by Ogre::ResourceManager::add(), Ogre::Material::clone(), Ogre::Material::copyDetailsTo(), and Ogre::Material::operator=().

bool Ogre::Resource::mIsLoaded`[protected, inherited]`

Definition at line 58 of file OgreResource.h.

Referenced by Ogre::D3D9Texture::_initMembers(), Ogre::D3D9Texture::_loadCubeTex(), Ogre::D3D9Texture::_loadNormTex(), Ogre::D3D9Texture::_loadVolumeTex(), Ogre::Material::_notifyNeedsRecompile(), Ogre::Material::clone(), Ogre::D3DTexture::createSurface2D(), Ogre::D3DTexture::createSurface3D(), Ogre::D3D9Texture::D3D9Texture(), Ogre::D3DTexture::D3DTexture(), Ogre::DynLib::DynLib(), Ogre::Zip::load(), Ogre::SkeletonInstance::load(), Ogre::Skeleton::load(), Ogre::PatchMesh::load(), Ogre::Mesh::load(), Ogre::Material::load(), Ogre::HighLevelGpuProgram::load(), Ogre::GpuProgram::load(), Ogre::GLTexture::load(), Ogre::GLSLGpuProgram::load(), Ogre::Font::load(), Ogre::DynLib::load(), Ogre::D3D9Texture::load(), Ogre::D3D9GpuProgram::load(), Ogre::D3DTexture::load(), Ogre::BspLevel::load(), Ogre::D3D9Texture::loadImage(), Ogre::D3DTexture::loadImage(), Ogre::D3DTexture::loadImage3D(), Ogre::GLTexture::loadImages(), Ogre::Material::Material(), Ogre::Material::operator=(), Ogre::Skeleton::unload(), Ogre::Mesh::unload(), Ogre::Material::unload(), Ogre::HighLevelGpuProgram::unload(), Ogre::GLTexture::unload(), Ogre::Font::unload(), Ogre::DynLib::unload(), Ogre::D3D9Texture::unload(), Ogre::D3DTexture::unload(), and Ogre::BspLevel::~BspLevel().

time_t Ogre::Resource::mLastAccess`[protected, inherited]`

| Definition at line 59 of file OgreResource.h. Referenced by Ogre::Material::operator=().

String Ogre::Resource::mName`[protected, inherited]`

Definition at line 56 of file OgreResource.h.

Referenced by Ogre::Skeleton::_dumpContents(), Ogre::Mesh::_rationaliseBoneAssignments(), Ogre::GLSLProgram::attachToProgramObject(), Ogre::BspLevel::BspLevel(), Ogre::Mesh::buildEdgeList(), Ogre::Mesh::buildTangentVectors(), Ogre::Material::clone(), Ogre::Material::compile(), Ogre::GLSLProgram::compile(), Ogre::Material::copyDetailsTo(), createAsMaterial(), Ogre::D3D9HLSLProgram::createLowLevelImpl(), Ogre::CgProgram::createLowLevelImpl(), Ogre::Font::createTextureFromFont(), Ogre::D3D9Texture::D3D9Texture(), Ogre::D3DTexture::D3DTexture(), Ogre::DynLib::DynLib(), Ogre::Font::Font(), Ogre::Mesh::generateLodLevels(), Ogre::Material::getBestTechnique(), Ogre::Overlay::getName(), Ogre::Material::getName(), Ogre::GLTexture::GLTexture(), Ogre::GpuProgram::GpuProgram(), Ogre::Zip::load(), Ogre::Skeleton::load(), Ogre::Mesh::load(), Ogre::GLTexture::load(), Ogre::Font::load(), Ogre::DynLib::load(), Ogre::D3DTexture::load(), Ogre::BspLevel::load(), Ogre::D3D9GpuFragmentProgram::loadFromMicrocode(), Ogre::D3D9GpuVertexProgram::loadFromMicrocode(), Ogre::GLSLProgram::loadFromSource(), Ogre::GLArbGpuProgram::loadFromSource(), Ogre::D3D9HLSLProgram::loadFromSource(), Ogre::D3D9GpuProgram::loadFromSource(), Ogre::CgProgram::loadFromSource(), Ogre::GLTexture::loadImages(), Ogre::Material::Material(), Ogre::Mesh::Mesh(), Ogre::Material::operator=(), Ogre::Overlay::Overlay(), Quake3Shader(), Ogre::CgProgram::selectProfile(), Ogre::Mesh::setSkeletonName(), Ogre::Skeleton::Skeleton(), Ogre::StringResource::StringResource(), Ogre::Texture::Texture(), Ogre::Zip::unload(), Ogre::DynLib::unload(), Ogre::CgProgram::unloadImpl(), and Ogre::Zip::Zip().

size_t Ogre::Resource::mSize`[protected, inherited]`

| Definition at line 60 of file OgreResource.h. Referenced by Ogre::D3D9Texture::_setFinalAttributes(), Ogre::D3DTexture::loadImage(), Ogre::D3DTexture::loadImage3D(), Ogre::GLTexture::loadImages(), and Ogre::Material::operator=().

int Ogre::Quake3Shader::numPasses

| Definition at line 102 of file OgreQuake3Shader.h. Referenced by createAsMaterial(), Ogre::Quake3ShaderManager::parseNewShaderPass(), and Quake3Shader().

PassList Ogre::Quake3Shader::pass

| Definition at line 104 of file OgreQuake3Shader.h. Referenced by createAsMaterial(), and Ogre::Quake3ShaderManager::parseNewShaderPass().

bool Ogre::Quake3Shader::skyDome

| Definition at line 107 of file OgreQuake3Shader.h. Referenced by Ogre::Quake3ShaderManager::parseShaderAttrib(), and Quake3Shader().

The documentation for this class was generated from the following files:

- OgreQuake3Shader.h
- OgreQuake3Shader.cpp

Copyright © 2002-2003 by The OGRE Team
Last modified Sun Nov 28 19:50:21 2004