This commit is contained in:
Dave Schuyler 2002-03-16 03:04:08 +00:00
parent 87fe850e42
commit a9dc84babd
13 changed files with 4422 additions and 3 deletions

View File

@ -71,6 +71,14 @@
#define EXPTP_PANDAGL extern
#endif
#ifdef BUILDING_PANDACR
#define EXPCL_PANDACR __declspec(dllexport)
#define EXPTP_PANDACR
#else
#define EXPCL_PANDACR __declspec(dllimport)
#define EXPTP_PANDACR extern
#endif
#ifdef BUILDING_PANDAGLUT
#define EXPCL_PANDAGLUT __declspec(dllexport)
#define EXPTP_PANDAGLUT
@ -139,6 +147,9 @@
#define EXPCL_PANDAGL
#define EXPTP_PANDAGL
#define EXPCL_PANDACR
#define EXPTP_PANDACR
#define EXPCL_PANDAGLUT
#define EXPTP_PANDAGLUT

View File

@ -10,7 +10,7 @@
#if $[LINK_ALL_STATIC]
// If we're statically linking, we need to explicitly link with
// at least one graphics renderer.
#define LOCAL_LIBS pandagl pandadx $[LOCAL_LIBS]
#define LOCAL_LIBS pandacr pandagl pandadx $[LOCAL_LIBS]
// And we might like to have the egg loader available.
#define LOCAL_LIBS pandaegg $[LOCAL_LIBS]
@ -39,7 +39,7 @@
#define SOURCES \
open_window.cxx
#define LOCAL_LIBS $[LOCAL_LIBS] pandagl pandadx
#define LOCAL_LIBS $[LOCAL_LIBS] pandacr pandagl pandadx
#end test_bin_target
#if $[HAVE_DX]

View File

