fixed teleporting drag
This commit is contained in:
@@ -674,7 +674,9 @@ void Application::onGraphics(RenderDevice* rd) {
|
|||||||
|
|
||||||
renderDevice->setLight(0, GLight::directional(lighting.lightDirection, lighting.lightColor));
|
renderDevice->setLight(0, GLight::directional(lighting.lightDirection, lighting.lightColor));
|
||||||
renderDevice->setAmbientLightColor(lighting.ambient);
|
renderDevice->setAmbientLightColor(lighting.ambient);
|
||||||
|
//renderDevice->setBlendFunc(RenderDevice::BLEND_ONE, RenderDevice::BLEND_ONE);
|
||||||
|
|
||||||
|
|
||||||
rd->beforePrimitive();
|
rd->beforePrimitive();
|
||||||
CoordinateFrame forDraw = rd->getObjectToWorldMatrix();
|
CoordinateFrame forDraw = rd->getObjectToWorldMatrix();
|
||||||
glEnableClientState(GL_VERTEX_ARRAY);
|
glEnableClientState(GL_VERTEX_ARRAY);
|
||||||
@@ -689,6 +691,9 @@ void Application::onGraphics(RenderDevice* rd) {
|
|||||||
glDisableClientState(GL_NORMAL_ARRAY);
|
glDisableClientState(GL_NORMAL_ARRAY);
|
||||||
rd->setObjectToWorldMatrix(forDraw);
|
rd->setObjectToWorldMatrix(forDraw);
|
||||||
rd->afterPrimitive();
|
rd->afterPrimitive();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Draw::sphere(G3D::Sphere(mouse.getPosition(), 1), rd, Color3::cyan(), Color4::clear());
|
Draw::sphere(G3D::Sphere(mouse.getPosition(), 1), rd, Color3::cyan(), Color4::clear());
|
||||||
if(g_selectedInstances.size() > 0)
|
if(g_selectedInstances.size() > 0)
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ ArrowTool::~ArrowTool(void)
|
|||||||
|
|
||||||
void ArrowTool::onButton1MouseDown(Mouse mouse)
|
void ArrowTool::onButton1MouseDown(Mouse mouse)
|
||||||
{
|
{
|
||||||
|
mouseDownStartx = mouse.x;
|
||||||
|
mouseDownStarty = mouse.y;
|
||||||
mouseDown = true;
|
mouseDown = true;
|
||||||
if(!lctrlDown && !rctrlDown)
|
if(!lctrlDown && !rctrlDown)
|
||||||
g_selectedInstances.clear();
|
g_selectedInstances.clear();
|
||||||
|
|||||||
Reference in New Issue
Block a user