fghChooseConfigEGL returns 1/0 if found/not found
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1177 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
6a05cd0a10
commit
b4115920d4
@ -26,7 +26,7 @@
|
|||||||
#include <GL/freeglut.h>
|
#include <GL/freeglut.h>
|
||||||
#include "fg_internal.h"
|
#include "fg_internal.h"
|
||||||
|
|
||||||
void fghChooseConfigEGL(EGLConfig* config) {
|
int fghChooseConfigEGL(EGLConfig* config) {
|
||||||
const EGLint attribs[] = {
|
const EGLint attribs[] = {
|
||||||
EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
|
EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
|
||||||
#ifdef GL_ES_VERSION_2_0
|
#ifdef GL_ES_VERSION_2_0
|
||||||
@ -49,8 +49,12 @@ void fghChooseConfigEGL(EGLConfig* config) {
|
|||||||
|
|
||||||
EGLint num_config;
|
EGLint num_config;
|
||||||
if (!eglChooseConfig(fgDisplay.pDisplay.egl.Display,
|
if (!eglChooseConfig(fgDisplay.pDisplay.egl.Display,
|
||||||
attribs, config, 1, &num_config))
|
attribs, config, 1, &num_config)) {
|
||||||
fgError("eglChooseConfig: error %x\n", eglGetError());
|
fgWarn("eglChooseConfig: error %x\n", eglGetError());
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
#ifndef __FG_WINDOW_EGL_H__
|
#ifndef __FG_WINDOW_EGL_H__
|
||||||
#define __FG_WINDOW_EGL_H__
|
#define __FG_WINDOW_EGL_H__
|
||||||
|
|
||||||
extern void fghChooseConfigEGL(EGLConfig* config);
|
extern int fghChooseConfigEGL(EGLConfig* config);
|
||||||
extern void fghPlatformOpenWindowEGL( SFG_Window* window );
|
extern void fghPlatformOpenWindowEGL( SFG_Window* window );
|
||||||
extern void fghCreateNewContextEGL( SFG_Window* window );
|
extern void fghCreateNewContextEGL( SFG_Window* window );
|
||||||
extern void fghPlatformCloseWindowEGL( SFG_Window* window );
|
extern void fghPlatformCloseWindowEGL( SFG_Window* window );
|
||||||
|
Reference in New Issue
Block a user