Text archives Help
- From: abe@sci.utah.edu
- To: manta@sci.utah.edu
- Subject: [MANTA] r717 - in branches/itanium2: . Engine/Display Model/Groups fox
- Date: Mon, 21 Nov 2005 21:53:20 -0700 (MST)
Author: abe
Date: Mon Nov 21 21:53:19 2005
New Revision: 717
Modified:
branches/itanium2/CMakeLists.txt
branches/itanium2/Engine/Display/GLXImageDisplay.cc
branches/itanium2/Model/Groups/TransparentKDTree.h
branches/itanium2/fox/FMantaImageFrame.cc
branches/itanium2/fox/FMantaImageFrame.h
branches/itanium2/fox/dm_demo.cc
Log:
Fixed bin/dm_demo so that it will display to remote X servers. Note that this
will prevent bin/sc_demo from working on Xvnc servers that don't support GLX.
M fox/dm_demo.cc
M fox/FMantaImageFrame.cc
M fox/FMantaImageFrame.h
M Engine/Display/GLXImageDisplay.cc
M Model/Groups/TransparentKDTree.h
Fixed bug which prevented SGI_LINUX from being defined on Suse systems.
M CMakeLists.txt
Modified: branches/itanium2/CMakeLists.txt
==============================================================================
--- branches/itanium2/CMakeLists.txt (original)
+++ branches/itanium2/CMakeLists.txt Mon Nov 21 21:53:19 2005
@@ -44,8 +44,16 @@
######################################################################
# Check for SGI Linux.
-IF (CMAKE_SYSTEM MATCHES "Linux.*sgi")
-
+
+# On redhat systems, checking the CMAKE_SYSTEM name gave some indication
+# of SGI. On suse systems, this variable doesn't indicate anything useful
+# so instead we check the system processor. (In the end we're interested
+# in using the correct compiler for ia64 anyways so this is probably a
+# better check.)
+
+IF (CMAKE_SYSTEM_PROCESSOR MATCHES "ia64")
+# IF (CMAKE_SYSTEM MATCHES "Linux.*sgi")
+
SET(SGI_LINUX TRUE)
# Warn if the compiler is not icc
@@ -68,7 +76,8 @@
FIRST_TIME_SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g" CACHE STRING "Debug
Flags" FORCE)
ENDIF(CMAKE_CXX_COMPILER MATCHES "icpc$")
-ENDIF(CMAKE_SYSTEM MATCHES "Linux.*sgi")
+ENDIF (CMAKE_SYSTEM_PROCESSOR MATCHES "ia64")
+# ENDIF(CMAKE_SYSTEM MATCHES "Linux.*sgi")
######################################################################
Modified: branches/itanium2/Engine/Display/GLXImageDisplay.cc
==============================================================================
--- branches/itanium2/Engine/Display/GLXImageDisplay.cc (original)
+++ branches/itanium2/Engine/Display/GLXImageDisplay.cc Mon Nov 21 21:53:19
2005
@@ -68,15 +68,18 @@
// Check to see if we are already connected to the X server.
if (x_display == 0) {
// std::cout << "setupDisplayChannel: Connecting to server. "
<< context.proc << std::endl;
- x_display = XOpenDisplay( 0 ); // Open a new connection to
the same display...
+ if ((x_display = XOpenDisplay( 0 )) == 0) {
+ throw InternalError( "Could not connect to X display", __FILE__,
__LINE__ );
+ }
}
- // Get the default screen for the display.
- int x_screen = DefaultScreen( x_display );
// Check to see if a visual info was specified.
if (x_visual_info == 0) {
-
+
+ // Get the default screen for the display.
+ int x_screen = DefaultScreen( x_display );
+
// Form attributes for the visual
vector<int> attributes;
attributes.push_back(GLX_RGBA);
@@ -101,12 +104,17 @@
}
// Create the glx context.
- glx_context = glXCreateContext( x_display, x_visual_info, 0, true );
+ if ((glx_context = glXCreateContext( x_display, x_visual_info, 0,
true )) == 0) {
+ throw InternalError( "Could not create glx context.", __FILE__, __LINE__
);
+ }
+
// Call make current to associate with this thread
// NOTE THIS MUST BE CALLED EACH TIME THE DISPLAY THREAD CHANGES!!
-
- glXMakeCurrent( x_display, glx_drawable, glx_context );
+
+ if (!glXMakeCurrent( x_display, glx_drawable, glx_context )) {
+ throw InternalError( "Could not make glx context current", __FILE__,
__LINE__ );
+ }
// Copy out the manta channel.
manta_channel = context.channelIndex;
Modified: branches/itanium2/Model/Groups/TransparentKDTree.h
==============================================================================
--- branches/itanium2/Model/Groups/TransparentKDTree.h (original)
+++ branches/itanium2/Model/Groups/TransparentKDTree.h Mon Nov 21 21:53:19
2005
@@ -82,7 +82,7 @@
public:
const unsigned char *getPickedName() {
if (pickedTri >= 0) return
&(groupNames->get(groupToNameMap->get(triToGroupMap->get( pickedTri ))));
- return "No selection";
+ return (unsigned char *)"No selection";
}
void enablePicking() {
if (__pickingEnabled)
Modified: branches/itanium2/fox/FMantaImageFrame.cc
==============================================================================
--- branches/itanium2/fox/FMantaImageFrame.cc (original)
+++ branches/itanium2/fox/FMantaImageFrame.cc Mon Nov 21 21:53:19 2005
@@ -39,11 +39,11 @@
FXMAPFUNC(SEL_KEYPRESS, MediaFusionApp::ID_MEDIA_FUSION_APP,
FMantaImageFrame::onKeyPress ),
};
-FXIMPLEMENT(FMantaImageFrame,FXCanvas,FMantaImageFrameMap,ARRAYNUMBER(FMantaImageFrameMap));
+FXIMPLEMENT(FMantaImageFrame,FXGLCanvas,FMantaImageFrameMap,ARRAYNUMBER(FMantaImageFrameMap));
// Constructor, creates a GLX Visual with a double buffer.
FMantaImageFrame::FMantaImageFrame( FXComposite *p, FXApp *app, FXObject
*target_, int width, int height, RTRTInterface *manta_interface_ )
- : FXCanvas( p, /*new FXGLVisual( app, VISUAL_DOUBLEBUFFER | VISUAL_STEREO
),*/ this, ID_IMAGE,
+ : FXGLCanvas( p, new FXGLVisual( app, VISUAL_DOUBLEBUFFER | VISUAL_STEREO
), this, ID_IMAGE,
LAYOUT_FILL|LAYOUT_TOP, 0, 0, width, height ),
fox_target( target_ ),
manta_interface( manta_interface_ )
Modified: branches/itanium2/fox/FMantaImageFrame.h
==============================================================================
--- branches/itanium2/fox/FMantaImageFrame.h (original)
+++ branches/itanium2/fox/FMantaImageFrame.h Mon Nov 21 21:53:19 2005
@@ -16,7 +16,7 @@
// This class contains the GLX context and window that will be used
by a manta
// channel to render into.
- class FMantaImageFrame : public FXCanvas {
+ class FMantaImageFrame : public FXGLCanvas {
FXDECLARE(FMantaImageFrame)
private:
// Fox components.
@@ -34,7 +34,7 @@
public:
// Message types.
enum {
- ID_IMAGE = FXCanvas::ID_LAST, // Messages from the gl
canvas.
+ ID_IMAGE = FXGLCanvas::ID_LAST, // Messages from the
gl canvas.
ID_PIXEL_SELECT, // Sent to fox_target when the user
double clicks, FXEvent * is passed along.
Modified: branches/itanium2/fox/dm_demo.cc
==============================================================================
--- branches/itanium2/fox/dm_demo.cc (original)
+++ branches/itanium2/fox/dm_demo.cc Mon Nov 21 21:53:19 2005
@@ -159,7 +159,9 @@
FMantaImageFrame *manta_frame = manta_window.getMantaFrame();
// Create a glx image display.
- glx_image_display = new GLXImageDisplay( use_stereo, (Window)
manta_frame->id() );
+ glx_image_display =
+ new GLXImageDisplay( (XVisualInfo
*)manta_frame->getVisual()->getInfo(),
+ (Window) manta_frame->id() );
// std::cout << "X Window id: " << manta_frame->id() << std::endl;
- [MANTA] r717 - in branches/itanium2: . Engine/Display Model/Groups fox, abe, 11/21/2005
Archive powered by MHonArc 2.6.16.