@@ -76,13 +76,6 @@ static ushort *GL_original_gamma_ramp = NULL;
7676int Use_VBOs = 0 ;
7777int Use_PBOs = 0 ;
7878
79- static int GL_dump_frames = 0 ;
80- static ubyte *GL_dump_buffer = NULL ;
81- static int GL_dump_frame_number = 0 ;
82- static int GL_dump_frame_count = 0 ;
83- static int GL_dump_frame_count_max = 0 ;
84- static int GL_dump_frame_size = 0 ;
85-
8679static ubyte *GL_saved_screen = NULL ;
8780static ubyte *GL_saved_mouse_data = NULL ;
8881static int GL_saved_screen_id = -1 ;
@@ -1153,96 +1146,6 @@ void gr_opengl_free_screen(int bmp_id)
11531146 GL_saved_screen_id = -1 ;
11541147}
11551148
1156- static void opengl_flush_frame_dump ()
1157- {
1158- char filename[MAX_FILENAME_LEN];
1159-
1160- Assert ( GL_dump_buffer != NULL );
1161-
1162- for (int i = 0 ; i < GL_dump_frame_count; i++) {
1163- sprintf (filename, NOX (" frm%04d.tga" ), GL_dump_frame_number );
1164- GL_dump_frame_number++;
1165-
1166- CFILE *f = cfopen (filename, " wb" , CFILE_NORMAL, CF_TYPE_DATA);
1167-
1168- // Write the TGA header
1169- cfwrite_ubyte ( 0 , f ); // IDLength;
1170- cfwrite_ubyte ( 0 , f ); // ColorMapType;
1171- cfwrite_ubyte ( 2 , f ); // ImageType; // 2 = 24bpp, uncompressed, 10=24bpp rle compressed
1172- cfwrite_ushort ( 0 , f ); // CMapStart;
1173- cfwrite_ushort ( 0 , f ); // CMapLength;
1174- cfwrite_ubyte ( 0 , f ); // CMapDepth;
1175- cfwrite_ushort ( 0 , f ); // XOffset;
1176- cfwrite_ushort ( 0 , f ); // YOffset;
1177- cfwrite_ushort ( (ushort)gr_screen.max_w , f ); // Width;
1178- cfwrite_ushort ( (ushort)gr_screen.max_h , f ); // Height;
1179- cfwrite_ubyte ( 24 , f ); // PixelDepth;
1180- cfwrite_ubyte ( 0 , f ); // ImageDesc;
1181-
1182- glReadBuffer (GL_FRONT);
1183- glReadPixels (0 , 0 , gr_screen.max_w , gr_screen.max_h , GL_BGR_EXT, GL_UNSIGNED_BYTE, GL_dump_buffer);
1184-
1185- // save the data out
1186- cfwrite ( GL_dump_buffer, GL_dump_frame_size, 1 , f );
1187-
1188- cfclose (f);
1189-
1190- }
1191-
1192- GL_dump_frame_count = 0 ;
1193- }
1194-
1195- void gr_opengl_dump_frame_start (int first_frame, int frames_between_dumps)
1196- {
1197- if ( GL_dump_frames ) {
1198- Int3 (); // We're already dumping frames. See John.
1199- return ;
1200- }
1201-
1202- GL_dump_frames = 1 ;
1203- GL_dump_frame_number = first_frame;
1204- GL_dump_frame_count = 0 ;
1205- GL_dump_frame_count_max = frames_between_dumps; // only works if it's 1
1206- GL_dump_frame_size = gr_screen.max_w * gr_screen.max_h * 3 ;
1207-
1208- if ( !GL_dump_buffer ) {
1209- int size = GL_dump_frame_count_max * GL_dump_frame_size;
1210-
1211- GL_dump_buffer = (ubyte *)vm_malloc (size);
1212-
1213- if ( !GL_dump_buffer ) {
1214- Error (LOCATION, " Unable to malloc %d bytes for dump buffer" , size );
1215- }
1216- }
1217- }
1218-
1219- void gr_opengl_dump_frame_stop ()
1220- {
1221- if ( !GL_dump_frames ) {
1222- Int3 (); // We're not dumping frames. See John.
1223- return ;
1224- }
1225-
1226- // dump any remaining frames
1227- opengl_flush_frame_dump ();
1228-
1229- GL_dump_frames = 0 ;
1230-
1231- if ( GL_dump_buffer ) {
1232- vm_free (GL_dump_buffer);
1233- GL_dump_buffer = NULL ;
1234- }
1235- }
1236-
1237- void gr_opengl_dump_frame ()
1238- {
1239- GL_dump_frame_count++;
1240-
1241- if ( GL_dump_frame_count == GL_dump_frame_count_max ) {
1242- opengl_flush_frame_dump ();
1243- }
1244- }
1245-
12461149// fill mode, solid/wire frame
12471150void gr_opengl_set_fill_mode (int mode)
12481151{
@@ -1327,13 +1230,6 @@ void gr_opengl_translate_texture_matrix(int unit, const vec3d *shift)
13271230// tex_shift=vmd_zero_vector;
13281231}
13291232
1330- void gr_opengl_setup_background_fog (bool set)
1331- {
1332- if (Cmdline_nohtl) {
1333- return ;
1334- }
1335- }
1336-
13371233void gr_opengl_set_line_width (float width)
13381234{
13391235 glLineWidth (width);
@@ -1798,8 +1694,6 @@ void opengl_setup_function_pointers()
17981694 gr_screen.gf_set_palette = gr_opengl_set_palette;
17991695 gr_screen.gf_print_screen = gr_opengl_print_screen;
18001696
1801- gr_screen.gf_fade_in = gr_opengl_fade_in;
1802- gr_screen.gf_fade_out = gr_opengl_fade_out;
18031697 gr_screen.gf_flash = gr_opengl_flash;
18041698 gr_screen.gf_flash_alpha = gr_opengl_flash_alpha;
18051699
@@ -1816,10 +1710,6 @@ void opengl_setup_function_pointers()
18161710 gr_screen.gf_restore_screen = gr_opengl_restore_screen;
18171711 gr_screen.gf_free_screen = gr_opengl_free_screen;
18181712
1819- gr_screen.gf_dump_frame_start = gr_opengl_dump_frame_start;
1820- gr_screen.gf_dump_frame_stop = gr_opengl_dump_frame_stop;
1821- gr_screen.gf_dump_frame = gr_opengl_dump_frame;
1822-
18231713 gr_screen.gf_set_gamma = gr_opengl_set_gamma;
18241714
18251715 gr_screen.gf_fog_set = gr_opengl_fog_set;
@@ -1913,12 +1803,6 @@ void opengl_setup_function_pointers()
19131803 gr_screen.gf_center_alpha = gr_opengl_center_alpha;
19141804 gr_screen.gf_set_thrust_scale = gr_opengl_set_thrust_scale;
19151805
1916- gr_screen.gf_setup_background_fog = gr_opengl_setup_background_fog;
1917-
1918- gr_screen.gf_start_state_block = gr_opengl_start_state_block;
1919- gr_screen.gf_end_state_block = gr_opengl_end_state_block;
1920- gr_screen.gf_set_state_block = gr_opengl_set_state_block;
1921-
19221806 gr_screen.gf_draw_line_list = gr_opengl_draw_line_list;
19231807
19241808 gr_screen.gf_set_line_width = gr_opengl_set_line_width;
0 commit comments