~openmw/openmw/openmw-packaging2

« back to all changes in this revision

Viewing changes to components/sdlutil/sdlgraphicswindow.cpp

  • Committer: Scott Howard
  • Date: 2016-04-16 07:00:56 UTC
  • Revision ID: showard@debian.org-20160416070056-v6l5thn424is72s4
Cron update. Git hash: 1f7a547

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
#include <SDL_video.h>
4
4
 
5
 
#include <osg/Version>
6
 
 
7
5
namespace SDLUtil
8
6
{
9
7
 
93
91
    SDL_Window *oldWin = SDL_GL_GetCurrentWindow();
94
92
    SDL_GLContext oldCtx = SDL_GL_GetCurrentContext();
95
93
   
96
 
#ifdef OPENGL_ES
 
94
#if defined(OPENGL_ES) || defined(ANDROID)
97
95
     SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES);
98
96
     SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 1);
99
97
     SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 1);    
112
110
 
113
111
    mValid = true;
114
112
 
115
 
#if OSG_VERSION_GREATER_OR_EQUAL(3,3,4)
116
113
    getEventQueue()->syncWindowRectangleWithGraphicsContext();
117
 
#else
118
 
    getEventQueue()->syncWindowRectangleWithGraphcisContext();
119
 
#endif
120
114
}
121
115
 
122
116
 
133
127
 
134
128
    SDL_ShowWindow(mWindow);
135
129
 
136
 
#if OSG_VERSION_GREATER_OR_EQUAL(3,3,4)
137
130
    getEventQueue()->syncWindowRectangleWithGraphicsContext();
138
 
#else
139
 
    getEventQueue()->syncWindowRectangleWithGraphcisContext();
140
 
#endif
141
131
 
142
132
    mRealized = true;
143
133