Graphics namespace
All the graphics system: rendering, shaders, models, lighting, textures,...
This namespace includes classes related to graphics rendering in the game. Some things included are models, textures and materials.
This namespace is deeply related with the RenderWare namespace; elements in Graphics are high-level representations, easy to use, whereas RenderWare elements are low-level representations which are not needed to modify in most cases.
- Graphics::
Model represents a 3D model made of triangulated meshes. It uses objects like RenderWare:: VertexBuffer, RenderWare:: IndexBuffer, RenderWare:: Animations,... - Graphics::
Texture represents a game texture, which can be 2D or 3D (cube textures). It uses RenderWare:: Raster. - Graphics::
Material contains the information of how a model mesh must be painted, that is, which shaders and textures it uses. It uses RenderWare:: CompiledState
Namespaces
- namespace ActiveState
- namespace GlobalState
- namespace Renderer_addresses
- namespace RenderUtils
- This namespace contains most internal stuff related with rendering, such as Direct3D Device and shaders, shader data, etc.
Classes
- class cBufferDraw
- class cFrustumCull
- class cImageData
- class cImageDataRaw
- class cLayerGroup
- An implementation of ILayer that renders a sequence of layers.
- class cLightingConfig
- class cMaterialInfo
- class cMaterialManager
- The implementation of IMaterialManager; this should only be used for extending and detouring.
- class cMeshData
- class cMITextureSet
- class cModelInstance
- class cModelInstanceAnimations
- class cModelManager
- The implementation of IModelManager; this should only be used for extending and detouring.
- class cModelWorld
- struct cMWHull
- class cMWModelInternal
- struct cMWTransformedHull
- class CompiledShader
- struct cPlane
- struct cRenderJobInfo
- class cRenderTargetManager
- class cRwDirectResource
- struct cScreenInfo
- class cShaderDataTextureSet
- class cTextureManager
- The implementation of ITextureManager; this should only be used for extending and detouring.
- struct FilterSettings
- class GeneratedMesh
- class GmdlRenderAsset
- class IAmbientOccluder
- class IGraphicsManager
- class ILayer
- This interfaces defines a layer that is rendered every game loop, by callings its ILayer::
DrawLayer() method. - class ILightingManager
- This manager handles the lighting configurations in the game.
- class ILightingWorld
- A lighting world is a space with a specific lighting configuration.
- class IMaterialManager
- This manager stores the information of materials, which are used to control the visual appearance of game objects.
- class IModelManager
- This manager stores the model worlds in the game; for more info, check the IModelWorld class.
- class IModelWorld
- A model world is a space where models can be rendered in the game.
- class IRawImage
- class IRenderer
- This class manages the rendering process in the game.
- class IRenderTargetManager
- class IShadowWorld
- class ITextureManager
- class IThumbnailManager
- class LambdaLayer
- class LayerSequence
- struct Light
- class Material
- Represents a material that controls the visual appearance of game objects.
- class MaterialShader
- class Model
- struct MorphHandleInfo
- struct NamedShaderDataUniform
- class PlanetThumbnailRequest
- struct PosNormalVertex
- struct PosUvVertex
- struct RenderStatistics
- struct RenderTargetID
- class ShaderBuilder
- struct ShaderBuilderEntry
- struct ShaderDataInformation
- struct ShaderDataUniform
- struct ShadowMapInfo
- class StandardShader
- struct StandardVertex
- struct StandardVertexCompact
- class Texture
- High level representation of a game texture.
- class TextureContainer
- class UnkMatManager
Enums
-
enum class ModelGroups: uint32_
t { DeformHandle = 0x1BA53EA, DeformHandleOverdraw = 0x1BA53EB, Background = 0x223E8E0, Overdraw = 0x22FFF11, EffectsMask = 0x23008D4, TestEnv = 0x26F3933, PartsPaintEnv = 0xFE39DE0, Skin = 0xFEB8DF2, RotationRing = 0x31390732, RotationBall = 0x31390733, SocketConnector = 0x4FF4AF74, AnimatedCreature = 0x509991E6, TestMode = 0x509AA7C9, Vertebra = 0x513CDFC1, PaletteSkin = 0x71257E8B, ExcludeFromPinning = 0x900C6ADD, Palette = 0x900C6AE5, BallConnector = 0x900C6CDD, Rigblock = 0x9138FD8D, RigblockEffect = 0x4FE3913, GameBackground = 0x64AC354 } - enum class LayerIndices { ClearScene = 0, Planets = 7, PlanetRings = 8, TerrainRTT = 9, Terrain = 10, PlanetRibbons1 = 11, TerrainModels = 12, Level = 13, BlobShadows = 14, PreMain = 15, Main = 16, CreatureAnim = 17, PostMain = 18, CreatureFXAnim = 19, EffectsMask = 20, UI = 30 }
- The available layer indices that can be used for adding renderers.
- enum class LayerIndices2 { Clear = 1, EffectsBackground = 3, Unk4 = 4, Unk5 = 5, Unk6 = 6, TerrainRTT = 7, Terrain = 8, PlanetNationalBoundaries = 9, UnkA = 0xA, BlobShadows = 0xB, UnkC = 0xC, UnkD = 0xD, UnkE = 0xE, UnkF = 0x0F, Unk11 = 0x11, Unk12 = 0x12, Unk14 = 0x14, Unk15 = 0x15, EffectsForeground = 0x16, PlanetTradeRoutes = 0x19, Unk1A = 0x1A, Unk1B = 0x1B, Unk1E = 0x1E, Unk20 = 0x20, Unk21 = 0x21, Unk25 = 0x25 }
- enum TextureMessages { kMsgTextureExtractCompleted = 0x522264D }
-
enum class CollisionMode: uint8_
t { BoundingSphere = 0, BoundingBox = 1, HullTriangle = 2, MeshCluster = 3, MeshTriangle = 4 } - enum ModelFlags { kModelFlagUseColor = 0x2, kModelFlagObjectTypeColor = 0x8, kModelFlagOverrideRaycastMode = 0x100, kModelFlagHighRes = 0x2000, kModelFlagIsLoaded = 0x4000, kModelFlagVisible = 0x8000, kModelFlagOverrideBoundingBox = 0x10000, kModelFlagOverrideBoundingRadius = 0x20000, kModelFlagNeedsBake = 0x40000 }
- enum TextureFlags { kTextureFlagIsLoading = 1, kTextureFlagForceLoad = 2, kTextureFlagSetLOD = 4, kTextureFlagModified = 8 }
Typedefs
- using VertexShader = CompiledShader<IDirect3DVertexShader9>
- using PixelShader = CompiledShader<IDirect3DPixelShader9>
-
using cRwRasterDirectResource = cRwDirectResource<RenderWare::
Raster, 0x2F4E681C> - using TextureFilterCallback_t = bool(*)(Texture*)
- using ModelPredicate_t = bool(*)(Model*, void*)
- using BoneCallback_t = void(*)(int, Matrix4&, Vector3&, void*)
Functions
- auto Addresses(ActiveState) -> namespace
- ASSERT_SIZE(cBufferDraw, 0x1B4)
- auto Addresses(cBufferDraw) -> namespace
- ASSERT_SIZE(cPlane, 0x28)
- ASSERT_SIZE(cFrustumCull, 0xF0)
- auto Addresses(cFrustumCull) -> namespace
- ASSERT_SIZE(cImageData, 0x14)
- ASSERT_SIZE(cImageDataRaw, 0x2C)
- ASSERT_SIZE(cLayerGroup, 0x20)
- ASSERT_SIZE(cLightingConfig, 0x144)
- ASSERT_SIZE(cMaterialInfo, 0x1C)
- auto Addresses(cMaterialManager) -> namespace
- ASSERT_SIZE(cMeshData, 0x58)
- ASSERT_SIZE(cMITextureSet, 0x70)
- ASSERT_SIZE(cModelInstance, 0x100)
- ASSERT_SIZE(cModelInstanceAnimations, 0xA0)
- ASSERT_SIZE(cModelManager, 0x60)
- auto Addresses(cModelWorld) -> namespace
- ASSERT_SIZE(PixelShader, 0x130)
- auto Addresses(CompiledShader) -> namespace
- auto GetVertexShaders() -> eastl::vector<VertexShader>&
- auto GetPixelShaders() -> eastl::vector<PixelShader>&
-
auto ReadCompiledVertexShaders(IO::
IStream* pStream) -> void -
auto ReadCompiledPixelShaders(IO::
IStream* pStream) -> void - ASSERT_SIZE(cRenderTargetManager, 0x2C)
- auto GenerateScreenPlane(float z = 0.0) -> GeneratedMesh<PosUvVertex>*
- auto Addresses(GlobalState) -> namespace
- auto Addresses(IGraphicsManager) -> namespace
- auto Addresses(ILightingManager) -> namespace
- ASSERT_SIZE(Material, 0x48)
- auto Addresses(IMaterialManager) -> namespace
- auto Addresses(IModelManager) -> namespace
- ASSERT_SIZE(cMWHull, 0x1C)
- ASSERT_SIZE(cMWTransformedHull, 0x28)
- ASSERT_SIZE(MorphHandleInfo, 0x5C)
- auto Addresses(IModelWorld) -> namespace
- ASSERT_SIZE(cRenderJobInfo, 11* 4)
- auto GetMousePosition(int& mouseX, int& mouseY) -> void
- auto Addresses(IRenderManager) -> namespace
- auto Addresses(IRenderer) -> namespace
- auto Addresses(IRenderTargetManager) -> namespace
-
auto GetMainColorRTT() -> RenderWare::
Raster* -
auto GetMainDepthRTT() -> RenderWare::
Raster* - auto Addresses(IShadowManager) -> namespace
- auto Addresses(IShadowWorld) -> namespace
- auto Addresses(ITextureManager) -> namespace
- ASSERT_SIZE(PlanetThumbnailRequest, 0x2C)
- auto Addresses(IThumbnailManager) -> namespace
- ASSERT_SIZE(LayerSequence, 0x20)
- ASSERT_SIZE(MaterialShader, 0x48)
- auto Addresses(MaterialShader) -> namespace
- ASSERT_SIZE(Model, 0x94)
- ASSERT_SIZE(cMWModelInternal, 0x13C)
- auto Addresses(Model) -> namespace
- ASSERT_SIZE(RenderStatistics, 0x2C)
- auto Addresses(RenderUtils) -> namespace
- ASSERT_SIZE(ShaderBuilder, 0x2C8)
- auto Addresses(ShaderBuilder) -> namespace
- ASSERT_SIZE(StandardShader, 0x348)
- auto Addresses(StandardShader) -> namespace
Enum documentation
enum class Graphics:: ModelGroups: uint32_ t
enum class Graphics:: LayerIndices
The available layer indices that can be used for adding renderers.
Most of these have been copied from Darkspore globals.lua, so they might not match for Spore.
enum class Graphics:: LayerIndices2
Enumerators | |
---|---|
Clear |
|
EffectsBackground |
Used by effects renderer. |
Unk4 |
|
Unk5 |
|
Unk6 |
|
TerrainRTT |
Renders RTTs used by the planet: water reflection & refraction and scatter map. |
Terrain |
Renders planet land, water, atmosphere, etc. Terrain:: |
PlanetNationalBoundaries |
Renders the national boundaries in a planet. Used by |
UnkA |
|
BlobShadows |
Used by Simulator BlobShadowManager. |
UnkC |
|
UnkD |
|
UnkE |
|
UnkF |
|
Unk11 |
|
Unk12 |
|
Unk14 |
|
Unk15 |
|
EffectsForeground |
Used by effects renderer, renders foreground screen effects. |
PlanetTradeRoutes |
Renders the trade route ribbons in a planet. Used by |
Unk1A |
|
Unk1B |
|
Unk1E |
|
Unk20 |
|
Unk21 |
|
Unk25 |
|
enum Graphics:: TextureMessages
enum class Graphics:: CollisionMode: uint8_ t
Enumerators | |
---|---|
BoundingSphere |
Only use the bounding radius to intersect. |
BoundingBox |
Only use the bounding box to intersect. |
HullTriangle |
Check intersection with the hull mesh. |
MeshCluster |
Check intersection with the LOD0 mesh, in an optimized but more imprecise way. |
MeshTriangle |
Check intersection with the LOD0 mesh triangle geometry, the slowest but most precise. |
enum Graphics:: ModelFlags
enum Graphics:: TextureFlags
Enumerators | |
---|---|
kTextureFlagIsLoading |
Tells the texture is still loading. |
kTextureFlagForceLoad |
Forces the texture to load. If no .raster exists, this will look for rw4 as well. |
kTextureFlagSetLOD |
If enabled, SetLOD() will be called to the texture with the current level of detail. |
kTextureFlagModified |
Tells that the texture has been modified and the changes have not been saved. |
Typedef documentation
typedef CompiledShader<IDirect3DVertexShader9> Graphics:: VertexShader
typedef CompiledShader<IDirect3DPixelShader9> Graphics:: PixelShader
typedef cRwDirectResource<RenderWare:: Raster, 0x2F4E681C> Graphics:: cRwRasterDirectResource
typedef bool(*Graphics:: TextureFilterCallback_t)(Texture*)
typedef bool(*Graphics:: ModelPredicate_t)(Model*, void*)
typedef void(*Graphics:: BoneCallback_t)(int, Matrix4&, Vector3&, void*)
Function documentation
Graphics:: ASSERT_SIZE(cBufferDraw,
0x1B4)
namespace Graphics:: Addresses(cBufferDraw)
Graphics:: ASSERT_SIZE(cPlane,
0x28)
Graphics:: ASSERT_SIZE(cFrustumCull,
0xF0)
namespace Graphics:: Addresses(cFrustumCull)
Graphics:: ASSERT_SIZE(cImageData,
0x14)
Graphics:: ASSERT_SIZE(cImageDataRaw,
0x2C)
Graphics:: ASSERT_SIZE(cLayerGroup,
0x20)
Graphics:: ASSERT_SIZE(cLightingConfig,
0x144)
Graphics:: ASSERT_SIZE(cMaterialInfo,
0x1C)
namespace Graphics:: Addresses(cMaterialManager)
Graphics:: ASSERT_SIZE(cMeshData,
0x58)
Graphics:: ASSERT_SIZE(cMITextureSet,
0x70)
Graphics:: ASSERT_SIZE(cModelInstance,
0x100)
Graphics:: ASSERT_SIZE(cModelInstanceAnimations,
0xA0)
Graphics:: ASSERT_SIZE(cModelManager,
0x60)
namespace Graphics:: Addresses(cModelWorld)
Graphics:: ASSERT_SIZE(PixelShader,
0x130)
namespace Graphics:: Addresses(CompiledShader)
eastl::vector<VertexShader>& Graphics:: GetVertexShaders()
eastl::vector<PixelShader>& Graphics:: GetPixelShaders()
void Graphics:: ReadCompiledVertexShaders(IO:: IStream* pStream)
void Graphics:: ReadCompiledPixelShaders(IO:: IStream* pStream)
Graphics:: ASSERT_SIZE(cRenderTargetManager,
0x2C)
GeneratedMesh<PosUvVertex>* Graphics:: GenerateScreenPlane(float z = 0.0)
namespace Graphics:: Addresses(IGraphicsManager)
namespace Graphics:: Addresses(ILightingManager)
Graphics:: ASSERT_SIZE(Material,
0x48)
namespace Graphics:: Addresses(IMaterialManager)
namespace Graphics:: Addresses(IModelManager)
Graphics:: ASSERT_SIZE(cMWHull,
0x1C)
Graphics:: ASSERT_SIZE(cMWTransformedHull,
0x28)
Graphics:: ASSERT_SIZE(MorphHandleInfo,
0x5C)
namespace Graphics:: Addresses(IModelWorld)
Graphics:: ASSERT_SIZE(cRenderJobInfo,
11* 4)
void Graphics:: GetMousePosition(int& mouseX,
int& mouseY)
namespace Graphics:: Addresses(IRenderManager)
namespace Graphics:: Addresses(IRenderTargetManager)
RenderWare:: Raster* Graphics:: GetMainColorRTT() protected
RenderWare:: Raster* Graphics:: GetMainDepthRTT() protected
namespace Graphics:: Addresses(IShadowManager)
namespace Graphics:: Addresses(IShadowWorld)
namespace Graphics:: Addresses(ITextureManager)
Graphics:: ASSERT_SIZE(PlanetThumbnailRequest,
0x2C)
namespace Graphics:: Addresses(IThumbnailManager)
Graphics:: ASSERT_SIZE(LayerSequence,
0x20)
Graphics:: ASSERT_SIZE(MaterialShader,
0x48)
namespace Graphics:: Addresses(MaterialShader)
Graphics:: ASSERT_SIZE(Model,
0x94)
Graphics:: ASSERT_SIZE(cMWModelInternal,
0x13C)
Graphics:: ASSERT_SIZE(RenderStatistics,
0x2C)
Graphics:: ASSERT_SIZE(ShaderBuilder,
0x2C8)
namespace Graphics:: Addresses(ShaderBuilder)
Graphics:: ASSERT_SIZE(StandardShader,
0x348)
namespace Graphics:: Addresses(StandardShader)