コード例 #1
0
void RAS_ListRasterizer::IndexPrimitivesMulti(RAS_MeshSlot& ms)
{
	RAS_ListSlot* localSlot =0;

	if (ms.m_bDisplayList) {
		localSlot = FindOrAdd(ms);
		localSlot->DrawList();

		if (localSlot->End()) {
			// save slot here too, needed for replicas and object using same mesh
			// => they have the same vertexarray but different mesh slot
			ms.m_DisplayList = localSlot;
			return;
		}
	}

	// workaround: note how we do not use vertex arrays for making display
	// lists, since glVertexAttribPointerARB doesn't seem to work correct
	// in display lists on ATI? either a bug in the driver or in Blender ..
	if (mUseVertexArrays && !mATI && !ms.m_pDerivedMesh)
		RAS_VAOpenGLRasterizer::IndexPrimitivesMulti(ms);
	else
		RAS_OpenGLRasterizer::IndexPrimitivesMulti(ms);

	if (ms.m_bDisplayList) {
		localSlot->EndList();
		ms.m_DisplayList = localSlot;
	}
}
コード例 #2
0
void RAS_ListRasterizer::IndexPrimitives(RAS_MeshSlot& ms)
{
	RAS_ListSlot* localSlot =0;

	if (ms.m_bDisplayList) {
		localSlot = FindOrAdd(ms);
		localSlot->DrawList();
		if (localSlot->End()) {
			// save slot here too, needed for replicas and object using same mesh
			// => they have the same vertexarray but different mesh slot
			ms.m_DisplayList = localSlot;
			return;
		}
	}
	// derived mesh cannot use vertex array
	if (mUseVertexArrays && !ms.m_pDerivedMesh)
		RAS_VAOpenGLRasterizer::IndexPrimitives(ms);
	else
		RAS_OpenGLRasterizer::IndexPrimitives(ms);

	if (ms.m_bDisplayList) {
		localSlot->EndList();
		ms.m_DisplayList = localSlot;
	}
}
コード例 #3
0
void RAS_ListRasterizer::IndexPrimitivesMulti(RAS_MeshSlot& ms)
{
	RAS_ListSlot* localSlot =0;

	if (ms.m_bDisplayList) {
		localSlot = FindOrAdd(ms);
		localSlot->DrawList();

		if (localSlot->End()) {
			// save slot here too, needed for replicas and object using same mesh
			// => they have the same vertexarray but different mesh slot
			ms.m_DisplayList = localSlot;
			return;
		}
	}

	RAS_OpenGLRasterizer::IndexPrimitivesMulti(ms);

	if (ms.m_bDisplayList) {
		localSlot->EndList();
		ms.m_DisplayList = localSlot;
	}
}