scene::EPT_POINTS / EPT_POINT_SPRITES

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
greenya
Posts: 1012
Joined: Sun Jan 21, 2007 1:46 pm
Location: Ukraine
Contact:

scene::EPT_POINTS / EPT_POINT_SPRITES

Post by greenya »

Hello!

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
	}
In the sample above you may see i used scene::EPT_POINTS, but all next investigation also realed to scene::EPT_POINT_SPRITES (besides, i do not see difference on any of the rendering devices).

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).
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Hmm, need to check this on my system. I often use example 3 for this kind of render testing and never had such a problem. Are you sure that it's not the mouse that is drawn wrongly?
greenya
Posts: 1012
Joined: Sun Jan 21, 2007 1:46 pm
Location: Ukraine
Contact:

Post by greenya »

Yes i'm sure that this is not mouse pointer, because code doesn't contain mouse usage and nothing like FPS camera (which grabs mouse input); and of cause because i can see normal mouse cursor, move it , move rendering window over my desktop and so on (common system mouse cursor).
Post Reply