background color

This commit is contained in:
David Rose 2002-07-11 22:14:03 +00:00
parent 539ca403c3
commit 5c0913c1ca
5 changed files with 11 additions and 1529 deletions

View File

@ -29,3 +29,8 @@ ConfigureFn(config_framework) {
const int win_width = config_framework.GetInt("win-width", 640);
const int win_height = config_framework.GetInt("win-height", 480);
const bool fullscreen = config_framework.GetBool("fullscreen", false);
// The default window background color.
const float background_r = config_framework.GetFloat("background-r", 0.41);
const float background_g = config_framework.GetFloat("background-g", 0.41);
const float background_b = config_framework.GetFloat("background-b", 0.41);

View File

@ -29,4 +29,8 @@ extern const int win_width;
extern const int win_height;
extern const bool fullscreen;
extern const float background_r;
extern const float background_g;
extern const float background_b;
#endif

File diff suppressed because it is too large Load Diff

View File

@ -1,56 +0,0 @@
// Filename: framework.h
// Created by: drose (04May00)
//
////////////////////////////////////////////////////////////////////
//
// PANDA 3D SOFTWARE
// Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved
//
// All use of this software is subject to the terms of the Panda 3d
// Software license. You should have received a copy of this license
// along with this source code; you will also find a current copy of
// the license at http://www.panda3d.org/license.txt .
//
// To contact the maintainers of this program write to
// panda3d@yahoogroups.com .
//
////////////////////////////////////////////////////////////////////
#ifndef FRAMEWORK_H
#define FRAMEWORK_H
#include <pandabase.h>
#include <event.h>
#include <eventHandler.h>
#include <namedNode.h>
#include <directionalLight.h>
#include <mouse.h>
#include <trackball.h>
#include <pointerTo.h>
#include <pt_NamedNode.h>
#include <loader.h>
#include <mouseWatcher.h>
#include <chancfg.h>
extern EventHandler event_handler;
extern PT_NamedNode lights;
extern PT_NamedNode root;
extern PT_NamedNode data_root;
extern PT_NamedNode render;
extern PT_NamedNode cameras;
extern PT(MouseAndKeyboard) mak;
extern PT(MouseWatcher) mouse_watcher;
extern PT(Trackball) trackball;
extern PT(GraphicsWindow) main_win;
extern PT(DirectionalLight) dlight;
extern bool have_dlight;
extern Loader loader;
extern void set_alt_trackball(Node*);
extern int framework_main(int argc, char *argv[]);
extern void (*define_keys)(EventHandler&);
extern void (*additional_idle)();
extern void (*extra_overrides_func)(ChanCfgOverrides&, std::string&);
#endif

View File

@ -83,6 +83,8 @@ open_window(const GraphicsWindow::Properties &props, GraphicsPipe *pipe) {
_window = pipe->make_window(props);
_window->set_clear_color(Colorf(background_r, background_g, background_b, 1.0f));
// Set up a 3-d camera for the window by default.
make_camera();
return _window;