~ubuntu-branches/ubuntu/trusty/mupen64plus-video-rice/trusty

« back to all changes in this revision

Viewing changes to src/osal_opengl.h

  • Committer: Package Import Robot
  • Author(s): Sven Eckelmann
  • Date: 2013-07-05 22:53:25 UTC
  • mfrom: (1.2.2) (3.1.9 experimental)
  • Revision ID: package-import@ubuntu.com-20130705225325-k0fbb2m44xnrju66
Tags: 2.0-1
* New Upstream Version
* Upload to unstable
* debian/control:
  - Build-Depend on debhelper 9.20130604 for support of parameters when
    detecting targets in dh_auto_*
* debian/rules:
  - Work around new debhelper 9.20130624 dh_auto_{clean,test} behavior
    which is causing a FTBFS by adding an explicit
    override_dh_auto_{clean,test} rule
* debian/watch:
  - Verify new upstream versions using GPG key 954F81B094AA5BB226F5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 
2
 *   Mupen64plus - osal_opengl.h                                           *
 
3
 *   Mupen64Plus homepage: http://code.google.com/p/mupen64plus/           *
 
4
 *   Copyright (C) 2013 Richard Goedeken                                   *
 
5
 *                                                                         *
 
6
 *   This program is free software; you can redistribute it and/or modify  *
 
7
 *   it under the terms of the GNU General Public License as published by  *
 
8
 *   the Free Software Foundation; either version 2 of the License, or     *
 
9
 *   (at your option) any later version.                                   *
 
10
 *                                                                         *
 
11
 *   This program is distributed in the hope that it will be useful,       *
 
12
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 
13
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 
14
 *   GNU General Public License for more details.                          *
 
15
 *                                                                         *
 
16
 *   You should have received a copy of the GNU General Public License     *
 
17
 *   along with this program; if not, write to the                         *
 
18
 *   Free Software Foundation, Inc.,                                       *
 
19
 *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.          *
 
20
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
21
 
 
22
#if !defined(OSAL_OPENGL_H)
 
23
#define OSAL_OPENGL_H
 
24
 
 
25
#include <SDL_config.h>
 
26
 
 
27
#if SDL_VIDEO_OPENGL
 
28
#include <SDL_opengl.h>
 
29
#define GLSL_VERSION "120"
 
30
 
 
31
// Extension names
 
32
#define OSAL_GL_ARB_MULTITEXTURE            "GL_ARB_multitexture"
 
33
#define OSAL_GL_ARB_TEXTURE_ENV_ADD         "GL_ARB_texture_env_add"
 
34
 
 
35
 
 
36
 
 
37
#elif SDL_VIDEO_OPENGL_ES2
 
38
#include <SDL_opengles2.h>
 
39
#define GLSL_VERSION "100"
 
40
 
 
41
// Extension names
 
42
#define OSAL_GL_ARB_MULTITEXTURE            "GL_multitexture"
 
43
#define OSAL_GL_ARB_TEXTURE_ENV_ADD         "GL_texture_env_add"
 
44
 
 
45
// Vertex shader params
 
46
#define VS_POSITION                         0
 
47
#define VS_COLOR                            1
 
48
#define VS_TEXCOORD0                        2
 
49
#define VS_TEXCOORD1                        3
 
50
 
 
51
// Constant substitutions
 
52
#define GL_CLAMP                            GL_CLAMP_TO_EDGE
 
53
#define GL_MAX_TEXTURE_UNITS_ARB            GL_MAX_TEXTURE_IMAGE_UNITS
 
54
#define GL_MIRRORED_REPEAT_ARB              GL_MIRRORED_REPEAT
 
55
#define GL_TEXTURE0_ARB                     GL_TEXTURE0
 
56
#define GL_TEXTURE1_ARB                     GL_TEXTURE1
 
57
#define GL_TEXTURE2_ARB                     GL_TEXTURE2
 
58
#define GL_TEXTURE3_ARB                     GL_TEXTURE3
 
59
#define GL_TEXTURE4_ARB                     GL_TEXTURE4
 
60
#define GL_TEXTURE5_ARB                     GL_TEXTURE5
 
61
#define GL_TEXTURE6_ARB                     GL_TEXTURE6
 
62
#define GL_TEXTURE7_ARB                     GL_TEXTURE7
 
63
 
 
64
#define GL_ADD                              0x0104
 
65
#define GL_MODULATE                         0x2100
 
66
#define GL_INTERPOLATE_ARB                  0x8575
 
67
#define GL_CONSTANT_ARB                     0x8576
 
68
#define GL_PREVIOUS_ARB                     0x8578
 
69
 
 
70
// Function substitutions
 
71
#define glClearDepth                        glClearDepthf
 
72
#define pglActiveTexture                    glActiveTexture
 
73
#define pglActiveTextureARB                 glActiveTexture
 
74
 
 
75
// No-op substitutions (unavailable in GLES2)
 
76
#define glLoadIdentity()
 
77
#define glMatrixMode(x)
 
78
#define glOrtho(a,b,c,d,e,f)
 
79
#define glReadBuffer(x)
 
80
#define glTexEnvi(x,y,z)
 
81
#define glTexEnvfv(x,y,z)
 
82
#define glTexCoord2f(u,v)
 
83
 
 
84
#endif // SDL_VIDEO_OPENGL*
 
85
 
 
86
#endif // OSAL_OPENGL_H