Changeset 1337
- Timestamp:
- Mar 18, 2009 8:16:52 AM (15 years ago)
- Location:
- trunk/packages/vizservers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/vizservers/nanovis/RpAVTranslate.cpp
r1325 r1337 180 180 } 181 181 182 #ifdef notdef 182 183 // use img_convert instead of sws_scale because img_convert 183 184 // is lgpl nad sws_scale is gpl … … 185 186 (AVPicture *)_rgb_picture, PIX_FMT_RGB24, 186 187 _width, _height); 187 188 #endif 188 189 writeVideoFrame(status); 189 190 -
trunk/packages/vizservers/pymolproxy/pymolproxy.c
r1336 r1337 133 133 #define BUFFER_SHORT_READ -3 134 134 135 #define ATOM_SCALE_PENDING (1<<0) 136 #define BOND_THICKNESS_PENDING (1<<1) 137 #define ROTATE_PENDING (1<<2) 138 #define PAN_PENDING (1<<3) 139 #define ZOOM_PENDING (1<<4) 140 #define UPDATE_PENDING (1<<5) 141 #define FORCE_UPDATE (1<<6) 142 #define CAN_UPDATE (1<<7) 143 #define SHOW_LABELS (1<<8) 144 #define INVALIDATE_CACHE (1<<9) 135 #define FORCE_UPDATE (1<<0) 136 #define CAN_UPDATE (1<<1) 137 #define SHOW_LABELS (1<<2) 138 #define INVALIDATE_CACHE (1<<3) 139 #define ATOM_SCALE_PENDING (1<<4) 140 #define BOND_THICKNESS_PENDING (1<<5) 141 #define ROTATE_PENDING (1<<6) 142 #define PAN_PENDING (1<<7) 143 #define ZOOM_PENDING (1<<8) 144 #define UPDATE_PENDING (1<<9) 145 #define VIEWPORT_PENDING (1<<10) 145 146 146 147 typedef struct { … … 164 165 int error; 165 166 int status; 167 int width, height; /* Size of viewport. */ 166 168 float xAngle, yAngle, zAngle; /* Euler angles of pending rotation. */ 167 169 float atomScale; /* Atom scale of pending re-scale. */ … … 533 535 imgPtr = malloc(sizeof(Image) + dataLength); 534 536 if (imgPtr == NULL) { 535 fprintf(stderr, "can't allocate image of % dbytes",536 sizeof(Image) + dataLength);537 fprintf(stderr, "can't allocate image of %lu bytes", 538 (unsigned long)(sizeof(Image) + dataLength)); 537 539 abort(); 538 540 } … … 671 673 } 672 674 return proxyPtr->status; 675 } 676 } 677 678 static void 679 SetViewport(PymolProxy *proxyPtr) 680 { 681 if (proxyPtr->flags & VIEWPORT_PENDING) { 682 Pymol(proxyPtr, "viewport %d,%d\n", proxyPtr->width, proxyPtr->height); 683 proxyPtr->flags &= ~VIEWPORT_PENDING; 673 684 } 674 685 } … … 1262 1273 { 1263 1274 char buffer[800]; 1264 size_t nBytes=0;1275 int nBytes=0; 1265 1276 PymolProxy *proxyPtr = clientData; 1266 1277 size_t length; … … 1556 1567 proxyPtr->flags |= FORCE_UPDATE; 1557 1568 } 1558 Pymol(proxyPtr, "viewport %d,%d\n", width, height); 1569 proxyPtr->width = width; 1570 proxyPtr->height = height; 1571 proxyPtr->flags |= VIEWPORT_PENDING; 1559 1572 1560 1573 //usleep(205000); // .2s delay for pymol to update its geometry *HACK ALERT* … … 1962 1975 1963 1976 /* Handle all the pending setting changes now. */ 1977 if (proxyPtr->flags & VIEWPORT_PENDING) { 1978 SetViewport(proxyPtr); 1979 } 1964 1980 if (proxyPtr->flags & ROTATE_PENDING) { 1965 1981 SetRotation(proxyPtr);
Note: See TracChangeset
for help on using the changeset viewer.