ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/MacOSX/video_macosx.h
Revision: 1.4
Committed: 2002-12-18T12:05:48Z (21 years, 11 months ago) by nigel
Content type: text/plain
Branch: MAIN
Changes since 1.3: +24 -4 lines
Log Message:
Better comments about drawing strategies,
new define to specify using the alpha channel

File Contents

# User Rev Content
1 nigel 1.1 /*
2     * video_macosx.h - Some video constants and globals
3     *
4 nigel 1.4 * $Id: video_macosx.h,v 1.3 2002/06/02 12:20:38 nigel Exp $
5 nigel 1.1 *
6     * Basilisk II (C) 1997-2001 Christian Bauer
7     *
8     * This program is free software; you can redistribute it and/or modify
9     * it under the terms of the GNU General Public License as published by
10     * the Free Software Foundation; either version 2 of the License, or
11     * (at your option) any later version.
12     *
13     * This program is distributed in the hope that it will be useful,
14     * but WITHOUT ANY WARRANTY; without even the implied warranty of
15     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16     * GNU General Public License for more details.
17     *
18     * You should have received a copy of the GNU General Public License
19     * along with this program; if not, write to the Free Software
20     * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21     */
22    
23     #import <video.h>
24    
25     /* Set the strategy for drawing the bitmap in the Mac OS X window */
26 nigel 1.4 #define CGDRAWBITMAP
27     //#define CGIMAGEREF
28     //#define NSBITMAP
29    
30     // The frames-per-second benchmark function on my machine does roughly:
31     //
32     // OS: 10.1.5 10.2.2
33     // CGDRAWBITMAP 15.2 36.6
34     // CGIMAGEREF 15.0 27-135(i)
35     // NSBITMAP 15.1 26.9
36     //
37     // (i) This seems to vary wildly between different builds on the same machine.
38     // I don't know why, but I definately don't trust it. Recently I noticed
39     // that it also varies by alpha channel strategy:
40     // kCGImageAlphaNone 36.6fps
41     // kCGImageAlphaPremultipliedFirst 112fps
42     // kCGImageAlphaNoneSkipFirst 135fps
43    
44     /* When the BasiliskII video driver respects the alpha bits, set this to let us use */
45     /* kCGImageAlphaPremultipliedFirst, and to have nice rounded corners on the screen. */
46     //#define CG_USE_ALPHA
47     /* At the moment, it writes in the fill 32bits :-( */
48    
49 nigel 1.1
50     #define MIN_WIDTH 512
51     #define MIN_HEIGHT 342
52    
53     #define MAX_WIDTH 1240
54     #define MAX_HEIGHT 1024
55    
56     // Display types
57     enum
58     {
59     DISPLAY_OPENGL,
60     DISPLAY_SCREEN,
61     DISPLAY_WINDOW
62     };
63    
64    
65     extern uint8 display_type,
66     frame_skip;
67     extern uint16 init_width,
68     init_height,
69 nigel 1.3 init_depth;
70 nigel 1.1
71     extern bool parse_screen_prefs (const char *);
72     extern void resizeWinTo (const uint16, const uint16);
73    
74     #import <AppKit/NSWindow.h>
75     #import "EmulatorView.h"
76    
77     extern NSWindow *the_win;
78     extern EmulatorView *output;