I guess i found a bug.
Lets take example 03.CustomSceneNode and add 2 lines:
Code: Select all
...
CSampleSceneNode(scene::ISceneNode* parent, scene::ISceneManager* mgr, s32 id)
: scene::ISceneNode(parent, mgr, id)
{
Material.Wireframe = false;
Material.Lighting = false;
Material.Thickness = 100.0f; // <======= ADDED, to make points more noticeable
...
virtual void render()
{
u16 indices[] = { 0,2,3, 2,1,3, 1,0,3, 2,0,1 };
video::IVideoDriver* driver = SceneManager->getVideoDriver();
driver->setMaterial(Material);
driver->setTransform(video::ETS_WORLD, AbsoluteTransformation);
//driver->drawVertexPrimitiveList(&Vertices[0], 4, &indices[0], 4, video::EVT_STANDARD, scene::EPT_TRIANGLES, video::EIT_16BIT);
driver->drawVertexPrimitiveList(&Vertices[0], 4, &indices[0], 12, video::EVT_STANDARD, scene::EPT_POINTS, video::EIT_16BIT); // <=== ADDED, and commented previous (original) line
}
I have tested different renderers and here are results:
Software
No points drawn.
BurningsVideo
Stable crashes with:
Unhandled exception at 0x101f62a6 (Irrlicht.dll) in 03.CustomSceneNode.exe: 0xC0000005: Access violation reading location 0x00000030.
Call Stack:
Code: Select all
> Irrlicht.dll!irr::video::CBurningVideoDriver::drawVertexPrimitiveList(const void * vertices=0x01e14de8, unsigned int vertexCount=4, const void * indexList=0x0012fbf8, unsigned int primitiveCount=12, irr::video::E_VERTEX_TYPE vType=EVT_STANDARD, irr::scene::E_PRIMITIVE_TYPE pType=EPT_POINTS, irr::video::E_INDEX_TYPE iType=EIT_16BIT) Line 1288 + 0xf bytes C++
03.CustomSceneNode.exe!CSampleSceneNode::render() Line 136 + 0x2a bytes C++
Irrlicht.dll!irr::scene::CSceneManager::drawAll() Line 1470 + 0x2f bytes C++
03.CustomSceneNode.exe!main() Line 247 + 0x12 bytes C++
Direct3D8/9
This looks like draws OK, the only thing that it doesn't support Thinkness of the material. Maybe ignored; i didn't noticed difference between 1.0f and 100.0f.
OpenGL
We get 2 different videos, which makes me think that it can crash any moment with access violation (but while i tested -- it didn't crashed):
i executed EXE file directly (notice white static point at the center):
http://www.youtube.com/watch?v=jaN4V0VVv0U
and here i just run it from VS2008 (notice big black blinking square in the center and other point (actually moving)):
http://www.youtube.com/watch?v=WjwXBrl8D7k
(please note1: we have only FOUR different (real) vertices (edges of pyramid)).
(please note2: real vertices has colors: cyan, yellow, pink and green; other vertices (white and black) shouldn't be drawn at all).