Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Adds gl_profile_mask to test framework, uses it in testgles
  • Loading branch information
gabomdq committed Oct 10, 2013
1 parent d0fddfa commit 8913143
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions include/SDL_test_common.h
Expand Up @@ -108,6 +108,7 @@ typedef struct
int gl_major_version;
int gl_minor_version;
int gl_debug;
int gl_profile_mask;
} SDLTest_CommonState;

#include "begin_code.h"
Expand Down
3 changes: 3 additions & 0 deletions src/test/SDL_test_common.c
Expand Up @@ -695,6 +695,9 @@ SDLTest_CommonInit(SDLTest_CommonState * state)
if (state->gl_debug) {
SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_DEBUG_FLAG);
}
if (state->gl_profile_mask) {
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, state->gl_profile_mask);
}

if (state->verbose & VERBOSE_MODES) {
SDL_Rect bounds;
Expand Down
3 changes: 1 addition & 2 deletions test/testgles.c
Expand Up @@ -161,6 +161,7 @@ main(int argc, char *argv[])
state->gl_depth_size = depth;
state->gl_major_version = 1;
state->gl_minor_version = 1;
state->gl_profile_mask = SDL_GL_CONTEXT_PROFILE_ES;
if (fsaa) {
state->gl_multisamplebuffers=1;
state->gl_multisamplesamples=fsaa;
Expand All @@ -179,8 +180,6 @@ main(int argc, char *argv[])
}

/* Create OpenGL ES contexts */
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES);

for (i = 0; i < state->num_windows; i++) {
context[i] = SDL_GL_CreateContext(state->windows[i]);
if (!context[i]) {
Expand Down

0 comments on commit 8913143

Please sign in to comment.