Fixed materials in OpenGL example.
This commit is contained in:
parent
b0a8ca8a64
commit
ae87dbee77
@ -49,8 +49,8 @@ void renderRegionImmediateMode(PolyVox::SurfaceMesh<PositionMaterialNormal<Mater
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
//uint8_t material = static_cast<uint8_t>(static_cast<double>(vertex.getMaterial()) + 0.5);
|
uint8_t material = static_cast<uint8_t>(static_cast<double>(vertex.getMaterial().getMaterial()) + 0.5);
|
||||||
uint8_t material = 1;
|
//uint8_t material = 1;
|
||||||
|
|
||||||
|
|
||||||
OpenGLColour colour = convertMaterialIDToColour(material);
|
OpenGLColour colour = convertMaterialIDToColour(material);
|
||||||
|
@ -84,8 +84,8 @@ OpenGLSurfaceMesh BuildOpenGLSurfaceMesh(const SurfaceMesh<PositionMaterialNorma
|
|||||||
*ptr = vertex.getNormal().getZ();
|
*ptr = vertex.getNormal().getZ();
|
||||||
ptr++;
|
ptr++;
|
||||||
|
|
||||||
//uint8_t material = static_cast<uint8_t>(vertex.getMaterial() + 0.5);
|
uint8_t material = static_cast<uint8_t>(vertex.getMaterial().getMaterial() + 0.5);
|
||||||
uint8_t material = 1;
|
//uint8_t material = 1;
|
||||||
|
|
||||||
OpenGLColour colour = convertMaterialIDToColour(material);
|
OpenGLColour colour = convertMaterialIDToColour(material);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user