1 /*
2  * AGL_DSp.h
3  * Copyright (C) 2007 by Bryan Duff <duff0097@gmail.com>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
18  * USA
19  */
20 
21 #pragma once
22 
23 #ifndef _AGL_DSP_H_
24 #define _AGL_DSP_H_
25 
26 
27 /**> HEADER FILES <**/
28 #include <stdlib.h>             // ANSI C cross platform headers
29 #include <stdio.h>
30 #include <DrawSprocket.h>       // DrawSprocket
31 #include <agl.h>                // Apple's OpenGL
32 #include <glu.h>                // Used for setting perspective and making objects
33 #include <tk.h>                 // Used for loading images
34 
35 
36 /**> CONSTANT DECLARATIONS <**/
37 #define	kMoveToFront		kFirstWindowOfClass
38 
39 // Screen Dimensions
40 #define SCREEN_WIDTH		640
41 #define SCREEN_HEIGHT		480
42 
43 
44 /**> GLOBAL VARIABLES <**/
45 extern DSpContextAttributes gDSpContextAttributes;      // Global DrawSprocket context attributes
46 extern DSpContextReference gDSpContext; // The global DrawSprocket context
47 extern AGLContext gOpenGLContext;       // The global OpenGL (AGL) context
48                                                                                                                 // Note: These are actually defined in AGL_DSp.cpp
49 
50 
51 /**> FUNCTION PROTOTYPES <**/
52 void ToolboxInit(void);
53 Boolean HasAppearance(void);
54 CGrafPtr SetupScreen(int width, int height);
55 void CreateWindow(CGrafPtr & theFrontBuffer, int width, int height);
56 void ShutdownScreen(CGrafPtr theFrontBuffer);
57 AGLContext SetupAGL(AGLDrawable window);
58 void CleanupAGL(AGLContext context);
59 
60 
61 #endif
62