@ -31,7 +31,9 @@
#ifdef USE_GLX
#include "glxGraphicsPipe.h"
#else
#include "wglGraphicsPipe.h"
#include "wdxGraphicsPipe.h"
#include "wcrGraphicsPipe.h"
#endif
@ -70,7 +72,22 @@ main(int argc, char *argv[]) {
#ifdef USE_GLX
pipe = new glxGraphicsPipe(pipe_spec);
#else
pipe = new wdxGraphicsPipe(pipe_spec);
// Yes, this is a stupid hard coded switch, but this is a test app, and
// I'm just making it easier to see the choices (and switch between them).
switch (2) {
case 1:
// ...OpenGL pipe
pipe = new wglGraphicsPipe(pipe_spec);
break;
case 2:
// ...Chromium OpenGL pipe (cr == chromium)
pipe = new wcrGraphicsPipe(pipe_spec);
break;
default:
// ...DirectX pipe
pipe = new wdxGraphicsPipe(pipe_spec);
break;
}
#endif
// Now create a window on that pipe.

View File

@ -0,0 +1,36 @@
#define DIRECTORY_IF_WCR yes
#define DIRECTORY_IF_CHROMIUM yes
#define OTHER_LIBS interrogatedb:c dconfig:c dtoolconfig:m \
dtoolutil:c dtoolbase:c dtool:m
#define WIN_SYS_LIBS Imm32.lib
#define USE_CHROMIUM yes
#begin lib_target
#define TARGET wcrdisplay
#define LOCAL_LIBS \
crgsg display putil
#define COMBINED_SOURCES $[TARGET]_composite1.cxx
#define INSTALL_HEADERS \
config_wcrdisplay.h wcrGraphicsPipe.h wcrGraphicsWindow.h
#define SOURCES \
wcrGraphicsWindow.cxx wcrext.h $[INSTALL_HEADERS]
#define INCLUDED_SOURCES \
config_wcrdisplay.cxx wcrGraphicsPipe.cxx
#end lib_target
#begin test_bin_target
#define TARGET test_wcr
#define LOCAL_LIBS \
putil graph display mathutil gobj sgraph wcrdisplay crgsg
#define SOURCES \
test_wcr.cxx
#end test_bin_target

View File

@ -0,0 +1,93 @@
// Filename: config_wcrdisplay.cxx
// Created by: skyler, based on wgl* file.
//
////////////////////////////////////////////////////////////////////
//
// 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 .
//
////////////////////////////////////////////////////////////////////
#include "config_wcrdisplay.h"
#include "wcrGraphicsPipe.h"
#include "wcrGraphicsWindow.h"
#include <dconfig.h>
Configure(config_wcrdisplay);
NotifyCategoryDef(wcrdisplay, "display");
ConfigureFn(config_wcrdisplay) {
init_libwcrdisplay();
}
// Configure this true to force the rendering to sync to the video
// refresh, or false to let your frame rate go as high as it can,
// irrespective of the video refresh. (if this capability is available in the ICD)
bool gl_sync_video = config_wcrdisplay.GetBool("sync-video", true);
bool gl_show_fps_meter = config_wcrdisplay.GetBool("show-fps-meter", false);
float gl_fps_meter_update_interval = max(0.5,config_wcrdisplay.GetFloat("fps-meter-update-interval", 1.7));
int gl_forced_pixfmt=config_wcrdisplay.GetInt("gl-force-pixfmt", 0);
bool bResponsive_minimized_fullscreen_window = config_wcrdisplay.GetBool("responsive-minimized-fullscreen-window",false);
// Set this true to not attempt to use any of the function calls that
// will crab out WireGL.
bool support_wiregl = config_wcrdisplay.GetBool("support-wiregl", false);
extern void AtExitFn();
////////////////////////////////////////////////////////////////////
// Function: init_libwcrdisplay
// Description: Initializes the library. This must be called at
// least once before any of the functions or classes in
// this library can be used. Normally it will be
// called by the static initializers and need not be
// called explicitly, but special cases exist.
////////////////////////////////////////////////////////////////////
void
init_libwcrdisplay() {
static bool initialized = false;
if (initialized) {
return;
}
initialized = true;
wcrGraphicsPipe::init_type();
GraphicsPipe::get_factory().register_factory(
wcrGraphicsPipe::get_class_type(),
wcrGraphicsPipe::make_wcrGraphicsPipe);
wcrGraphicsWindow::init_type();
GraphicsWindow::get_factory().register_factory(
wcrGraphicsWindow::get_class_type(),
wcrGraphicsWindow::make_wcrGraphicsWindow);
atexit(AtExitFn);
set_global_parameters();
}
// cant use global var cleanly because global var static init executed after init_libwcr(), incorrectly reiniting var
Filename get_icon_filename_2() {
string iconname = config_wcrdisplay.GetString("win32-window-icon","");
return ExecutionEnvironment::expand_string(iconname);
}
Filename get_color_cursor_filename_2() {
string cursorname = config_wcrdisplay.GetString("win32-color-cursor","");
return ExecutionEnvironment::expand_string(cursorname);
}
Filename get_mono_cursor_filename_2() {
string cursorname = config_wcrdisplay.GetString("win32-mono-cursor","");
return ExecutionEnvironment::expand_string(cursorname);
}

View File

@ -0,0 +1,43 @@
// Filename: config_wcrdisplay.h
// Created by: skyler, based on wgl* file.
//
////////////////////////////////////////////////////////////////////
//
// 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 __CONFIG_WCRDISPLAY_H__
#define __CONFIG_WCRDISPLAY_H__
#include <pandabase.h>
#include <filename.h>
#include <notifyCategoryProxy.h>
NotifyCategoryDecl(wcrdisplay, EXPCL_PANDACR, EXPTP_PANDACR);
// for some reason there is a conflict with the pandadx versions of get_icon_filename during linking,
// so appended '_2' to name
extern Filename get_icon_filename_2();
extern Filename get_color_cursor_filename_2();
extern Filename get_mono_cursor_filename_2();
extern bool gl_show_fps_meter;
extern float gl_fps_meter_update_interval;
extern bool gl_sync_video;
extern int gl_forced_pixfmt;
extern bool bResponsive_minimized_fullscreen_window;
extern bool support_wiregl;
extern EXPCL_PANDACR void init_libwcrdisplay();
#endif /* __CONFIG_WCRDISPLAY_H__ */

View File

@ -0,0 +1,82 @@
// Filename: wcrGraphicsPipe.cxx
// Created by: skyler, based on wgl* file.
//
////////////////////////////////////////////////////////////////////
//
// 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 .
//
////////////////////////////////////////////////////////////////////
#include "wcrGraphicsPipe.h"
#include "config_wcrdisplay.h"
////////////////////////////////////////////////////////////////////
// Static variables
////////////////////////////////////////////////////////////////////
TypeHandle wcrGraphicsPipe::_type_handle;
wcrGraphicsPipe::wcrGraphicsPipe(const PipeSpecifier& spec)
: InteractiveGraphicsPipe(spec)
{}
////////////////////////////////////////////////////////////////////
// Function: wcrGraphicsPipe::get_window_type
// Access: Public, Virtual
// Description: Returns the TypeHandle of the kind of window
// preferred by this kind of pipe.
////////////////////////////////////////////////////////////////////
TypeHandle wcrGraphicsPipe::
get_window_type() const {
return wcrGraphicsWindow::get_class_type();
}
GraphicsPipe *wcrGraphicsPipe::
make_wcrGraphicsPipe(const FactoryParams &params) {
GraphicsPipe::PipeSpec *pipe_param;
if (!get_param_into(pipe_param, params)) {
return new wcrGraphicsPipe(PipeSpecifier());
} else {
return new wcrGraphicsPipe(pipe_param->get_specifier());
}
}
TypeHandle wcrGraphicsPipe::get_class_type() {
return _type_handle;
}
const char *pipe_type_name="wcrGraphicsPipe";
void wcrGraphicsPipe::init_type() {
InteractiveGraphicsPipe::init_type();
register_type(_type_handle, pipe_type_name,
InteractiveGraphicsPipe::get_class_type());
}
TypeHandle wcrGraphicsPipe::get_type() const {
return get_class_type();
}
wcrGraphicsPipe::wcrGraphicsPipe() {
wcrdisplay_cat.error()
<< pipe_type_name <<"s should not be created with the default constructor" << endl;
}
wcrGraphicsPipe::wcrGraphicsPipe(const wcrGraphicsPipe&) {
wcrdisplay_cat.error()
<< pipe_type_name << "s should not be copied" << endl;
}
wcrGraphicsPipe& wcrGraphicsPipe::operator=(const wcrGraphicsPipe&) {
wcrdisplay_cat.error()
<< pipe_type_name << "s should not be assigned" << endl;
return *this;
}

View File

@ -0,0 +1,63 @@
// Filename: wcrGraphicsPipe.h
// Created by: skyler, based on wgl* file.
//
////////////////////////////////////////////////////////////////////
//
// 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 WCRGRAPHICSPIPE_H
#define WCRGRAPHICSPIPE_H
//
////////////////////////////////////////////////////////////////////
// Includes
////////////////////////////////////////////////////////////////////
#include <pandabase.h>
#include <string>
#include <interactiveGraphicsPipe.h>
#include "wcrGraphicsWindow.h"
#define WINDOWS_LEAN_AND_MEAN
#include <windows.h>
#undef WINDOWS_LEAN_AND_MEAN
////////////////////////////////////////////////////////////////////
// Class : wcrGraphicsPipe
// Description :
////////////////////////////////////////////////////////////////////
class EXPCL_PANDACR wcrGraphicsPipe : public InteractiveGraphicsPipe {
public:
wcrGraphicsPipe(const PipeSpecifier&);
virtual TypeHandle get_window_type() const;
public:
static GraphicsPipe* make_wcrGraphicsPipe(const FactoryParams &params);
static TypeHandle get_class_type();
static void init_type();
virtual TypeHandle get_type() const;
virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
private:
static TypeHandle _type_handle;
protected:
wcrGraphicsPipe();
wcrGraphicsPipe(const wcrGraphicsPipe&);
wcrGraphicsPipe& operator=(const wcrGraphicsPipe&);
};
#endif

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,150 @@
// Filename: wcrGraphicsWindow.h
// Created by: skyler, based on wgl* file.
//
////////////////////////////////////////////////////////////////////
//
// 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 WCRGRAPHICSWINDOW_H
#define WCRGRAPHICSWINDOW_H
//
////////////////////////////////////////////////////////////////////
// Includes
////////////////////////////////////////////////////////////////////
#include <pandabase.h>
#include <graphicsWindow.h>
#define WINDOWS_LEAN_AND_MEAN
#include <windows.h>
#undef WINDOWS_LEAN_AND_MEAN
////////////////////////////////////////////////////////////////////
// Defines
////////////////////////////////////////////////////////////////////
class wcrGraphicsPipe;
////////////////////////////////////////////////////////////////////
// Class : wcrGraphicsWindow
// Description :
////////////////////////////////////////////////////////////////////
class EXPCL_PANDACR wcrGraphicsWindow : public GraphicsWindow {
public:
wcrGraphicsWindow(GraphicsPipe* pipe);
wcrGraphicsWindow(GraphicsPipe* pipe,
const GraphicsWindow::Properties& props);
virtual ~wcrGraphicsWindow();
virtual bool supports_update() const;
virtual void update();
virtual void end_frame();
virtual void swap();
virtual int get_depth_bitwidth();
virtual TypeHandle get_gsg_type() const;
static GraphicsWindow* make_wcrGraphicsWindow(const FactoryParams &params);
public:
virtual void make_current();
virtual void unmake_current();
INLINE bool mouse_entry_enabled() { return _mouse_entry_enabled; }
INLINE bool mouse_motion_enabled() { return _mouse_motion_enabled; }
INLINE bool mouse_passive_motion_enabled() {
return _mouse_passive_motion_enabled;
}
// void handle_reshape(int w, int h);
void handle_mouse_motion(int x, int y);
void handle_mouse_entry(int state);
void handle_keypress(ButtonHandle key, int x, int y);
void handle_keyrelease(ButtonHandle key);
protected:
// PIXELFORMATDESCRIPTOR* try_for_visual(wcrGraphicsPipe *pipe,
// int mask, int want_depth_bits = 1, int want_color_bits = 1);
// static void get_config(PIXELFORMATDESCRIPTOR* visual, int attrib, int *value);
int choose_visual();
virtual void config();
void setup_colormap();
void enable_mouse_input(bool val);
void enable_mouse_motion(bool val);
void enable_mouse_passive_motion(bool val);
void enable_mouse_entry(bool val);
void handle_reshape();
void process_events();
public:
HWND _mwindow;
private:
// TODO:skyler HGLRC _context;
int _context;
HDC _hdc;
PIXELFORMATDESCRIPTOR _pixelformat;
HPALETTE _colormap;
HCURSOR _hMouseCursor;
HWND _hOldForegroundWindow;
UINT_PTR _PandaPausedTimer;
DEVMODE *_pCurrent_display_settings;
bool _bIsLowVidMemCard;
bool _bLoadedCustomCursor;
bool _window_inactive;
bool _active_minimized_fullscreen;
bool _return_control_to_app;
bool _exiting_window;
bool _mouse_input_enabled;
bool _mouse_motion_enabled;
bool _mouse_passive_motion_enabled;
bool _mouse_entry_enabled;
bool _ime_open;
// vars for frames/sec meter
DWORD _start_time;
DWORD _start_frame_count;
DWORD _cur_frame_count;
float _current_fps;
string _extensions_str;
public:
static TypeHandle get_class_type();
static void init_type();
virtual TypeHandle get_type() const;
virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
LONG WINAPI window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);
ButtonHandle lookup_key(WPARAM wparam) const;
void DestroyMe(bool bAtExitFnCalled);
virtual void deactivate_window();
virtual void reactivate_window();
virtual void resize(unsigned int xsize,unsigned int ysize);
virtual unsigned int verify_window_sizes(unsigned int numsizes,unsigned int *dimen);
protected:
virtual void do_close_window();
void check_for_color_cursor_support();
private:
static TypeHandle _type_handle;
};
extern void set_global_parameters();
extern void restore_global_parameters();
#endif

