From 4d952c34d4dd339a2cc6fb9cb9267adeca814741 Mon Sep 17 00:00:00 2001 From: David Rose Date: Fri, 22 Mar 2002 02:22:45 +0000 Subject: [PATCH] hack for sprite particles --- panda/src/glgsg/glGraphicsStateGuardian.cxx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/panda/src/glgsg/glGraphicsStateGuardian.cxx b/panda/src/glgsg/glGraphicsStateGuardian.cxx index 5916d29799..b2928d7862 100644 --- a/panda/src/glgsg/glGraphicsStateGuardian.cxx +++ b/panda/src/glgsg/glGraphicsStateGuardian.cxx @@ -1036,8 +1036,15 @@ draw_sprite(GeomSprite *geom, GeomContext *) { modelview_mat = ctatt->get_matrix(); // get the camera information - float aspect_ratio = - get_current_camera()->get_lens()->get_aspect_ratio(); + + // Hmm, this doesn't work any more, since we don't store the camera + // pointer in new scene graph land. Need to find a better way to + // get the current window's aspect ratio. Here's a temporary hack + // for now. + + // float aspect_ratio = + // get_current_camera()->get_lens()->get_aspect_ratio(); + float aspect_ratio = 1.333333; // load up our own matrices glMatrixMode(GL_MODELVIEW);