//Modification de la fonction initiale GLvoid PrimitiveGL::drawingVolume() { glPointSize (0.5); glBegin (GL_POINTS); for (int i=0; i<_vol->size(); ++i) { Point3D_Color_t<float> p = _vol->get(i); glColor3d(((double)p.Red()/255), ((double)p.Green()/255), ((double)p.Blue()/255)); glVertex3f(p.x ,p.z ,p.y ); } glEnd(); copyScreen(_name+"_Client3D_Streaming.ppm"); }
GDevPtr autoConfigDevice(GDevPtr preconf_device) { GDevPtr ptr = NULL; char *matches[20]; /* If we have more than 20 drivers we're in trouble */ int num_matches = 0, num_screens = 0, i; screenLayoutPtr slp; if (!xf86configptr) { return NULL; } /* If there's a configured section with no driver chosen, use it */ if (preconf_device) { ptr = preconf_device; } else { ptr = calloc(1, sizeof(GDevRec)); if (!ptr) { return NULL; } ptr->chipID = -1; ptr->chipRev = -1; ptr->irq = -1; ptr->active = TRUE; ptr->claimed = FALSE; ptr->identifier = "Autoconfigured Video Device"; ptr->driver = NULL; } if (!ptr->driver) { /* get all possible video drivers and count them */ listPossibleVideoDrivers(matches, 20); for (; matches[num_matches]; num_matches++) { xf86Msg(X_DEFAULT, "Matched %s as autoconfigured driver %d\n", matches[num_matches], num_matches); } slp = xf86ConfigLayout.screens; if (slp) { /* count the number of screens and make space for * a new screen for each additional possible driver * minus one for the already existing first one * plus one for the terminating NULL */ for (; slp[num_screens].screen; num_screens++); xf86ConfigLayout.screens = xnfcalloc(num_screens + num_matches, sizeof(screenLayoutRec)); xf86ConfigLayout.screens[0] = slp[0]; /* do the first match and set that for the original first screen */ ptr->driver = matches[0]; if (!xf86ConfigLayout.screens[0].screen->device) { xf86ConfigLayout.screens[0].screen->device = ptr; ptr->myScreenSection = xf86ConfigLayout.screens[0].screen; } /* for each other driver found, copy the first screen, insert it * into the list of screens and set the driver */ i = 0; while (i++ < num_matches) { if (!copyScreen(slp[0].screen, ptr, i, matches[i])) return NULL; } /* shift the rest of the original screen list * to the end of the current screen list * * TODO Handle rest of multiple screen sections */ for (i = 1; i < num_screens; i++) { xf86ConfigLayout.screens[i+num_matches] = slp[i]; } xf86ConfigLayout.screens[num_screens+num_matches-1].screen = NULL; free(slp); } else { /* layout does not have any screens, not much to do */ ptr->driver = matches[0]; for (i = 1; matches[i] ; i++) { if (matches[i] != matches[0]) { free(matches[i]); } } } } xf86Msg(X_DEFAULT, "Assigned the driver to the xf86ConfigLayout\n"); return ptr; }
static void hubTestBmp(void) { copyScreen(screen, (screen_t *)testBmp); }
/** Play FLA movies @param flaName FLA movie name */ void playFlaMovie(int8 *flaName) { int32 i; int32 quit = 0; int32 currentFrame; int16 tmpValue; int8 fileNamePath[256]; stopSamples(); // Play FLA PCX instead of movies if (cfgfile.Movie == CONF_MOVIE_FLAPCX) { fla_pcxList(flaName); return; } stopMusic(); // take extension if movie name has it for (i = 0; i < (int32)strlen(flaName); i++) { if(flaName[i] == '.') { flaName[i] = 0; } } sprintf(fileNamePath, FLA_DIR); strcat(fileNamePath, flaName); strcat(fileNamePath, FLA_EXT); _fadeOut = -1; fadeOutFrames = 0; if (!fropen2(&frFla, fileNamePath, "rb")) return; workVideoBufferCopy = workVideoBuffer; frread(&frFla, &flaHeaderData.version, 6); frread(&frFla, &flaHeaderData.numOfFrames, 4); frread(&frFla, &flaHeaderData.speed, 1); frread(&frFla, &flaHeaderData.var1, 1); frread(&frFla, &flaHeaderData.xsize, 2); frread(&frFla, &flaHeaderData.ysize, 2); frread(&frFla, &samplesInFla, 2); frread(&frFla, &tmpValue, 2); for (i = 0; i < samplesInFla; i++) { int16 var0; int16 var1; frread(&frFla, &var0, 2); frread(&frFla, &var1, 2); flaSampleTable[i] = var0; } if (!strcmp(flaHeaderData.version, "V1.3")) { currentFrame = 0; if (!quit) { do { if (currentFrame == flaHeaderData.numOfFrames) quit = 1; else { processFrame(); scaleFla2x(); copyScreen(workVideoBuffer, frontVideoBuffer); // Only blit to screen if isn't a fade if (_fadeOut == -1) { convertPalToRGBA(palette, paletteRGBACustom); if (!currentFrame) // fade in the first frame fadeIn(paletteRGBACustom); else setPalette(paletteRGBACustom); } // TRICKY: fade in tricky if (fadeOutFrames >= 2) { flip(); convertPalToRGBA(palette, paletteRGBACustom); fadeToPal(paletteRGBACustom); _fadeOut = -1; fadeOutFrames = 0; } currentFrame++; fpsCycles(flaHeaderData.speed + 1); readKeys(); if (skipIntro) break; } } while (!quit); } } if (cfgfile.CrossFade) { crossFade(frontVideoBuffer, paletteRGBACustom); } else { fadeToBlack(paletteRGBACustom); } stopSamples(); }