30TransparentRenderFacesGroup::TransparentRenderFacesGroup()
33 this->
model =
nullptr;
73 key.append((
const char*)&efcmData[0],
sizeof(efcmData[0]));
75 key.append((
const char*)&efcmData[1],
sizeof(efcmData[1]));
77 key.append((
const char*)&efcmData[2],
sizeof(efcmData[2]));
79 key.append((
const char*)&efcmData[3],
sizeof(efcmData[3]));
81 key.append((
const char*)&efcaData[0],
sizeof(efcaData[0]));
83 key.append((
const char*)&efcaData[1],
sizeof(efcaData[1]));
85 key.append((
const char*)&efcaData[2],
sizeof(efcaData[2]));
87 key.append((
const char*)&efcaData[3],
sizeof(efcaData[3]));
99 for (
auto j = 0; j < engine->
lights.size(); j++) {
100 engine->
lights[j].update(contextIdx);
121 batchRendererTriangles->render();
122 batchRendererTriangles->clear();
123 batchRendererTriangles->release();
array< Light, LIGHTS_MAX > lights
array< float, 4 > & getArray() const
void set(const array< float, 4 > &color)
Set up color.
const string & getId() const
Representation of a 3d model.
array< float, 4 > & getEffectColorMul(int contextIdx)
Get effect color mul.
virtual void onUpdateShader(int contextIdx)=0
On update shader.
virtual void unbindBufferObjects(int contextIdx)=0
Unbind buffer objects.
virtual void onUpdateTextureMatrix(int contextIdx)=0
Update texture matrix for active texture unit event.
const string & getShader(int contextIdx)
Get shader.
void setShader(int contextIdx, const string &id)
Set shader.
virtual void onUpdateModelViewMatrix(int contextIdx)=0
Update model view matrix event.
Matrix4x4 & getModelViewMatrix()
Matrix2D3x3 & getTextureMatrix(int contextIdx)
Get texture matrix.
virtual void onUpdateEffect(int contextIdx)=0
Update material.
array< float, 4 > & getEffectColorAdd(int contextIdx)
Get effect color add.
Batch renderer for transparent triangles.
static constexpr int32_t RENDERTYPE_ALL
void setupMaterial(int contextIdx, Object3DNode *object3DNode, int32_t facesEntityIdx, int32_t renderTypes, bool updateOnly, string &materialKey, const string ¤tMaterialKey=string())
Set ups a material for rendering.
Object 3d node specifically for rendering.
vector< int32_t > specularMaterialDynamicDiffuseTextureIdsByEntities
Transparent render faces group.
Object3DNode * object3DNode
EntityRenderer * object3DRenderer
static const string createKey(Model *model, Object3DNode *object3DNode, int32_t facesEntityIdx, const Color4 &effectColorAdd, const Color4 &effectColorMul, const Material *material, bool textureCoordinates, const string &shader)
Creates a key for given transparent render faces group attributes.
const Material * material
vector< BatchRendererTriangles * > batchRenderers
void set(EntityRenderer *object3DRenderer, Model *model, Object3DNode *object3DNode, int32_t facesEntityIdx, const Color4 &effectColorAdd, const Color4 &effectColorMul, const Material *material, bool textureCoordinates, const string &shader)
Set transparent render faces group.
void render(Engine *engine, Renderer *renderer, int contextIdx)
Render this transparent render faces node.
Matrix2D3x3 & identity()
Setup identity matrix.
Matrix4x4 & identity()
Setup identity matrix.
Matrix4x4 & set(float r0c0, float r1c0, float r2c0, float r3c0, float r0c1, float r1c1, float r2c1, float r3c1, float r0c2, float r1c2, float r2c2, float r3c2, float r0c3, float r1c3, float r2c3, float r3c3)
Set up matrix by values.