View File

@ -0,0 +1,3 @@
#include"config_wcrdisplay.cxx"
#include"wcrGraphicsPipe.cxx"

View File

@ -0,0 +1,401 @@
#ifndef __wcrext_h_
#define __wcrext_h_
#ifdef __cplusplus
extern "C" {
#endif
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
** Software License B, Version 1.1 (the "License"), the contents of this
** file are subject only to the provisions of the License. You may not use
** this file except in compliance with the License. You may obtain a copy
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
**
** http://oss.sgi.com/projects/FreeB
**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
**
** Additional Notice Provisions: This software was created using the
** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
** not been independently verified as being compliant with the OpenGL(R)
** version 1.2.1 Specification.
*/
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__)
#define WIN32_LEAN_AND_MEAN 1
#include <windows.h>
#endif
#ifndef APIENTRY
#define APIENTRY
#endif
/*************************************************************/
/* Header file version number */
#define WCR_WCREXT_VERSION 1
#ifndef WCR_ARB_buffer_region
#define WCR_FRONT_COLOR_BUFFER_BIT_ARB 0x00000001
#define WCR_BACK_COLOR_BUFFER_BIT_ARB 0x00000002
#define WCR_DEPTH_BUFFER_BIT_ARB 0x00000004
#define WCR_STENCIL_BUFFER_BIT_ARB 0x00000008
#endif
#ifndef WCR_ARB_extensions_string
#endif
#ifndef WCR_ARB_pixel_format
#define WCR_NUMBER_PIXEL_FORMATS_ARB 0x2000
#define WCR_DRAW_TO_WINDOW_ARB 0x2001
#define WCR_DRAW_TO_BITMAP_ARB 0x2002
#define WCR_ACCELERATION_ARB 0x2003
#define WCR_NEED_PALETTE_ARB 0x2004
#define WCR_NEED_SYSTEM_PALETTE_ARB 0x2005
#define WCR_SWAP_LAYER_BUFFERS_ARB 0x2006
#define WCR_SWAP_METHOD_ARB 0x2007
#define WCR_NUMBER_OVERLAYS_ARB 0x2008
#define WCR_NUMBER_UNDERLAYS_ARB 0x2009
#define WCR_TRANSPARENT_ARB 0x200A
#define WCR_TRANSPARENT_RED_VALUE_ARB 0x2037
#define WCR_TRANSPARENT_GREEN_VALUE_ARB 0x2038
#define WCR_TRANSPARENT_BLUE_VALUE_ARB 0x2039
#define WCR_TRANSPARENT_ALPHA_VALUE_ARB 0x203A
#define WCR_TRANSPARENT_INDEX_VALUE_ARB 0x203B
#define WCR_SHARE_DEPTH_ARB 0x200C
#define WCR_SHARE_STENCIL_ARB 0x200D
#define WCR_SHARE_ACCUM_ARB 0x200E
#define WCR_SUPPORT_GDI_ARB 0x200F
#define WCR_SUPPORT_OPENGL_ARB 0x2010
#define WCR_DOUBLE_BUFFER_ARB 0x2011
#define WCR_STEREO_ARB 0x2012
#define WCR_PIXEL_TYPE_ARB 0x2013
#define WCR_COLOR_BITS_ARB 0x2014
#define WCR_RED_BITS_ARB 0x2015
#define WCR_RED_SHIFT_ARB 0x2016
#define WCR_GREEN_BITS_ARB 0x2017
#define WCR_GREEN_SHIFT_ARB 0x2018
#define WCR_BLUE_BITS_ARB 0x2019
#define WCR_BLUE_SHIFT_ARB 0x201A
#define WCR_ALPHA_BITS_ARB 0x201B
#define WCR_ALPHA_SHIFT_ARB 0x201C
#define WCR_ACCUM_BITS_ARB 0x201D
#define WCR_ACCUM_RED_BITS_ARB 0x201E
#define WCR_ACCUM_GREEN_BITS_ARB 0x201F
#define WCR_ACCUM_BLUE_BITS_ARB 0x2020
#define WCR_ACCUM_ALPHA_BITS_ARB 0x2021
#define WCR_DEPTH_BITS_ARB 0x2022
#define WCR_STENCIL_BITS_ARB 0x2023
#define WCR_AUX_BUFFERS_ARB 0x2024
#define WCR_NO_ACCELERATION_ARB 0x2025
#define WCR_GENERIC_ACCELERATION_ARB 0x2026
#define WCR_FULL_ACCELERATION_ARB 0x2027
#define WCR_SWAP_EXCHANGE_ARB 0x2028
#define WCR_SWAP_COPY_ARB 0x2029
#define WCR_SWAP_UNDEFINED_ARB 0x202A
#define WCR_TYPE_RGBA_ARB 0x202B
#define WCR_TYPE_COLORINDEX_ARB 0x202C
#endif
#ifndef WCR_ARB_make_current_read
#define ERROR_INVALID_PIXEL_TYPE_ARB 0x2043
#define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054
#endif
#ifndef WCR_ARB_pbuffer
#define WCR_DRAW_TO_PBUFFER_ARB 0x202D
#define WCR_MAX_PBUFFER_PIXELS_ARB 0x202E
#define WCR_MAX_PBUFFER_WIDTH_ARB 0x202F
#define WCR_MAX_PBUFFER_HEIGHT_ARB 0x2030
#define WCR_PBUFFER_LARGEST_ARB 0x2033
#define WCR_PBUFFER_WIDTH_ARB 0x2034
#define WCR_PBUFFER_HEIGHT_ARB 0x2035
#define WCR_PBUFFER_LOST_ARB 0x2036
#endif
#ifndef WCR_EXT_make_current_read
#define ERROR_INVALID_PIXEL_TYPE_EXT 0x2043
#endif
#ifndef WCR_EXT_pixel_format
#define WCR_NUMBER_PIXEL_FORMATS_EXT 0x2000
#define WCR_DRAW_TO_WINDOW_EXT 0x2001
#define WCR_DRAW_TO_BITMAP_EXT 0x2002
#define WCR_ACCELERATION_EXT 0x2003
#define WCR_NEED_PALETTE_EXT 0x2004
#define WCR_NEED_SYSTEM_PALETTE_EXT 0x2005
#define WCR_SWAP_LAYER_BUFFERS_EXT 0x2006
#define WCR_SWAP_METHOD_EXT 0x2007
#define WCR_NUMBER_OVERLAYS_EXT 0x2008
#define WCR_NUMBER_UNDERLAYS_EXT 0x2009
#define WCR_TRANSPARENT_EXT 0x200A
#define WCR_TRANSPARENT_VALUE_EXT 0x200B
#define WCR_SHARE_DEPTH_EXT 0x200C
#define WCR_SHARE_STENCIL_EXT 0x200D
#define WCR_SHARE_ACCUM_EXT 0x200E
#define WCR_SUPPORT_GDI_EXT 0x200F
#define WCR_SUPPORT_OPENGL_EXT 0x2010
#define WCR_DOUBLE_BUFFER_EXT 0x2011
#define WCR_STEREO_EXT 0x2012
#define WCR_PIXEL_TYPE_EXT 0x2013
#define WCR_COLOR_BITS_EXT 0x2014
#define WCR_RED_BITS_EXT 0x2015
#define WCR_RED_SHIFT_EXT 0x2016
#define WCR_GREEN_BITS_EXT 0x2017
#define WCR_GREEN_SHIFT_EXT 0x2018
#define WCR_BLUE_BITS_EXT 0x2019
#define WCR_BLUE_SHIFT_EXT 0x201A
#define WCR_ALPHA_BITS_EXT 0x201B
#define WCR_ALPHA_SHIFT_EXT 0x201C
#define WCR_ACCUM_BITS_EXT 0x201D
#define WCR_ACCUM_RED_BITS_EXT 0x201E
#define WCR_ACCUM_GREEN_BITS_EXT 0x201F
#define WCR_ACCUM_BLUE_BITS_EXT 0x2020
#define WCR_ACCUM_ALPHA_BITS_EXT 0x2021
#define WCR_DEPTH_BITS_EXT 0x2022
#define WCR_STENCIL_BITS_EXT 0x2023
#define WCR_AUX_BUFFERS_EXT 0x2024
#define WCR_NO_ACCELERATION_EXT 0x2025
#define WCR_GENERIC_ACCELERATION_EXT 0x2026
#define WCR_FULL_ACCELERATION_EXT 0x2027
#define WCR_SWAP_EXCHANGE_EXT 0x2028
#define WCR_SWAP_COPY_EXT 0x2029
#define WCR_SWAP_UNDEFINED_EXT 0x202A
#define WCR_TYPE_RGBA_EXT 0x202B
#define WCR_TYPE_COLORINDEX_EXT 0x202C
#endif
#ifndef WCR_EXT_pbuffer
#define WCR_DRAW_TO_PBUFFER_EXT 0x202D
#define WCR_MAX_PBUFFER_PIXELS_EXT 0x202E
#define WCR_MAX_PBUFFER_WIDTH_EXT 0x202F
#define WCR_MAX_PBUFFER_HEIGHT_EXT 0x2030
#define WCR_OPTIMAL_PBUFFER_WIDTH_EXT 0x2031
#define WCR_OPTIMAL_PBUFFER_HEIGHT_EXT 0x2032
#define WCR_PBUFFER_LARGEST_EXT 0x2033
#define WCR_PBUFFER_WIDTH_EXT 0x2034
#define WCR_PBUFFER_HEIGHT_EXT 0x2035
#endif
#ifndef WCR_EXT_depth_float
#define WCR_DEPTH_FLOAT_EXT 0x2040
#endif
#ifndef WCR_3DFX_multisample
#define WCR_SAMPLE_BUFFERS_3DFX 0x2060
#define WCR_SAMPLES_3DFX 0x2061
#endif
#ifndef WCR_EXT_multisample
#define WCR_SAMPLE_BUFFERS_EXT 0x2041
#define WCR_SAMPLES_EXT 0x2042
#endif
#ifndef WCR_I3D_unknown_genlock_extension_name
#define WCR_GENLOCK_SOURCE_MULTIVIEW_I3D 0x2044
#define WCR_GENLOCK_SOURCE_EXTENAL_SYNC_I3D 0x2045
#define WCR_GENLOCK_SOURCE_EXTENAL_FIELD_I3D 0x2046
#define WCR_GENLOCK_SOURCE_EXTENAL_TTL_I3D 0x2047
#define WCR_GENLOCK_SOURCE_DIGITAL_SYNC_I3D 0x2048
#define WCR_GENLOCK_SOURCE_DIGITAL_FIELD_I3D 0x2049
#define WCR_GENLOCK_SOURCE_EDGE_FALLING_I3D 0x204A
#define WCR_GENLOCK_SOURCE_EDGE_RISING_I3D 0x204B
#define WCR_GENLOCK_SOURCE_EDGE_BOTH_I3D 0x204C
#endif
#ifndef WCR_I3D_unknown_gamma_extension_name
#define WCR_GAMMA_TABLE_SIZE_I3D 0x204E
#define WCR_GAMMA_EXCLUDE_DESKTOP_I3D 0x204F
#endif
#ifndef WCR_I3D_unknown_digital_video_cursor_extension_name
#define WCR_DIGITAL_VIDEO_CURSOR_ALPHA_FRAMEBUFFER_I3D 0x2050
#define WCR_DIGITAL_VIDEO_CURSOR_ALPHA_VALUE_I3D 0x2051
#define WCR_DIGITAL_VIDEO_CURSOR_INCLUDED_I3D 0x2052
#define WCR_DIGITAL_VIDEO_GAMMA_CORRECTED_I3D 0x2053
#endif
/*************************************************************/
#ifndef WCR_ARB_pbuffer
DECLARE_HANDLE(HPBUFFERARB);
#endif
#ifndef WCR_EXT_pbuffer
DECLARE_HANDLE(HPBUFFEREXT);
#endif
#ifndef WCR_ARB_buffer_region
#define WCR_ARB_buffer_region 1
#ifdef WCR_WCREXT_PROTOTYPES
extern HANDLE WINAPI wcrCreateBufferRegionARB (HDC, int, UINT);
extern VOID WINAPI wcrDeleteBufferRegionARB (HANDLE);
extern BOOL WINAPI wcrSaveBufferRegionARB (HANDLE, int, int, int, int);
extern BOOL WINAPI wcrRestoreBufferRegionARB (HANDLE, int, int, int, int, int, int);
#endif /* WCR_WCREXT_PROTOTYPES */
typedef HANDLE (WINAPI * PFNWCRCREATEBUFFERREGIONARBPROC) (HDC hDC, int iLayerPlane, UINT uType);
typedef VOID (WINAPI * PFNWCRDELETEBUFFERREGIONARBPROC) (HANDLE hRegion);
typedef BOOL (WINAPI * PFNWCRSAVEBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height);
typedef BOOL (WINAPI * PFNWCRRESTOREBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc);
#endif
#ifndef WCR_ARB_extensions_string
#define WCR_ARB_extensions_string 1
#ifdef WCR_WCREXT_PROTOTYPES
extern const char * WINAPI wcrGetExtensionsStringARB (HDC);
#endif /* WCR_WCREXT_PROTOTYPES */
typedef const char * (WINAPI * PFNWCRGETEXTENSIONSSTRINGARBPROC) (HDC hdc);
#endif
#ifndef WCR_ARB_pixel_format
#define WCR_ARB_pixel_format 1
#ifdef WCR_WCREXT_PROTOTYPES
extern BOOL WINAPI wcrGetPixelFormatAttribivARB (HDC, int, int, UINT, const int *, int *);
extern BOOL WINAPI wcrGetPixelFormatAttribfvARB (HDC, int, int, UINT, const int *, FLOAT *);
extern BOOL WINAPI wcrChoosePixelFormatARB (HDC, const int *, const FLOAT *, UINT, int *, UINT *);
#endif /* WCR_WCREXT_PROTOTYPES */
typedef BOOL (WINAPI * PFNWCRGETPIXELFORMATATTRIBIVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues);
typedef BOOL (WINAPI * PFNWCRGETPIXELFORMATATTRIBFVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues);
typedef BOOL (WINAPI * PFNWCRCHOOSEPIXELFORMATARBPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
#endif
#ifndef WCR_ARB_make_current_read
#define WCR_ARB_make_current_read 1
#ifdef WCR_WCREXT_PROTOTYPES
extern BOOL WINAPI wcrMakeContextCurrentARB (HDC, HDC, HGLRC);
extern HDC WINAPI wcrGetCurrentReadDCARB ();
#endif /* WCR_WCREXT_PROTOTYPES */
typedef BOOL (WINAPI * PFNWCRMAKECONTEXTCURRENTARBPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
typedef HDC (WINAPI * PFNWCRGETCURRENTREADDCARBPROC) ();
#endif
#ifndef WCR_ARB_pbuffer
#define WCR_ARB_pbuffer 1
#ifdef WCR_WCREXT_PROTOTYPES
extern HPBUFFERARB WINAPI wcrCreatePbufferARB (HDC, int, int, int, const int *);
extern HDC WINAPI wcrGetPbufferDCARB (HPBUFFERARB);
extern int WINAPI wcrReleasePbufferDCARB (HPBUFFERARB, HDC);
extern BOOL WINAPI wcrDestroyPbufferARB (HPBUFFERARB);
extern BOOL WINAPI wcrQueryPbufferARB (HPBUFFERARB, int, int *);
#endif /* WCR_WCREXT_PROTOTYPES */
typedef HPBUFFERARB (WINAPI * PFNWCRCREATEPBUFFERARBPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
typedef HDC (WINAPI * PFNWCRGETPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer);
typedef int (WINAPI * PFNWCRRELEASEPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer, HDC hDC);
typedef BOOL (WINAPI * PFNWCRDESTROYPBUFFERARBPROC) (HPBUFFERARB hPbuffer);
typedef BOOL (WINAPI * PFNWCRQUERYPBUFFERARBPROC) (HPBUFFERARB hPbuffer, int iAttribute, int *piValue);
#endif
#ifndef WCR_EXT_display_color_table
#define WCR_EXT_display_color_table 1
#ifdef WCR_WCREXT_PROTOTYPES
extern GLboolean WINAPI wcrCreateDisplayColorTableEXT (GLushort);
extern GLboolean WINAPI wcrLoadDisplayColorTableEXT (const GLushort *, GLuint);
extern GLboolean WINAPI wcrBindDisplayColorTableEXT (GLushort);
extern VOID WINAPI wcrDestroyDisplayColorTableEXT (GLushort);
#endif /* WCR_WCREXT_PROTOTYPES */
typedef GLboolean (WINAPI * PFNWCRCREATEDISPLAYCOLORTABLEEXTPROC) (GLushort id);
typedef GLboolean (WINAPI * PFNWCRLOADDISPLAYCOLORTABLEEXTPROC) (const GLushort *table, GLuint length);
typedef GLboolean (WINAPI * PFNWCRBINDDISPLAYCOLORTABLEEXTPROC) (GLushort id);
typedef VOID (WINAPI * PFNWCRDESTROYDISPLAYCOLORTABLEEXTPROC) (GLushort id);
#endif
#ifndef WCR_EXT_extensions_string
#define WCR_EXT_extensions_string 1
#ifdef WCR_WCREXT_PROTOTYPES
extern const char * WINAPI wcrGetExtensionsStringEXT ();
#endif /* WCR_WCREXT_PROTOTYPES */
typedef const char * (WINAPI * PFNWCRGETEXTENSIONSSTRINGEXTPROC) ();
#endif
#ifndef WCR_EXT_make_current_read
#define WCR_EXT_make_current_read 1
#ifdef WCR_WCREXT_PROTOTYPES
extern BOOL WINAPI wcrMakeContextCurrentEXT (HDC, HDC, HGLRC);
extern HDC WINAPI wcrGetCurrentReadDCEXT ();
#endif /* WCR_WCREXT_PROTOTYPES */
typedef BOOL (WINAPI * PFNWCRMAKECONTEXTCURRENTEXTPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
typedef HDC (WINAPI * PFNWCRGETCURRENTREADDCEXTPROC) ();
#endif
#ifndef WCR_EXT_pbuffer
#define WCR_EXT_pbuffer 1
#ifdef WCR_WCREXT_PROTOTYPES
extern HPBUFFEREXT WINAPI wcrCreatePbufferEXT (HDC, int, int, int, const int *);
extern HDC WINAPI wcrGetPbufferDCEXT (HPBUFFEREXT);
extern int WINAPI wcrReleasePbufferDCEXT (HPBUFFEREXT, HDC);
extern BOOL WINAPI wcrDestroyPbufferEXT (HPBUFFEREXT);
extern BOOL WINAPI wcrQueryPbufferEXT (HPBUFFEREXT, int, int *);
#endif /* WCR_WCREXT_PROTOTYPES */
typedef HPBUFFEREXT (WINAPI * PFNWCRCREATEPBUFFEREXTPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
typedef HDC (WINAPI * PFNWCRGETPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer);
typedef int (WINAPI * PFNWCRRELEASEPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer, HDC hDC);
typedef BOOL (WINAPI * PFNWCRDESTROYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer);
typedef BOOL (WINAPI * PFNWCRQUERYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer, int iAttribute, int *piValue);
#endif
#ifndef WCR_EXT_pixel_format
#define WCR_EXT_pixel_format 1
#ifdef WCR_WCREXT_PROTOTYPES
extern BOOL WINAPI wcrGetPixelFormatAttribivEXT (HDC, int, int, UINT, int *, int *);
extern BOOL WINAPI wcrGetPixelFormatAttribfvEXT (HDC, int, int, UINT, int *, FLOAT *);
extern BOOL WINAPI wcrChoosePixelFormatEXT (HDC, const int *, const FLOAT *, UINT, int *, UINT *);
#endif /* WCR_WCREXT_PROTOTYPES */
typedef BOOL (WINAPI * PFNWCRGETPIXELFORMATATTRIBIVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, int *piValues);
typedef BOOL (WINAPI * PFNWCRGETPIXELFORMATATTRIBFVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, FLOAT *pfValues);
typedef BOOL (WINAPI * PFNWCRCHOOSEPIXELFORMATEXTPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
#endif
#ifndef WCR_EXT_swap_control
#define WCR_EXT_swap_control 1
#ifdef WCR_WCREXT_PROTOTYPES
extern BOOL WINAPI wcrSwapIntervalEXT (int);
extern int WINAPI wcrGetSwapIntervalEXT ();
#endif /* WCR_WCREXT_PROTOTYPES */
typedef BOOL (WINAPI * PFNWCRSWAPINTERVALEXTPROC) (int interval);
typedef int (WINAPI * PFNWCRGETSWAPINTERVALEXTPROC) ();
#endif
#ifndef WCR_WCR_EXT_depth_float
#define WCR_WCR_EXT_depth_float 1
#endif
#ifndef WCR_WCR_3DFX_multisample
#define WCR_WCR_3DFX_multisample 1
#endif
#ifndef WCR_WCR_EXT_multisample
#define WCR_WCR_EXT_multisample 1
#endif
/* added by Cass -- but this should already be in here! */
#ifndef WCR_NV_allocate_memory
#define WCR_NV_allocate_memory 1
#ifdef WCR_WCREXT_PROTOTYPES
extern void * wcrAllocateMemoryNV(int size, float readfreq, float writefreq, float priority);
extern void wcrFreeMemoryNV(void * pointer);
#endif
typedef void * (APIENTRY * PFNWCRALLOCATEMEMORYNVPROC) (int size, float readfreq, float writefreq, float priority);
typedef void (APIENTRY * PFNWCRFREEMEMORYNVPROC) (void *pointer);
#endif
#ifdef __cplusplus
}
#endif
#endif

View File

@ -7,6 +7,7 @@
dtoolutil:c dtoolbase:c dtool:m
#define WIN_SYS_LIBS Imm32.lib
#begin lib_target
#define TARGET wgldisplay
#define LOCAL_LIBS \