WoW Model Viewer
Your premiere tool for viewing, equipping and animating World of Warcraft models.
Loading...
Searching...
No Matches
ModelRenderPass.h
Go to the documentation of this file.
1#pragma once
2
3#include "types.h"
4
5#include "glm/glm.hpp"
6
7class WoWModel;
8
11{
12public:
13 ModelRenderPass(WoWModel*, int geo);
14
16
19
20 bool swrap, twrap;
21
22 glm::vec4 ocol, ecol;
23
25
27
29 bool init();
30
32 void render(bool animated);
33
35 void deinit();
36
37 static const uint16 INVALID_TEX = 50000;
38
39 /*
40 bool operator< (const ModelRenderPass &m) const
41 {
42 // Probably not 100% right, but seems to work better than just geoset sorting.
43 // Blend mode mostly takes into account transparency and material - Wain
44 if (trans == m.trans)
45 {
46 if (blendmode == m.blendmode)
47 return (geoIndex < m.geoIndex);
48 return blendmode < m.blendmode;
49 }
50 return (trans < m.trans);
51 }
52 */
53};
Represents a single render pass (material + geometry) for an M2 model geoset.
static const uint16 INVALID_TEX
Sentinel value for an unset texture.
void deinit()
Clean up render state after drawing.
WoWModel * model
Owning model.
bool twrap
Texture wrapping modes (S and T).
uint16 tex
Texture index.
void render(bool animated)
Execute the render pass.
int16 specialTex
Material property indices.
bool billboard
Render state flags.
bool init()
Initialise render state from the model's material data.
glm::vec4 ecol
Output and emissive colours.
int geoIndex
Geoset index this pass draws.
Core WoW .m2 model: geometry, animation, textures, and character data.
Definition WoWModel.h:50
int16_t int16
Definition types.h:33
uint16_t uint16
Definition types.h:32