*** empty log message ***

This commit is contained in:
Joe Shochet 2001-02-28 05:38:44 +00:00
parent 2e298544c8
commit 71f9ef76a2
2 changed files with 16 additions and 8 deletions

View File

@ -8,7 +8,7 @@ class Loader:
"""Loader class: contains method to load models, sounds and code"""
notify = directNotify.newCategory("Loader")
notify.setVerbose(1)
# notify.setVerbose(1)
# special methods
def __init__(self, base):

View File

@ -276,15 +276,23 @@ void toggle_texture(NodeAttributes &initial_state) {
}
void take_snapshot(GraphicsWindow *win, const string &name) {
PixelBuffer p;
GraphicsStateGuardian* g = win->get_gsg();
const RenderBuffer& r = g->get_render_buffer(RenderBuffer::T_front);
GraphicsStateGuardian* gsg = win->get_gsg();
const RenderBuffer& rb = gsg->get_render_buffer(RenderBuffer::T_front);
p.set_xsize(win->get_width());
p.set_ysize(win->get_height());
p._image = PTA_uchar(win->get_width() * win->get_height() + 3);
// p.set_xsize(win->get_width());
// p.set_ysize(win->get_height());
// p._image = PTA_uchar(win->get_width() * win->get_height() * 3);
p.copy(g, g->get_current_display_region(), r);
CPT(DisplayRegion) dr = gsg->get_current_display_region();
nassertv(dr != (DisplayRegion *)NULL);
int width = dr->get_pixel_width();
int height = dr->get_pixel_height();
PixelBuffer p(width, height, 3, 1, PixelBuffer::T_unsigned_byte,
PixelBuffer::F_rgb);
p.copy(gsg, dr, rb);
p.write(name.c_str());
}