Пример #1
0
void SporadicMeteorMgr::draw(StelCore* core)
{
	if (!m_flagShow || !core->getSkyDrawer()->getFlagHasAtmosphere())
	{
		return;
	}

	LandscapeMgr* landmgr = GETSTELMODULE(LandscapeMgr);
	if (landmgr->getFlagAtmosphere() && landmgr->getLuminance() > 5.f)
	{
		return;
	}

	// step through and draw all active meteors
	StelPainter sPainter(core->getProjection(StelCore::FrameAltAz));
	foreach (SporadicMeteor* m, activeMeteors)
	{
		m->draw(core, sPainter);
	}
Пример #2
0
void MeteorMgr::draw(StelCore* core)
{
	if (!flagShow)
		return;
	
	LandscapeMgr* landmgr = (LandscapeMgr*)StelApp::getInstance().getModuleMgr().getModule("LandscapeMgr");
	if (landmgr->getFlagAtmosphere() && landmgr->getLuminance()>5)
		return;

	StelPainter sPainter(core->getProjection(StelCore::FrameAltAz));
	glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
	glEnable(GL_BLEND);
	sPainter.enableTexture2d(false);

	// step through and draw all active meteors
	for (std::vector<Meteor*>::iterator iter = active.begin(); iter != active.end(); ++iter)
	{
		(*iter)->draw(core, sPainter);
	}
}