mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
build on Irix
This commit is contained in:
parent
50682a4409
commit
361185e52e
@ -7,7 +7,7 @@
|
||||
//
|
||||
|
||||
// What additional flags should we pass to interrogate?
|
||||
#define -D__mips__ -D__MIPSEB__
|
||||
#define SYSTEM_IGATE_FLAGS -D__mips__ -D__MIPSEB__ -D_LANGUAGE_C_PLUS_PLUS -D_MIPS_SZINT=32 -D_MIPS_SZLONG=32 -D_MIPS_SZPTR=32
|
||||
|
||||
// Is the platform big-endian (like an SGI workstation) or
|
||||
// little-endian (like a PC)? Define this to the empty string to
|
||||
|
@ -40,6 +40,12 @@ using namespace std;
|
||||
// this maps to public.
|
||||
#define PUBLISHED __published
|
||||
|
||||
typedef int streamsize;
|
||||
typedef int ios_openmode;
|
||||
typedef int ios_fmtflags;
|
||||
typedef int ios_iostate;
|
||||
typedef int ios_seekdir;
|
||||
|
||||
#else // CPPPARSER
|
||||
|
||||
#ifdef HAVE_IOSTREAM
|
||||
@ -82,11 +88,13 @@ typedef int streamsize;
|
||||
#ifndef HAVE_IOS_TYPEDEFS
|
||||
typedef int ios_openmode;
|
||||
typedef int ios_fmtflags;
|
||||
typedef int ios_iostate;
|
||||
// Old iostream libraries used ios::seek_dir instead of ios::seekdir.
|
||||
typedef ios::seek_dir ios_seekdir;
|
||||
#else
|
||||
typedef ios::openmode ios_openmode;
|
||||
typedef ios::fmtflags ios_fmtflags;
|
||||
typedef ios::iostate ios_iostate;
|
||||
typedef ios::seekdir ios_seekdir;
|
||||
#endif
|
||||
|
||||
|
@ -28,8 +28,7 @@
|
||||
#if $[LINK_IN_GL]
|
||||
#define BUILDING_DLL $[BUILDING_DLL] BUILDING_PANDAGL
|
||||
#define COMPONENT_LIBS $[COMPONENT_LIBS] \
|
||||
glgsg glxdisplay wgldisplay glutdisplay \
|
||||
sgidisplay sgiglxdisplay sgiglutdisplay
|
||||
glgsg glxdisplay wgldisplay glutdisplay
|
||||
#endif
|
||||
|
||||
#if $[LINK_IN_PHYSICS]
|
||||
|
@ -13,7 +13,6 @@
|
||||
// directly into Panda.
|
||||
#define COMPONENT_LIBS \
|
||||
glgsg glxdisplay \
|
||||
sgidisplay sgiglxdisplay \
|
||||
wgldisplay
|
||||
#endif
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "nodePath.h"
|
||||
#include "cullResult.h"
|
||||
#include "pointerTo.h"
|
||||
#include "mutex.h"
|
||||
#include "pmutex.h"
|
||||
|
||||
#include "plist.h"
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "graphicsLayer.h"
|
||||
#include "typedReferenceCount.h"
|
||||
#include "pointerTo.h"
|
||||
#include "mutex.h"
|
||||
#include "pmutex.h"
|
||||
#include "pvector.h"
|
||||
|
||||
class GraphicsChannel;
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "sceneSetup.h"
|
||||
#include "pointerTo.h"
|
||||
#include "thread.h"
|
||||
#include "mutex.h"
|
||||
#include "pmutex.h"
|
||||
#include "conditionVar.h"
|
||||
#include "pset.h"
|
||||
#include "pStatCollector.h"
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "displayRegion.h"
|
||||
#include "typedReferenceCount.h"
|
||||
#include "pointerTo.h"
|
||||
#include "mutex.h"
|
||||
#include "pmutex.h"
|
||||
#include "pvector.h"
|
||||
|
||||
class GraphicsChannel;
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
#include "typedReferenceCount.h"
|
||||
#include "pointerTo.h"
|
||||
#include "mutex.h"
|
||||
#include "pmutex.h"
|
||||
#include "pvector.h"
|
||||
|
||||
class HardwareChannel;
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "graphicsPipe.h"
|
||||
#include "pointerTo.h"
|
||||
#include "typeHandle.h"
|
||||
#include "mutex.h"
|
||||
#include "pmutex.h"
|
||||
|
||||
class HardwareChannel;
|
||||
class GraphicsWindow;
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include "buttonEvent.h"
|
||||
#include "iterator_types.h"
|
||||
#include "notify.h"
|
||||
#include "mutex.h"
|
||||
#include "pmutex.h"
|
||||
|
||||
#include "pvector.h"
|
||||
#include "pdeque.h"
|
||||
|
@ -43,7 +43,7 @@ IBioStream(BioPtr *source) : ISocketStream(&_buf) {
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE IBioStream &IBioStream::
|
||||
open(BioPtr *source) {
|
||||
clear((ios::iostate)0);
|
||||
clear((ios_iostate)0);
|
||||
_buf.open(source);
|
||||
return *this;
|
||||
}
|
||||
@ -86,7 +86,7 @@ OBioStream(BioPtr *source) : OSocketStream(&_buf) {
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE OBioStream &OBioStream::
|
||||
open(BioPtr *source) {
|
||||
clear((ios::iostate)0);
|
||||
clear((ios_iostate)0);
|
||||
_buf.open(source);
|
||||
return *this;
|
||||
}
|
||||
@ -129,7 +129,7 @@ BioStream(BioPtr *source) : SocketStream(&_buf) {
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE BioStream &BioStream::
|
||||
open(BioPtr *source) {
|
||||
clear((ios::iostate)0);
|
||||
clear((ios_iostate)0);
|
||||
_buf.open(source);
|
||||
return *this;
|
||||
}
|
||||
|
@ -18,6 +18,9 @@
|
||||
|
||||
#include "bioStream.h"
|
||||
|
||||
|
||||
#ifdef HAVE_SSL
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: IBioStream::is_closed
|
||||
// Access: Public, Virtual
|
||||
@ -67,3 +70,5 @@ is_closed() {
|
||||
clear();
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif // HAVE_SSL
|
||||
|
@ -43,7 +43,7 @@ IChunkedStream(BioStreamPtr *source, HTTPChannel *doc) : ISocketStream(&_buf) {
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE IChunkedStream &IChunkedStream::
|
||||
open(BioStreamPtr *source, HTTPChannel *doc) {
|
||||
clear((ios::iostate)0);
|
||||
clear((ios_iostate)0);
|
||||
_buf.open_read(source, doc);
|
||||
return *this;
|
||||
}
|
||||
|
@ -262,5 +262,4 @@ run() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -1785,7 +1785,7 @@ bool HTTPChannel::
|
||||
parse_http_response(const string &line) {
|
||||
// The first line back should include the HTTP version and the
|
||||
// result code.
|
||||
if (line.length() < 5 || line.substr(0, 5) != "HTTP/") {
|
||||
if (line.length() < 5 || line.substr(0, 5) != string("HTTP/")) {
|
||||
// Not an HTTP response.
|
||||
_status_code = 0;
|
||||
_status_string = "Not an HTTP response";
|
||||
@ -2000,7 +2000,7 @@ verify_server(X509_NAME *subject) const {
|
||||
++ei) {
|
||||
X509_NAME *expected_name = (*ei);
|
||||
X509_NAME_print_ex_fp(stderr, expected_name, 0, 0);
|
||||
fprintf(stderr, "\n");
|
||||
fputs("\n", stderr);
|
||||
}
|
||||
fflush(stderr);
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ IIdentityStream(BioStreamPtr *source, HTTPChannel *doc,
|
||||
INLINE IIdentityStream &IIdentityStream::
|
||||
open(BioStreamPtr *source, HTTPChannel *doc,
|
||||
bool has_content_length, size_t content_length) {
|
||||
clear((ios::iostate)0);
|
||||
clear((ios_iostate)0);
|
||||
_buf.open_read(source, doc, has_content_length, content_length);
|
||||
return *this;
|
||||
}
|
||||
|
@ -20,6 +20,8 @@
|
||||
#include "datagram.h"
|
||||
#include "datagramIterator.h"
|
||||
|
||||
#ifdef HAVE_SSL
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: ISocketStream::receive_datagram
|
||||
// Access: Public
|
||||
@ -163,3 +165,5 @@ send_datagram(const Datagram &dg) {
|
||||
|
||||
return !is_closed();
|
||||
}
|
||||
|
||||
#endif // HAVE_SSL
|
||||
|
@ -33,8 +33,8 @@
|
||||
memoryUsagePointerCounts.I memoryUsagePointerCounts.h \
|
||||
memoryUsagePointers.I memoryUsagePointers.h \
|
||||
multifile.I multifile.h \
|
||||
mutexDummyImpl.h mutexDummyImpl.I mutex.h mutexHolder.h \
|
||||
mutexHolder.I mutex.I mutexImpl.h mutexNsprImpl.h mutexNsprImpl.I \
|
||||
mutexDummyImpl.h mutexDummyImpl.I pmutex.h mutexHolder.h \
|
||||
mutexHolder.I pmutex.I mutexImpl.h mutexNsprImpl.h mutexNsprImpl.I \
|
||||
namable.I \
|
||||
namable.h nativeNumericData.I nativeNumericData.h \
|
||||
numeric_types.h \
|
||||
@ -79,7 +79,7 @@
|
||||
hashGeneratorBase.cxx hashVal.cxx indent.cxx \
|
||||
memoryInfo.cxx memoryUsage.cxx memoryUsagePointerCounts.cxx \
|
||||
memoryUsagePointers.cxx multifile.cxx \
|
||||
mutex.cxx mutexHolder.cxx mutexDummyImpl.cxx mutexNsprImpl.cxx \
|
||||
pmutex.cxx mutexHolder.cxx mutexDummyImpl.cxx mutexNsprImpl.cxx \
|
||||
namable.cxx \
|
||||
nativeNumericData.cxx \
|
||||
ordered_vector.cxx \
|
||||
@ -120,8 +120,8 @@
|
||||
memoryUsage.h memoryUsagePointerCounts.I \
|
||||
memoryUsagePointerCounts.h memoryUsagePointers.I \
|
||||
memoryUsagePointers.h multifile.I multifile.h \
|
||||
mutexDummyImpl.h mutexDummyImpl.I mutex.h mutexHolder.h \
|
||||
mutexHolder.I mutex.I mutexImpl.h mutexNsprImpl.h mutexNsprImpl.I \
|
||||
mutexDummyImpl.h mutexDummyImpl.I pmutex.h mutexHolder.h \
|
||||
mutexHolder.I pmutex.I mutexImpl.h mutexNsprImpl.h mutexNsprImpl.I \
|
||||
namable.I namable.h \
|
||||
nativeNumericData.I nativeNumericData.h numeric_types.h \
|
||||
ordered_vector.h ordered_vector.I ordered_vector.T \
|
||||
|
@ -20,7 +20,7 @@
|
||||
#define CONDITIONVAR_H
|
||||
|
||||
#include "pandabase.h"
|
||||
#include "mutex.h"
|
||||
#include "pmutex.h"
|
||||
#include "conditionVarImpl.h"
|
||||
#include "notify.h"
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include "memoryUsagePointerCounts.cxx"
|
||||
#include "memoryUsagePointers.cxx"
|
||||
#include "multifile.cxx"
|
||||
#include "mutex.cxx"
|
||||
#include "pmutex.cxx"
|
||||
#include "mutexHolder.cxx"
|
||||
#include "mutexDummyImpl.cxx"
|
||||
#include "mutexNsprImpl.cxx"
|
||||
|
@ -20,7 +20,7 @@
|
||||
#define MUTEXHOLDER_H
|
||||
|
||||
#include "pandabase.h"
|
||||
#include "mutex.h"
|
||||
#include "pmutex.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Class : MutexHolder
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Filename: mutex.I
|
||||
// Filename: pmutex.I
|
||||
// Created by: drose (08Aug02)
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
@ -1,4 +1,4 @@
|
||||
// Filename: mutex.cxx
|
||||
// Filename: pmutex.cxx
|
||||
// Created by: drose (08Aug02)
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
@ -16,4 +16,4 @@
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "mutex.h"
|
||||
#include "pmutex.h"
|
@ -1,4 +1,4 @@
|
||||
// Filename: mutex.h
|
||||
// Filename: pmutex.h
|
||||
// Created by: cary (16Sep98)
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
@ -16,8 +16,8 @@
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef MUTEX_H
|
||||
#define MUTEX_H
|
||||
#ifndef PMUTEX_H
|
||||
#define PMUTEX_H
|
||||
|
||||
#include "pandabase.h"
|
||||
#include "mutexImpl.h"
|
||||
@ -47,6 +47,6 @@ private:
|
||||
friend class ConditionVar;
|
||||
};
|
||||
|
||||
#include "mutex.I"
|
||||
#include "pmutex.I"
|
||||
|
||||
#endif
|
@ -51,7 +51,7 @@ ISubStream(istream *source, streampos start, streampos end) : istream(&_buf) {
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE ISubStream &ISubStream::
|
||||
open(istream *source, streampos start, streampos end) {
|
||||
clear((ios::iostate)0);
|
||||
clear((ios_iostate)0);
|
||||
_buf.open(source, start, end);
|
||||
return *this;
|
||||
}
|
||||
|
@ -142,12 +142,7 @@ close() {
|
||||
// Description: Implements seeking within the stream.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
streampos SubStreamBuf::
|
||||
#ifdef HAVE_IOSTREAM
|
||||
seekoff(streamoff off, ios::seekdir dir, ios::openmode mode)
|
||||
#else
|
||||
seekoff(streamoff off, ios::seek_dir dir, int mode)
|
||||
#endif
|
||||
{
|
||||
seekoff(streamoff off, ios_seekdir dir, ios_openmode mode) {
|
||||
// Invariant: _cur points to the file location of the buffer at
|
||||
// egptr().
|
||||
|
||||
@ -216,12 +211,7 @@ seekoff(streamoff off, ios::seek_dir dir, int mode)
|
||||
// function as well.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
streampos SubStreamBuf::
|
||||
#ifdef HAVE_IOSTREAM
|
||||
seekpos(streampos pos, ios::openmode mode)
|
||||
#else
|
||||
seekpos(streampos pos, int mode)
|
||||
#endif
|
||||
{
|
||||
seekpos(streampos pos, ios_openmode mode) {
|
||||
return seekoff(pos, ios::beg, mode);
|
||||
}
|
||||
|
||||
|
@ -33,13 +33,8 @@ public:
|
||||
void open(istream *source, streampos start, streampos end);
|
||||
void close();
|
||||
|
||||
#ifdef HAVE_IOSTREAM
|
||||
virtual streampos seekoff(streamoff off, ios::seekdir dir, ios::openmode mode);
|
||||
virtual streampos seekpos(streampos pos, ios::openmode mode);
|
||||
#else
|
||||
virtual streampos seekoff(streamoff off, ios::seek_dir dir, int mode);
|
||||
virtual streampos seekpos(streampos pos, int mode);
|
||||
#endif
|
||||
virtual streampos seekoff(streamoff off, ios_seekdir dir, ios_openmode mode);
|
||||
virtual streampos seekpos(streampos pos, ios_openmode mode);
|
||||
|
||||
protected:
|
||||
virtual int overflow(int c);
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#include "pandabase.h"
|
||||
#include "thread.h"
|
||||
#include "mutex.h"
|
||||
#include "pmutex.h"
|
||||
#include "mutexHolder.h"
|
||||
#include "pointerTo.h"
|
||||
|
||||
|
@ -26,12 +26,18 @@
|
||||
|
||||
#include "notify.h"
|
||||
#include "threadPriority.h"
|
||||
#include "mutex.h"
|
||||
#include "pmutex.h"
|
||||
|
||||
#include <prthread.h>
|
||||
|
||||
class Thread;
|
||||
|
||||
// The Irix system headers may define this as a macro. Get it out of
|
||||
// the way.
|
||||
#ifdef atomic_set
|
||||
#undef atomic_set
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Class : ThreadDummyImpl
|
||||
// Description : A fake thread implementation for single-threaded
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
#include "notify.h"
|
||||
#include "threadPriority.h"
|
||||
#include "mutex.h"
|
||||
#include "pmutex.h"
|
||||
|
||||
#include <prthread.h>
|
||||
#include <prinit.h>
|
||||
|
@ -43,7 +43,7 @@ IDecompressStream(istream *source, bool owns_source) : istream(&_buf) {
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE IDecompressStream &IDecompressStream::
|
||||
open(istream *source, bool owns_source) {
|
||||
clear((ios::iostate)0);
|
||||
clear((ios_iostate)0);
|
||||
_buf.open_read(source, owns_source);
|
||||
return *this;
|
||||
}
|
||||
@ -89,7 +89,7 @@ OCompressStream(ostream *dest, bool owns_dest, int compression_level) :
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE OCompressStream &OCompressStream::
|
||||
open(ostream *dest, bool owns_dest, int compression_level) {
|
||||
clear((ios::iostate)0);
|
||||
clear((ios_iostate)0);
|
||||
_buf.open_write(dest, owns_dest, compression_level);
|
||||
return *this;
|
||||
}
|
||||
|
@ -23,7 +23,7 @@
|
||||
#ifndef PANDABASE_H
|
||||
#define PANDABASE_H
|
||||
|
||||
#include <dtoolbase.h>
|
||||
#include "dtoolbase.h"
|
||||
#include "pandasymbols.h"
|
||||
|
||||
#endif
|
||||
|
@ -1,20 +0,0 @@
|
||||
#define BUILD_DIRECTORY $[HAVE_SGIGL]
|
||||
|
||||
#define OTHER_LIBS interrogatedb:c dconfig:c dtoolconfig:m \
|
||||
dtoolutil:c dtoolbase:c dtool:m
|
||||
|
||||
#begin lib_target
|
||||
#define TARGET sgidisplay
|
||||
#define UNIX_SYS_LIBS \
|
||||
Xsgivc
|
||||
#define LOCAL_LIBS display
|
||||
|
||||
#define SOURCES \
|
||||
config_sgidisplay.cxx config_sgidisplay.h sgiGraphicsPipe.cxx \
|
||||
sgiGraphicsPipe.h sgiHardwareChannel.cxx sgiHardwareChannel.h
|
||||
|
||||
#define INSTALL_HEADERS \
|
||||
sgiGraphicsPipe.h sgiHardwareChannel.h
|
||||
|
||||
#end lib_target
|
||||
|
@ -1,30 +0,0 @@
|
||||
// Filename: config_sgidisplay.cxx
|
||||
// Created by: cary (07Oct99)
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// 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_sgidisplay.h"
|
||||
#include "sgiGraphicsPipe.h"
|
||||
#include "sgiHardwareChannel.h"
|
||||
|
||||
#include <dconfig.h>
|
||||
|
||||
Configure(config_sgidisplay);
|
||||
|
||||
ConfigureFn(config_sgidisplay) {
|
||||
sgiGraphicsPipe::init_type();
|
||||
sgiHardwareChannel::init_type();
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
// Filename: config_sgidisplay.h
|
||||
// Created by: cary (07Oct99)
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// 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_SGIDISPLAY_H__
|
||||
#define __CONFIG_SGIDISPLAY_H__
|
||||
|
||||
// nothing to include here yet
|
||||
|
||||
#endif /* __CONFIG_SGIDISPLAY_H__ */
|
@ -1,120 +0,0 @@
|
||||
// Filename: sgiGraphicsPipe.cxx
|
||||
// Created by: mike (09Jan97)
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// 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 "sgiGraphicsPipe.h"
|
||||
#include <X11/Xlib.h>
|
||||
#include <GL/glx.h>
|
||||
#include <X11/extensions/XSGIvc.h>
|
||||
#include "sgiHardwareChannel.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Static variables
|
||||
////////////////////////////////////////////////////////////////////
|
||||
TypeHandle sgiGraphicsPipe::_type_handle;
|
||||
|
||||
sgiGraphicsPipe::sgiGraphicsPipe(const PipeSpecifier& spec)
|
||||
: InteractiveGraphicsPipe(spec) {
|
||||
_num_channels = -1;
|
||||
}
|
||||
|
||||
sgiGraphicsPipe::~sgiGraphicsPipe(void) {
|
||||
return;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: get_num_hw_channels
|
||||
// Access:
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
int sgiGraphicsPipe::get_num_hw_channels( void )
|
||||
{
|
||||
if ( _num_channels == -1 )
|
||||
{
|
||||
Display* display = (Display *)_display;
|
||||
// Is there a better way to get the display??? (I hope so)
|
||||
display = glXGetCurrentDisplayEXT();
|
||||
|
||||
// For now, screen is the same as display
|
||||
_screen = DefaultScreen( display );
|
||||
|
||||
XSGIvcScreenInfo server;
|
||||
XSGIvcQueryVideoScreenInfo( display, _screen, &server );
|
||||
|
||||
// Not all of these will be active necessarily
|
||||
_num_channels = server.numChannels;
|
||||
}
|
||||
|
||||
return _num_channels;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: get_hw_channel
|
||||
// Access:
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
HardwareChannel *sgiGraphicsPipe::
|
||||
get_hw_channel( GraphicsWindow* window, int index ) {
|
||||
if ( _num_channels == -1 )
|
||||
get_num_hw_channels();
|
||||
|
||||
if ( index >= _num_channels )
|
||||
{
|
||||
cerr << "sgiGraphicsPipe::get_hw_channel() - invalid index: "
|
||||
<< index << endl;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Channels::iterator i;
|
||||
i = _hw_chans.find( index );
|
||||
if (i != _hw_chans.end()) {
|
||||
return (*i).second.p();
|
||||
}
|
||||
|
||||
sgiHardwareChannel* hw_chan;
|
||||
hw_chan = new sgiHardwareChannel( window, index );
|
||||
_hw_chans[index] = hw_chan;
|
||||
|
||||
return hw_chan;
|
||||
}
|
||||
|
||||
TypeHandle sgiGraphicsPipe::get_class_type(void) {
|
||||
return _type_handle;
|
||||
}
|
||||
|
||||
void sgiGraphicsPipe::init_type(void) {
|
||||
InteractiveGraphicsPipe::init_type();
|
||||
register_type(_type_handle, "sgiGraphicsPipe",
|
||||
InteractiveGraphicsPipe::get_class_type());
|
||||
}
|
||||
|
||||
TypeHandle sgiGraphicsPipe::get_type(void) const {
|
||||
return get_class_type();
|
||||
}
|
||||
|
||||
sgiGraphicsPipe::sgiGraphicsPipe(void) {
|
||||
cerr << "sgiGraphicsPipes should not be created with default constructor"
|
||||
<< endl;
|
||||
}
|
||||
|
||||
sgiGraphicsPipe::sgiGraphicsPipe(const sgiGraphicsPipe&) {
|
||||
cerr << "sgiGraphicsPipes should not be copied" << endl;
|
||||
}
|
||||
|
||||
sgiGraphicsPipe& sgiGraphicsPipe::operator=(const sgiGraphicsPipe&) {
|
||||
cerr << "sgiGraphicsPipes should not be assigned" << endl;
|
||||
return *this;
|
||||
}
|
@ -1,81 +0,0 @@
|
||||
// Filename: sgiGraphicsPipe.h
|
||||
// Created by: mike (09Jan97)
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// 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 SGIGRAPHICSPIPE_H
|
||||
#define SGIGRAPHICSPIPE_H
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Includes
|
||||
////////////////////////////////////////////////////////////////////
|
||||
#include <pandabase.h>
|
||||
|
||||
#include "sgiHardwareChannel.h"
|
||||
|
||||
#include <interactiveGraphicsPipe.h>
|
||||
#include <string>
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Defines
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Class : sgiGraphicsPipe
|
||||
// Description :
|
||||
////////////////////////////////////////////////////////////////////
|
||||
class sgiGraphicsPipe : public InteractiveGraphicsPipe {
|
||||
public:
|
||||
|
||||
sgiGraphicsPipe(const PipeSpecifier&);
|
||||
virtual ~sgiGraphicsPipe() = 0;
|
||||
|
||||
INLINE void* get_display() const { return _display; }
|
||||
INLINE int get_screen() const { return _screen; }
|
||||
|
||||
protected:
|
||||
|
||||
typedef pmap<int, PT(sgiHardwareChannel) > Channels;
|
||||
Channels _hw_chans;
|
||||
|
||||
virtual int get_num_hw_channels();
|
||||
virtual HardwareChannel *get_hw_channel(GraphicsWindow* window,
|
||||
int index);
|
||||
|
||||
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();}
|
||||
|
||||
protected:
|
||||
|
||||
void *_display;
|
||||
int _screen;
|
||||
int _num_channels;
|
||||
|
||||
private:
|
||||
|
||||
static TypeHandle _type_handle;
|
||||
|
||||
protected:
|
||||
|
||||
sgiGraphicsPipe();
|
||||
sgiGraphicsPipe(const sgiGraphicsPipe&);
|
||||
sgiGraphicsPipe& operator=(const sgiGraphicsPipe&);
|
||||
};
|
||||
|
||||
#endif
|
@ -1,63 +0,0 @@
|
||||
// Filename: sgiHardwareChannel.cxx
|
||||
// Created by: mike (09Jan97)
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// 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 "sgiHardwareChannel.h"
|
||||
#include "sgiGraphicsPipe.h"
|
||||
#include <GL/glx.h>
|
||||
#include <X11/extensions/XSGIvc.h>
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Static variables
|
||||
////////////////////////////////////////////////////////////////////
|
||||
TypeHandle sgiHardwareChannel::_type_handle;
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: Constructor
|
||||
// Access:
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
sgiHardwareChannel::sgiHardwareChannel( GraphicsWindow* window, int id ) :
|
||||
HardwareChannel( window )
|
||||
{
|
||||
_id = id;
|
||||
const GraphicsPipe* pipe = window->get_pipe();
|
||||
const sgiGraphicsPipe* sgipipe;
|
||||
if ( pipe->get_class_type() == sgiGraphicsPipe::get_class_type() )
|
||||
sgipipe = (sgiGraphicsPipe *)pipe;
|
||||
else
|
||||
{
|
||||
cerr << "sgiHardwareChannel::Constructor() - window does not have "
|
||||
<< "an sgiGraphicsPipe!!!" << endl;
|
||||
return;
|
||||
}
|
||||
|
||||
XSGIvcChannelInfo* channel_info = (XSGIvcChannelInfo *)_channel_info;
|
||||
|
||||
XSGIvcQueryChannelInfo( (Display *)sgipipe->get_display(),
|
||||
sgipipe->get_screen(), _id, &channel_info );
|
||||
if ( channel_info->active ) {
|
||||
int screeny = DisplayHeight( (Display *)sgipipe->get_display(),
|
||||
sgipipe->get_screen() );
|
||||
_xsize = channel_info->source.width;
|
||||
_ysize = channel_info->source.height;
|
||||
_xorg = channel_info->source.x;
|
||||
_yorg = screeny - ( channel_info->source.y + _ysize );
|
||||
set_active(true);
|
||||
} else {
|
||||
set_active(false);
|
||||
}
|
||||
}
|
@ -1,66 +0,0 @@
|
||||
// Filename: sgiHardwareChannel.h
|
||||
// Created by: mike (09Jan97)
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// 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 SGIHARDWARECHANNEL_H
|
||||
#define SGIHARDWARECHANNEL_H
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Includes
|
||||
////////////////////////////////////////////////////////////////////
|
||||
#include <pandabase.h>
|
||||
|
||||
#include <hardwareChannel.h>
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Defines
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Class : sgiHardwareChannel
|
||||
// Description :
|
||||
////////////////////////////////////////////////////////////////////
|
||||
class sgiHardwareChannel : public HardwareChannel
|
||||
{
|
||||
public:
|
||||
|
||||
sgiHardwareChannel( GraphicsWindow* window, int id );
|
||||
|
||||
protected:
|
||||
|
||||
void *_channel_info;
|
||||
|
||||
public:
|
||||
|
||||
static TypeHandle get_class_type() {
|
||||
return _type_handle;
|
||||
}
|
||||
static void init_type() {
|
||||
HardwareChannel::init_type();
|
||||
register_type(_type_handle, "sgiHardwareChannel",
|
||||
HardwareChannel::get_class_type());
|
||||
}
|
||||
virtual TypeHandle get_type() const {
|
||||
return get_class_type();
|
||||
}
|
||||
virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
|
||||
|
||||
private:
|
||||
|
||||
static TypeHandle _type_handle;
|
||||
};
|
||||
|
||||
#endif
|
@ -1,19 +0,0 @@
|
||||
#define BUILD_DIRECTORY $[and $[HAVE_SGIGL],$[HAVE_GLX]]
|
||||
|
||||
#define OTHER_LIBS interrogatedb:c dconfig:c dtoolconfig:m \
|
||||
dtoolutil:c dtoolbase:c dtool:m
|
||||
|
||||
#begin lib_target
|
||||
#define TARGET sgiglxdisplay
|
||||
#define LOCAL_LIBS \
|
||||
sgidisplay glxdisplay
|
||||
|
||||
#define SOURCES \
|
||||
config_sgiglxdisplay.cxx config_sgiglxdisplay.h \
|
||||
sgiglxGraphicsPipe.cxx sgiglxGraphicsPipe.h
|
||||
|
||||
#define INSTALL_HEADERS \
|
||||
sgiglxGraphicsPipe.h
|
||||
|
||||
#end lib_target
|
||||
|
@ -1,31 +0,0 @@
|
||||
// Filename: config_sgiglxdisplay.cxx
|
||||
// Created by: cary (07Oct99)
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// 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_sgiglxdisplay.h"
|
||||
#include "sgiglxGraphicsPipe.h"
|
||||
|
||||
#include <dconfig.h>
|
||||
|
||||
Configure(config_sgiglxdisplay);
|
||||
NotifyCategoryDef(sgiglxdisplay, "display");
|
||||
|
||||
ConfigureFn(config_sgiglxdisplay) {
|
||||
SgiGlxGraphicsPipe::init_type();
|
||||
GraphicsPipe::get_factory().register_factory(SgiGlxGraphicsPipe::get_class_type(),
|
||||
SgiGlxGraphicsPipe::make_sgiglxgraphicspipe);
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
// Filename: config_sgiglxdisplay.h
|
||||
// Created by: cary (07Oct99)
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// 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_SGIGLXDISPLAY_H
|
||||
#define CONFIG_SGIGLXDISPLAY_H
|
||||
|
||||
#include <pandabase.h>
|
||||
#include <notifyCategoryProxy.h>
|
||||
|
||||
NotifyCategoryDecl(sgiglxdisplay, EXPCL_PANDAGL, EXPTP_PANDAGL);
|
||||
|
||||
#endif
|
@ -1,87 +0,0 @@
|
||||
// Filename: sgiglxGraphicsPipe.cxx
|
||||
// Created by: cary (01Oct99)
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// 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 .
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Includes
|
||||
////////////////////////////////////////////////////////////////////
|
||||
#include "sgiglxGraphicsPipe.h"
|
||||
#include "config_sgiglxdisplay.h"
|
||||
|
||||
#include <glxGraphicsWindow.h>
|
||||
|
||||
TypeHandle SgiGlxGraphicsPipe::_type_handle;
|
||||
|
||||
SgiGlxGraphicsPipe::SgiGlxGraphicsPipe(const PipeSpecifier& spec)
|
||||
: sgiGraphicsPipe(spec),
|
||||
glxDisplay(this, spec.get_X_specifier())
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: SgiGlxGraphicsPipe::get_window_type
|
||||
// Access: Public, Virtual
|
||||
// Description: Returns the TypeHandle of the kind of window
|
||||
// preferred by this kind of pipe.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
TypeHandle SgiGlxGraphicsPipe::
|
||||
get_window_type() const {
|
||||
return glxGraphicsWindow::get_class_type();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: SgiGlxGraphicsPipe::get_glx_display
|
||||
// Access: Public, Virtual
|
||||
// Description: Returns the glxDisplay information associated with
|
||||
// this pipe.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
glxDisplay *SgiGlxGraphicsPipe::
|
||||
get_glx_display() {
|
||||
return this;
|
||||
}
|
||||
|
||||
GraphicsPipe *SgiGlxGraphicsPipe::
|
||||
make_sgiglxgraphicspipe(const FactoryParams ¶ms) {
|
||||
GraphicsPipe::PipeSpec *pipe_param;
|
||||
if (!get_param_into(pipe_param, params)) {
|
||||
return new SgiGlxGraphicsPipe(PipeSpecifier());
|
||||
} else {
|
||||
return new SgiGlxGraphicsPipe(pipe_param->get_specifier());
|
||||
}
|
||||
}
|
||||
|
||||
TypeHandle SgiGlxGraphicsPipe::get_class_type(void) {
|
||||
return _type_handle;
|
||||
}
|
||||
|
||||
void SgiGlxGraphicsPipe::init_type(void) {
|
||||
sgiGraphicsPipe::init_type();
|
||||
glxDisplay::init_type();
|
||||
register_type(_type_handle, "SgiGlxGraphicsPipe",
|
||||
sgiGraphicsPipe::get_class_type(),
|
||||
glxDisplay::get_class_type());
|
||||
}
|
||||
|
||||
TypeHandle SgiGlxGraphicsPipe::get_type(void) const {
|
||||
return get_class_type();
|
||||
}
|
||||
|
||||
TypeHandle SgiGlxGraphicsPipe::force_init_type(void) {
|
||||
init_type();
|
||||
return get_class_type();
|
||||
}
|
@ -1,54 +0,0 @@
|
||||
// Filename: sgiglxGraphicsPipe.h
|
||||
// Created by: cary (01Oct99)
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// 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 __SGIGLXGRAPHICSPIPE_H__
|
||||
#define __SGIGLXGRAPHICSPIPE_H__
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Includes
|
||||
////////////////////////////////////////////////////////////////////
|
||||
#include <pandabase.h>
|
||||
|
||||
#include <sgiGraphicsPipe.h>
|
||||
#include <glxDisplay.h>
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Class : SgiGlxGraphicsPipe
|
||||
// Description : This kind of pipe can create glx windows but
|
||||
// supports the functionality of an sgi pipe with
|
||||
// hardware channels
|
||||
////////////////////////////////////////////////////////////////////
|
||||
class SgiGlxGraphicsPipe : public sgiGraphicsPipe, public glxDisplay {
|
||||
public:
|
||||
SgiGlxGraphicsPipe( const PipeSpecifier& );
|
||||
|
||||
virtual TypeHandle get_window_type() const;
|
||||
virtual glxDisplay *get_glx_display();
|
||||
|
||||
static GraphicsPipe* make_sgiglxgraphicspipe(const FactoryParams ¶ms);
|
||||
|
||||
static TypeHandle get_class_type( void );
|
||||
static void init_type( void );
|
||||
virtual TypeHandle get_type( void ) const;
|
||||
virtual TypeHandle force_init_type( void );
|
||||
|
||||
private:
|
||||
static TypeHandle _type_handle;
|
||||
};
|
||||
|
||||
#endif /* __SGIGLXGRAPHICSPIPE_H__ */
|
Loading…
x
Reference in New Issue
Block a user