Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 869686 | Differences between
and this patch

Collapse All | Expand All

(-)a/CMakeLists.txt (-6 / +25 lines)
Lines 101-106 cmake_dependent_option(COIN_BUILD_MAC_FRAMEWORK "Build framework instead of dyli Link Here
101
cmake_dependent_option(COIN_BUILD_MAC_X11 "Build for X11 on Mac OS X when ON. Default is OFF." OFF "APPLE" OFF)
101
cmake_dependent_option(COIN_BUILD_MAC_X11 "Build for X11 on Mac OS X when ON. Default is OFF." OFF "APPLE" OFF)
102
cmake_dependent_option(COIN_BUILD_MAC_AGL "Build for AGL on Mac OS X when ON. Default is OFF." OFF "APPLE" OFF)
102
cmake_dependent_option(COIN_BUILD_MAC_AGL "Build for AGL on Mac OS X when ON. Default is OFF." OFF "APPLE" OFF)
103
103
104
option(COIN_BUILD_EGL "Build for EGL on Linux when ON. Default is OFF." OFF)
105
104
report_prepare(
106
report_prepare(
105
  COIN_BUILD_SHARED_LIBS
107
  COIN_BUILD_SHARED_LIBS
106
  COIN_BUILD_TESTS
108
  COIN_BUILD_TESTS
Lines 109-114 report_prepare( Link Here
109
  COIN_BUILD_DOCUMENTATION_MAN
111
  COIN_BUILD_DOCUMENTATION_MAN
110
  COIN_BUILD_DOCUMENTATION_QTHELP
112
  COIN_BUILD_DOCUMENTATION_QTHELP
111
  COIN_BUILD_DOCUMENTATION_CHM
113
  COIN_BUILD_DOCUMENTATION_CHM
114
  COIN_BUILD_EGL
112
  COIN_THREADSAFE
115
  COIN_THREADSAFE
113
  HAVE_VRML97
116
  HAVE_VRML97
114
  COIN_HAVE_JAVASCRIPT
117
  COIN_HAVE_JAVASCRIPT
Lines 195-201 if(COIN_BUILD_MAC_X11) Link Here
195
    list(APPEND COIN_TARGET_LINK_LIBRARIES ${X11_LIBRARIES} ${X11_GL_LIB} ${X11_GLU_LIB})
198
    list(APPEND COIN_TARGET_LINK_LIBRARIES ${X11_LIBRARIES} ${X11_GL_LIB} ${X11_GLU_LIB})
196
  endif()
199
  endif()
197
else()
200
else()
198
  if(UNIX AND NOT APPLE)
201
  if(UNIX AND NOT APPLE AND NOT COIN_BUILD_EGL)
199
    find_package(X11 REQUIRED)
202
    find_package(X11 REQUIRED)
200
    list(APPEND COIN_TARGET_INCLUDE_DIRECTORIES ${X11_INCLUDE_DIR})
203
    list(APPEND COIN_TARGET_INCLUDE_DIRECTORIES ${X11_INCLUDE_DIR})
201
    list(APPEND COIN_TARGET_LINK_LIBRARIES ${X11_LIBRARIES})
204
    list(APPEND COIN_TARGET_LINK_LIBRARIES ${X11_LIBRARIES})
Lines 204-211 else() Link Here
204
  if(OPENGL_FOUND)
207
  if(OPENGL_FOUND)
205
    set(HAVE_OPENGL 1)
208
    set(HAVE_OPENGL 1)
206
    set(OPENGL_SYSTEM_LIBRARY_NAME "${OPENGL_gl_LIBRARY}${CMAKE_SHARED_LIBRARY_SUFFIX}")
209
    set(OPENGL_SYSTEM_LIBRARY_NAME "${OPENGL_gl_LIBRARY}${CMAKE_SHARED_LIBRARY_SUFFIX}")
207
    if(OpenGL_GLU_FOUND)
210
    if(COIN_BUILD_EGL AND OpenGL_EGL_FOUND)
208
      set(HAVE_GLU 1)
211
      set(HAVE_EGL 1)
212
      set(HAVE_GLX 0)
213
      if (NOT TARGET OpenGL::EGL)
214
        list(APPEND COIN_TARGET_INCLUDE_DIRECTORIES ${OPENGL_EGL_INCLUDE_DIR})
215
        list(APPEND COIN_TARGET_LINK_LIBRARIES ${OPENGL_egl_LIBRARY})
216
      else()
217
        list(APPEND COIN_TARGET_LINK_LIBRARIES OpenGL::EGL)
218
      endif()
209
    endif()
219
    endif()
210
    if(APPLE)
220
    if(APPLE)
211
      set(GLU_IS_PART_OF_GL 1)
221
      set(GLU_IS_PART_OF_GL 1)
Lines 213-221 else() Link Here
213
    #include_directories("${OPENGL_INCLUDE_DIR}")
223
    #include_directories("${OPENGL_INCLUDE_DIR}")
214
    if (NOT TARGET OpenGL::GL)
224
    if (NOT TARGET OpenGL::GL)
215
      list(APPEND COIN_TARGET_INCLUDE_DIRECTORIES ${OPENGL_INCLUDE_DIR})
225
      list(APPEND COIN_TARGET_INCLUDE_DIRECTORIES ${OPENGL_INCLUDE_DIR})
216
      list(APPEND COIN_TARGET_LINK_LIBRARIES ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY})
226
      list(APPEND COIN_TARGET_LINK_LIBRARIES ${OPENGL_gl_LIBRARY})
217
    else()
227
    else()
218
      list(APPEND COIN_TARGET_LINK_LIBRARIES OpenGL::GL OpenGL::GLU)
228
      list(APPEND COIN_TARGET_LINK_LIBRARIES OpenGL::GL)
229
    endif()
230
    if(OpenGL_GLU_FOUND AND NOT COIN_BUILD_EGL)
231
      set(HAVE_GLU 1)
232
      if (NOT TARGET OpenGL::GLU)
233
        list(APPEND COIN_TARGET_INCLUDE_DIRECTORIES ${OPENGL_INCLUDE_DIR})
234
        list(APPEND COIN_TARGET_LINK_LIBRARIES ${OPENGL_glu_LIBRARY})
235
      else()
236
        list(APPEND COIN_TARGET_LINK_LIBRARIES OpenGL::GLU)
237
      endif()
219
    endif()
238
    endif()
220
  endif()
239
  endif()
221
endif()
240
endif()
Lines 667-673 elseif(APPLE) Link Here
667
  endif()
686
  endif()
668
endif()
687
endif()
669
688
670
if(NOT (HAVE_WGL OR HAVE_AGL OR HAVE_CGL OR HAVE_GLX))
689
if(NOT (HAVE_WGL OR HAVE_AGL OR HAVE_CGL OR HAVE_GLX OR HAVE_EGL))
671
  if (NOT TARGET OpenGL::GLX)
690
  if (NOT TARGET OpenGL::GLX)
672
    if (OPENGL_glx_LIBRARY)
691
    if (OPENGL_glx_LIBRARY)
673
      list(APPEND COIN_TARGET_LINK_LIBRARIES ${OPENGL_glx_LIBRARY})
692
      list(APPEND COIN_TARGET_LINK_LIBRARIES ${OPENGL_glx_LIBRARY})
(-)a/aclocal.m4 (+28 lines)
Lines 11494-11499 else Link Here
11494
fi
11494
fi
11495
]) # SIM_AC_HAVE_CGL_IFELSE()
11495
]) # SIM_AC_HAVE_CGL_IFELSE()
11496
11496
11497
# **************************************************************************
11498
# SIM_AC_HAVE_EGL_IFELSE( IF-FOUND, IF-NOT-FOUND )
11499
#
11500
# Check whether EGL is on the system.
11501
11502
AC_DEFUN([SIM_AC_HAVE_EGL_IFELSE], [
11503
sim_ac_save_libs=$LIBS
11504
sim_ac_egl_libs="-lEGL"
11505
LIBS="$LIBS $sim_ac_egl_libs"
11506
11507
AC_CACHE_CHECK(
11508
  [whether EGL is on the system],
11509
  sim_cv_have_egl,
11510
  AC_TRY_LINK(
11511
    [#include <EGL/egl.h>
11512
     #include <EGL/eglext.h>],
11513
    [eglGetError();],
11514
    [sim_cv_have_egl=true],
11515
    [sim_cv_have_egl=false]))
11516
11517
LIBS="$LIBS $sim_ac_egl_libs"
11518
if ${sim_cv_have_egl=false}; then
11519
  ifelse([$1], , :, [$1])
11520
else
11521
  ifelse([$2], , :, [$2])
11522
fi
11523
]) # SIM_AC_HAVE_EGL_IFELSE()
11524
11497
# Usage:
11525
# Usage:
11498
#  SIM_AC_PACKAGEMAKER_APP([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
11526
#  SIM_AC_PACKAGEMAKER_APP([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
11499
#
11527
#
(-)a/build/msvc10/src/config-debug.h (+3 lines)
Lines 124-129 Link Here
124
/* define if you have CGL OpenGL bindings */
124
/* define if you have CGL OpenGL bindings */
125
/* #undef HAVE_CGL */
125
/* #undef HAVE_CGL */
126
126
127
/* define if you have EGL bindings */
128
/* #undef HAVE_EGL */
129
127
/* The CPP compiler has a variable containing the current function name */
130
/* The CPP compiler has a variable containing the current function name */
128
#define HAVE_CPP_COMPILER_FUNCTION_NAME_VAR __FUNCTION__
131
#define HAVE_CPP_COMPILER_FUNCTION_NAME_VAR __FUNCTION__
129
132
(-)a/build/msvc10/src/config-release.h (+3 lines)
Lines 124-129 Link Here
124
/* define if you have CGL OpenGL bindings */
124
/* define if you have CGL OpenGL bindings */
125
/* #undef HAVE_CGL */
125
/* #undef HAVE_CGL */
126
126
127
/* define if you have EGL bindings */
128
/* #undef HAVE_EGL */
129
127
/* The CPP compiler has a variable containing the current function name */
130
/* The CPP compiler has a variable containing the current function name */
128
#define HAVE_CPP_COMPILER_FUNCTION_NAME_VAR __FUNCTION__
131
#define HAVE_CPP_COMPILER_FUNCTION_NAME_VAR __FUNCTION__
129
132
(-)a/build/msvc6/src/config-debug.h (+3 lines)
Lines 124-129 Link Here
124
/* define if you have CGL OpenGL bindings */
124
/* define if you have CGL OpenGL bindings */
125
/* #undef HAVE_CGL */
125
/* #undef HAVE_CGL */
126
126
127
/* define if you have EGL bindings */
128
/* #undef HAVE_EGL */
129
127
/* The CPP compiler has a variable containing the current function name */
130
/* The CPP compiler has a variable containing the current function name */
128
/* #undef HAVE_CPP_COMPILER_FUNCTION_NAME_VAR */
131
/* #undef HAVE_CPP_COMPILER_FUNCTION_NAME_VAR */
129
132
(-)a/build/msvc6/src/config-release.h (+3 lines)
Lines 124-129 Link Here
124
/* define if you have CGL OpenGL bindings */
124
/* define if you have CGL OpenGL bindings */
125
/* #undef HAVE_CGL */
125
/* #undef HAVE_CGL */
126
126
127
/* define if you have EGL bindings */
128
/* #undef HAVE_EGL */
129
127
/* The CPP compiler has a variable containing the current function name */
130
/* The CPP compiler has a variable containing the current function name */
128
/* #undef HAVE_CPP_COMPILER_FUNCTION_NAME_VAR */
131
/* #undef HAVE_CPP_COMPILER_FUNCTION_NAME_VAR */
129
132
(-)a/build/msvc7/src/config-debug.h (+3 lines)
Lines 124-129 Link Here
124
/* define if you have CGL OpenGL bindings */
124
/* define if you have CGL OpenGL bindings */
125
/* #undef HAVE_CGL */
125
/* #undef HAVE_CGL */
126
126
127
/* define if you have EGL bindings */
128
/* #undef HAVE_EGL */
129
127
/* The CPP compiler has a variable containing the current function name */
130
/* The CPP compiler has a variable containing the current function name */
128
#define HAVE_CPP_COMPILER_FUNCTION_NAME_VAR __FUNCTION__
131
#define HAVE_CPP_COMPILER_FUNCTION_NAME_VAR __FUNCTION__
129
132
(-)a/build/msvc7/src/config-release.h (+3 lines)
Lines 124-129 Link Here
124
/* define if you have CGL OpenGL bindings */
124
/* define if you have CGL OpenGL bindings */
125
/* #undef HAVE_CGL */
125
/* #undef HAVE_CGL */
126
126
127
/* define if you have EGL bindings */
128
/* #undef HAVE_EGL */
129
127
/* The CPP compiler has a variable containing the current function name */
130
/* The CPP compiler has a variable containing the current function name */
128
#define HAVE_CPP_COMPILER_FUNCTION_NAME_VAR __FUNCTION__
131
#define HAVE_CPP_COMPILER_FUNCTION_NAME_VAR __FUNCTION__
129
132
(-)a/build/msvc8/src/config-debug.h (+3 lines)
Lines 124-129 Link Here
124
/* define if you have CGL OpenGL bindings */
124
/* define if you have CGL OpenGL bindings */
125
/* #undef HAVE_CGL */
125
/* #undef HAVE_CGL */
126
126
127
/* define if you have EGL bindings */
128
/* #undef HAVE_EGL */
129
127
/* The CPP compiler has a variable containing the current function name */
130
/* The CPP compiler has a variable containing the current function name */
128
#define HAVE_CPP_COMPILER_FUNCTION_NAME_VAR __FUNCTION__
131
#define HAVE_CPP_COMPILER_FUNCTION_NAME_VAR __FUNCTION__
129
132
(-)a/build/msvc8/src/config-release.h (+3 lines)
Lines 124-129 Link Here
124
/* define if you have CGL OpenGL bindings */
124
/* define if you have CGL OpenGL bindings */
125
/* #undef HAVE_CGL */
125
/* #undef HAVE_CGL */
126
126
127
/* define if you have EGL bindings */
128
/* #undef HAVE_EGL */
129
127
/* The CPP compiler has a variable containing the current function name */
130
/* The CPP compiler has a variable containing the current function name */
128
#define HAVE_CPP_COMPILER_FUNCTION_NAME_VAR __FUNCTION__
131
#define HAVE_CPP_COMPILER_FUNCTION_NAME_VAR __FUNCTION__
129
132
(-)a/build/msvc9/src/config-debug.h (+3 lines)
Lines 124-129 Link Here
124
/* define if you have CGL OpenGL bindings */
124
/* define if you have CGL OpenGL bindings */
125
/* #undef HAVE_CGL */
125
/* #undef HAVE_CGL */
126
126
127
/* define if you have EGL bindings */
128
/* #undef HAVE_EGL */
129
127
/* The CPP compiler has a variable containing the current function name */
130
/* The CPP compiler has a variable containing the current function name */
128
#define HAVE_CPP_COMPILER_FUNCTION_NAME_VAR __FUNCTION__
131
#define HAVE_CPP_COMPILER_FUNCTION_NAME_VAR __FUNCTION__
129
132
(-)a/build/msvc9/src/config-release.h (+3 lines)
Lines 124-129 Link Here
124
/* define if you have CGL OpenGL bindings */
124
/* define if you have CGL OpenGL bindings */
125
/* #undef HAVE_CGL */
125
/* #undef HAVE_CGL */
126
126
127
/* define if you have EGL bindings */
128
/* #undef HAVE_EGL */
129
127
/* The CPP compiler has a variable containing the current function name */
130
/* The CPP compiler has a variable containing the current function name */
128
#define HAVE_CPP_COMPILER_FUNCTION_NAME_VAR __FUNCTION__
131
#define HAVE_CPP_COMPILER_FUNCTION_NAME_VAR __FUNCTION__
129
132
(-)a/src/config.h.cmake.in (+3 lines)
Lines 121-126 Link Here
121
/* define if you have CGL OpenGL bindings */
121
/* define if you have CGL OpenGL bindings */
122
#cmakedefine HAVE_CGL
122
#cmakedefine HAVE_CGL
123
123
124
/* define if you have EGL OpenGL bindings */
125
#cmakedefine HAVE_EGL
126
124
/* define if you have the CoreText framework */
127
/* define if you have the CoreText framework */
125
#cmakedefine HAVE_CORETEXT
128
#cmakedefine HAVE_CORETEXT
126
129
(-)a/src/config.h.in (+3 lines)
Lines 123-128 Link Here
123
/* define if you have CGL OpenGL bindings */
123
/* define if you have CGL OpenGL bindings */
124
#undef HAVE_CGL
124
#undef HAVE_CGL
125
125
126
/* define if you have EGL OpenGL bindings */
127
#undef HAVE_EGL
128
126
/* define if you have the CoreText framework */
129
/* define if you have the CoreText framework */
127
#undef HAVE_CORETEXT
130
#undef HAVE_CORETEXT
128
131
(-)a/src/discard.h.in (+3 lines)
Lines 402-407 Link Here
402
/* define if vsnprintf() is available */
402
/* define if vsnprintf() is available */
403
#undef HAVE_VSNPRINTF
403
#undef HAVE_VSNPRINTF
404
404
405
/* define if you have EGL OpenGL bindings */
406
#undef HAVE_EGL
407
405
/* define if you have WGL Win32 OpenGL bindings */
408
/* define if you have WGL Win32 OpenGL bindings */
406
#undef HAVE_WGL
409
#undef HAVE_WGL
407
410
(-)a/src/glue/CMakeLists.txt (+3 lines)
Lines 7-12 set(COIN_GLUE_FILES Link Here
7
	gl_wgl.cpp
7
	gl_wgl.cpp
8
	gl_agl.cpp
8
	gl_agl.cpp
9
	gl_cgl.cpp
9
	gl_cgl.cpp
10
	gl_egl.cpp
10
	gl_glx.cpp
11
	gl_glx.cpp
11
	GLUWrapper.cpp
12
	GLUWrapper.cpp
12
	simage_wrapper.cpp
13
	simage_wrapper.cpp
Lines 29-34 set(COIN_GLUE_INTERNAL_FILES Link Here
29
	gl_agl.cpp
30
	gl_agl.cpp
30
	gl_cgl.h
31
	gl_cgl.h
31
	gl_cgl.cpp
32
	gl_cgl.cpp
33
	gl_egl.h
34
	gl_egl.cpp
32
	gl_glx.h
35
	gl_glx.h
33
	gl_glx.cpp
36
	gl_glx.cpp
34
	GLUWrapper.h
37
	GLUWrapper.h
(-)a/src/glue/Makefile.am (-1 / +2 lines)
Lines 3-9 RegularSources = \ Link Here
3
	spidermonkey.cpp \
3
	spidermonkey.cpp \
4
	dl.cpp \
4
	dl.cpp \
5
	gl.cpp \
5
	gl.cpp \
6
	gl_wgl.cpp gl_agl.cpp gl_cgl.cpp gl_glx.cpp \
6
	gl_wgl.cpp gl_agl.cpp gl_cgl.cpp gl_egl.cpp gl_glx.cpp \
7
	GLUWrapper.cpp \
7
	GLUWrapper.cpp \
8
	simage_wrapper.cpp \
8
	simage_wrapper.cpp \
9
	openal_wrapper.cpp \
9
	openal_wrapper.cpp \
Lines 26-31 PrivateHeaders = \ Link Here
26
	freetype.h \
26
	freetype.h \
27
	gl_agl.h \
27
	gl_agl.h \
28
	gl_cgl.h \
28
	gl_cgl.h \
29
	gl_egl.h \
29
	gl_glx.h \
30
	gl_glx.h \
30
	gl_wgl.h \
31
	gl_wgl.h \
31
	glp.h \
32
	glp.h \
(-)a/src/glue/Makefile.in (-14 / +18 lines)
Lines 57-69 ARFLAGS = cru Link Here
57
glue_lst_AR = $(AR) $(ARFLAGS)
57
glue_lst_AR = $(AR) $(ARFLAGS)
58
glue_lst_LIBADD =
58
glue_lst_LIBADD =
59
am__glue_lst_SOURCES_DIST = cg.cpp spidermonkey.cpp dl.cpp gl.cpp \
59
am__glue_lst_SOURCES_DIST = cg.cpp spidermonkey.cpp dl.cpp gl.cpp \
60
	gl_wgl.cpp gl_agl.cpp gl_cgl.cpp gl_glx.cpp GLUWrapper.cpp \
60
	gl_wgl.cpp gl_agl.cpp gl_cgl.cpp gl_egl.cpp gl_glx.cpp GLUWrapper.cpp \
61
	simage_wrapper.cpp openal_wrapper.cpp win32api.cpp zlib.cpp \
61
	simage_wrapper.cpp openal_wrapper.cpp win32api.cpp zlib.cpp \
62
	bzip2.cpp freetype.cpp normalization_cubemap.cpp \
62
	bzip2.cpp freetype.cpp normalization_cubemap.cpp \
63
	all-glue-cpp.cpp
63
	all-glue-cpp.cpp
64
am__objects_1 = cg.$(OBJEXT) spidermonkey.$(OBJEXT) dl.$(OBJEXT) \
64
am__objects_1 = cg.$(OBJEXT) spidermonkey.$(OBJEXT) dl.$(OBJEXT) \
65
	gl.$(OBJEXT) gl_wgl.$(OBJEXT) gl_agl.$(OBJEXT) \
65
	gl.$(OBJEXT) gl_wgl.$(OBJEXT) gl_agl.$(OBJEXT) gl_cgl.$(OBJEXT) \
66
	gl_cgl.$(OBJEXT) gl_glx.$(OBJEXT) GLUWrapper.$(OBJEXT) \
66
	gl_egl.$(OBJEXT) gl_glx.$(OBJEXT) GLUWrapper.$(OBJEXT) \
67
	simage_wrapper.$(OBJEXT) openal_wrapper.$(OBJEXT) \
67
	simage_wrapper.$(OBJEXT) openal_wrapper.$(OBJEXT) \
68
	win32api.$(OBJEXT) zlib.$(OBJEXT) bzip2.$(OBJEXT) \
68
	win32api.$(OBJEXT) zlib.$(OBJEXT) bzip2.$(OBJEXT) \
69
	freetype.$(OBJEXT) normalization_cubemap.$(OBJEXT)
69
	freetype.$(OBJEXT) normalization_cubemap.$(OBJEXT)
Lines 72-81 am__objects_2 = all-glue-cpp.$(OBJEXT) Link Here
72
@HACKING_COMPACT_BUILD_TRUE@am__objects_3 = $(am__objects_2)
72
@HACKING_COMPACT_BUILD_TRUE@am__objects_3 = $(am__objects_2)
73
am_glue_lst_OBJECTS = $(am__objects_3)
73
am_glue_lst_OBJECTS = $(am__objects_3)
74
am__EXTRA_glue_lst_SOURCES_DIST = GLUWrapper.h bzip2.h cg.h dlp.h \
74
am__EXTRA_glue_lst_SOURCES_DIST = GLUWrapper.h bzip2.h cg.h dlp.h \
75
	freetype.h gl_agl.h gl_cgl.h gl_glx.h gl_wgl.h glp.h \
75
	freetype.h gl_agl.h gl_cgl.h gl_egl.h gl_glx.h gl_wgl.h glp.h \
76
	openal_wrapper.h simage_wrapper.h win32api.h zlib.h \
76
	openal_wrapper.h simage_wrapper.h win32api.h zlib.h \
77
	all-glue-cpp.cpp cg.cpp spidermonkey.cpp dl.cpp gl.cpp \
77
	all-glue-cpp.cpp cg.cpp spidermonkey.cpp dl.cpp gl.cpp \
78
	gl_wgl.cpp gl_agl.cpp gl_cgl.cpp gl_glx.cpp GLUWrapper.cpp \
78
	gl_wgl.cpp gl_agl.cpp gl_cgl.cpp gl_egl.cpp gl_glx.cpp GLUWrapper.cpp \
79
	simage_wrapper.cpp openal_wrapper.cpp win32api.cpp zlib.cpp \
79
	simage_wrapper.cpp openal_wrapper.cpp win32api.cpp zlib.cpp \
80
	bzip2.cpp freetype.cpp normalization_cubemap.cpp
80
	bzip2.cpp freetype.cpp normalization_cubemap.cpp
81
glue_lst_OBJECTS = $(am_glue_lst_OBJECTS)
81
glue_lst_OBJECTS = $(am_glue_lst_OBJECTS)
Lines 84-95 libLTLIBRARIES_INSTALL = $(INSTALL) Link Here
84
LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
84
LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
85
libglue_la_LIBADD =
85
libglue_la_LIBADD =
86
am__libglue_la_SOURCES_DIST = cg.cpp spidermonkey.cpp dl.cpp gl.cpp \
86
am__libglue_la_SOURCES_DIST = cg.cpp spidermonkey.cpp dl.cpp gl.cpp \
87
	gl_wgl.cpp gl_agl.cpp gl_cgl.cpp gl_glx.cpp GLUWrapper.cpp \
87
	gl_wgl.cpp gl_agl.cpp gl_cgl.cpp gl_egl.cpp gl_glx.cpp GLUWrapper.cpp \
88
	simage_wrapper.cpp openal_wrapper.cpp win32api.cpp zlib.cpp \
88
	simage_wrapper.cpp openal_wrapper.cpp win32api.cpp zlib.cpp \
89
	bzip2.cpp freetype.cpp normalization_cubemap.cpp \
89
	bzip2.cpp freetype.cpp normalization_cubemap.cpp \
90
	all-glue-cpp.cpp
90
	all-glue-cpp.cpp
91
am__objects_6 = cg.lo spidermonkey.lo dl.lo gl.lo gl_wgl.lo gl_agl.lo \
91
am__objects_6 = cg.lo spidermonkey.lo dl.lo gl.lo gl_wgl.lo gl_agl.lo \
92
	gl_cgl.lo gl_glx.lo GLUWrapper.lo simage_wrapper.lo \
92
	gl_cgl.lo gl_egl.lo gl_glx.lo GLUWrapper.lo simage_wrapper.lo \
93
	openal_wrapper.lo win32api.lo zlib.lo bzip2.lo freetype.lo \
93
	openal_wrapper.lo win32api.lo zlib.lo bzip2.lo freetype.lo \
94
	normalization_cubemap.lo
94
	normalization_cubemap.lo
95
am__objects_7 = all-glue-cpp.lo
95
am__objects_7 = all-glue-cpp.lo
Lines 97-121 am__objects_7 = all-glue-cpp.lo Link Here
97
@HACKING_COMPACT_BUILD_TRUE@am__objects_8 = $(am__objects_7)
97
@HACKING_COMPACT_BUILD_TRUE@am__objects_8 = $(am__objects_7)
98
am_libglue_la_OBJECTS = $(am__objects_8)
98
am_libglue_la_OBJECTS = $(am__objects_8)
99
am__EXTRA_libglue_la_SOURCES_DIST = GLUWrapper.h bzip2.h cg.h dlp.h \
99
am__EXTRA_libglue_la_SOURCES_DIST = GLUWrapper.h bzip2.h cg.h dlp.h \
100
	freetype.h gl_agl.h gl_cgl.h gl_glx.h gl_wgl.h glp.h \
100
	freetype.h gl_agl.h gl_cgl.h gl_egl.h gl_glx.h gl_wgl.h glp.h \
101
	openal_wrapper.h simage_wrapper.h win32api.h zlib.h \
101
	openal_wrapper.h simage_wrapper.h win32api.h zlib.h \
102
	all-glue-cpp.cpp cg.cpp spidermonkey.cpp dl.cpp gl.cpp \
102
	all-glue-cpp.cpp cg.cpp spidermonkey.cpp dl.cpp gl.cpp \
103
	gl_wgl.cpp gl_agl.cpp gl_cgl.cpp gl_glx.cpp GLUWrapper.cpp \
103
	gl_wgl.cpp gl_agl.cpp gl_cgl.cpp gl_egl.cpp gl_glx.cpp GLUWrapper.cpp \
104
	simage_wrapper.cpp openal_wrapper.cpp win32api.cpp zlib.cpp \
104
	simage_wrapper.cpp openal_wrapper.cpp win32api.cpp zlib.cpp \
105
	bzip2.cpp freetype.cpp normalization_cubemap.cpp
105
	bzip2.cpp freetype.cpp normalization_cubemap.cpp
106
libglue_la_OBJECTS = $(am_libglue_la_OBJECTS)
106
libglue_la_OBJECTS = $(am_libglue_la_OBJECTS)
107
libglue@SUFFIX@LINKHACK_la_LIBADD =
107
libglue@SUFFIX@LINKHACK_la_LIBADD =
108
am__libglue@SUFFIX@LINKHACK_la_SOURCES_DIST = cg.cpp spidermonkey.cpp \
108
am__libglue@SUFFIX@LINKHACK_la_SOURCES_DIST = cg.cpp spidermonkey.cpp \
109
	dl.cpp gl.cpp gl_wgl.cpp gl_agl.cpp gl_cgl.cpp gl_glx.cpp \
109
	dl.cpp gl.cpp gl_wgl.cpp gl_agl.cpp gl_cgl.cpp gl_egl.cpp gl_glx.cpp \
110
	GLUWrapper.cpp simage_wrapper.cpp openal_wrapper.cpp \
110
	GLUWrapper.cpp simage_wrapper.cpp openal_wrapper.cpp \
111
	win32api.cpp zlib.cpp bzip2.cpp freetype.cpp \
111
	win32api.cpp zlib.cpp bzip2.cpp freetype.cpp \
112
	normalization_cubemap.cpp all-glue-cpp.cpp
112
	normalization_cubemap.cpp all-glue-cpp.cpp
113
am_libglue@SUFFIX@LINKHACK_la_OBJECTS = $(am__objects_8)
113
am_libglue@SUFFIX@LINKHACK_la_OBJECTS = $(am__objects_8)
114
am__EXTRA_libglue@SUFFIX@LINKHACK_la_SOURCES_DIST = GLUWrapper.h \
114
am__EXTRA_libglue@SUFFIX@LINKHACK_la_SOURCES_DIST = GLUWrapper.h \
115
	bzip2.h cg.h dlp.h freetype.h gl_agl.h gl_cgl.h gl_glx.h \
115
	bzip2.h cg.h dlp.h freetype.h gl_agl.h gl_cgl.h gl_egl.h gl_glx.h \
116
	gl_wgl.h glp.h openal_wrapper.h simage_wrapper.h win32api.h \
116
	gl_wgl.h glp.h openal_wrapper.h simage_wrapper.h win32api.h \
117
	zlib.h all-glue-cpp.cpp cg.cpp spidermonkey.cpp dl.cpp gl.cpp \
117
	zlib.h all-glue-cpp.cpp cg.cpp spidermonkey.cpp dl.cpp gl.cpp \
118
	gl_wgl.cpp gl_agl.cpp gl_cgl.cpp gl_glx.cpp GLUWrapper.cpp \
118
	gl_wgl.cpp gl_agl.cpp gl_cgl.cpp gl_egl.cpp gl_glx.cpp GLUWrapper.cpp \
119
	simage_wrapper.cpp openal_wrapper.cpp win32api.cpp zlib.cpp \
119
	simage_wrapper.cpp openal_wrapper.cpp win32api.cpp zlib.cpp \
120
	bzip2.cpp freetype.cpp normalization_cubemap.cpp
120
	bzip2.cpp freetype.cpp normalization_cubemap.cpp
121
libglue@SUFFIX@LINKHACK_la_OBJECTS =  \
121
libglue@SUFFIX@LINKHACK_la_OBJECTS =  \
Lines 132-138 am__depfiles_maybe = depfiles Link Here
132
@AMDEP_TRUE@	./$(DEPDIR)/freetype.Po ./$(DEPDIR)/gl.Plo \
132
@AMDEP_TRUE@	./$(DEPDIR)/freetype.Po ./$(DEPDIR)/gl.Plo \
133
@AMDEP_TRUE@	./$(DEPDIR)/gl.Po ./$(DEPDIR)/gl_agl.Plo \
133
@AMDEP_TRUE@	./$(DEPDIR)/gl.Po ./$(DEPDIR)/gl_agl.Plo \
134
@AMDEP_TRUE@	./$(DEPDIR)/gl_agl.Po ./$(DEPDIR)/gl_cgl.Plo \
134
@AMDEP_TRUE@	./$(DEPDIR)/gl_agl.Po ./$(DEPDIR)/gl_cgl.Plo \
135
@AMDEP_TRUE@	./$(DEPDIR)/gl_cgl.Po ./$(DEPDIR)/gl_glx.Plo \
135
@AMDEP_TRUE@	./$(DEPDIR)/gl_cgl.Po ./$(DEPDIR)/gl_egl.Plo \
136
@AMDEP_TRUE@	./$(DEPDIR)/gl_egl.Po ./$(DEPDIR)/gl_glx.Plo \
136
@AMDEP_TRUE@	./$(DEPDIR)/gl_glx.Po ./$(DEPDIR)/gl_wgl.Plo \
137
@AMDEP_TRUE@	./$(DEPDIR)/gl_glx.Po ./$(DEPDIR)/gl_wgl.Plo \
137
@AMDEP_TRUE@	./$(DEPDIR)/gl_wgl.Po \
138
@AMDEP_TRUE@	./$(DEPDIR)/gl_wgl.Po \
138
@AMDEP_TRUE@	./$(DEPDIR)/normalization_cubemap.Plo \
139
@AMDEP_TRUE@	./$(DEPDIR)/normalization_cubemap.Plo \
Lines 426-432 RegularSources = \ Link Here
426
	spidermonkey.cpp \
427
	spidermonkey.cpp \
427
	dl.cpp \
428
	dl.cpp \
428
	gl.cpp \
429
	gl.cpp \
429
	gl_wgl.cpp gl_agl.cpp gl_cgl.cpp gl_glx.cpp \
430
	gl_wgl.cpp gl_agl.cpp gl_cgl.cpp gl_egl.cpp gl_glx.cpp \
430
	GLUWrapper.cpp \
431
	GLUWrapper.cpp \
431
	simage_wrapper.cpp \
432
	simage_wrapper.cpp \
432
	openal_wrapper.cpp \
433
	openal_wrapper.cpp \
Lines 448-453 PrivateHeaders = \ Link Here
448
	freetype.h \
449
	freetype.h \
449
	gl_agl.h \
450
	gl_agl.h \
450
	gl_cgl.h \
451
	gl_cgl.h \
452
	gl_egl.h \
451
	gl_glx.h \
453
	gl_glx.h \
452
	gl_wgl.h \
454
	gl_wgl.h \
453
	glp.h \
455
	glp.h \
Lines 602-607 distclean-compile: Link Here
602
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gl_agl.Po@am__quote@
604
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gl_agl.Po@am__quote@
603
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gl_cgl.Plo@am__quote@
605
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gl_cgl.Plo@am__quote@
604
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gl_cgl.Po@am__quote@
606
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gl_cgl.Po@am__quote@
607
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gl_egl.Plo@am__quote@
608
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gl_egl.Po@am__quote@
605
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gl_glx.Plo@am__quote@
609
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gl_glx.Plo@am__quote@
606
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gl_glx.Po@am__quote@
610
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gl_glx.Po@am__quote@
607
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gl_wgl.Plo@am__quote@
611
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gl_wgl.Plo@am__quote@
(-)a/src/glue/all-glue-cpp.cpp (+1 lines)
Lines 35-40 Link Here
35
#include "gl_glx.cpp"
35
#include "gl_glx.cpp"
36
#include "gl_agl.cpp"
36
#include "gl_agl.cpp"
37
#include "gl_cgl.cpp"
37
#include "gl_cgl.cpp"
38
#include "gl_egl.cpp"
38
39
39
#include "cg.cpp"
40
#include "cg.cpp"
40
#include "spidermonkey.cpp"
41
#include "spidermonkey.cpp"
(-)a/src/glue/gl.cpp (-3 / +44 lines)
Lines 196-203 Link Here
196
   is either fiddling manually with config.h, or in case a change is
196
   is either fiddling manually with config.h, or in case a change is
197
   made which breaks this protection in the configure script. */
197
   made which breaks this protection in the configure script. */
198
198
199
#if defined(HAVE_WGL) && (defined(HAVE_GLX) || defined(HAVE_AGL) || defined(HAVE_CGL))
199
#if defined(HAVE_WGL) && (defined(HAVE_EGL) || defined(HAVE_GLX) || defined(HAVE_AGL) || defined(HAVE_CGL))
200
#error More than one of HAVE_WGL, HAVE_GLX and HAVE_AGL|HAVE_CGL set simultaneously!
200
#error More than one of HAVE_WGL, HAVE_GLX , HAVE_EGL, and HAVE_AGL|HAVE_CGL set simultaneously!
201
#endif
202
203
#if defined(HAVE_EGL) && (defined(HAVE_GLX) || defined(HAVE_AGL) || defined(HAVE_CGL))
204
#error More than one of HAVE_WGL, HAVE_GLX, HAVE_EGL and HAVE_AGL|HAVE_CGL set simultaneously!
201
#endif
205
#endif
202
206
203
#if defined(HAVE_GLX) && (defined(HAVE_AGL) || defined(HAVE_CGL))
207
#if defined(HAVE_GLX) && (defined(HAVE_AGL) || defined(HAVE_CGL))
Lines 205-211 Link Here
205
#endif
209
#endif
206
210
207
// Define HAVE_NOGL if no platform GL binding exists
211
// Define HAVE_NOGL if no platform GL binding exists
208
#if !defined(HAVE_WGL) && !defined(HAVE_GLX) && !(defined(HAVE_AGL) || defined(HAVE_CGL))
212
#if !defined(HAVE_WGL) && !defined(HAVE_GLX) && !defined(HAVE_EGL) && !(defined(HAVE_AGL) || defined(HAVE_CGL))
209
#define HAVE_NOGL 1
213
#define HAVE_NOGL 1
210
#endif
214
#endif
211
215
Lines 232-237 Link Here
232
#include <GL/glx.h>
236
#include <GL/glx.h>
233
#endif /* HAVE_GLX */
237
#endif /* HAVE_GLX */
234
238
239
#ifdef HAVE_EGL
240
#include <EGL/egl.h>
241
#include <EGL/eglext.h>
242
#endif /* HAVE_EGL */
243
235
#include <Inventor/C/glue/gl.h>
244
#include <Inventor/C/glue/gl.h>
236
245
237
#include <Inventor/C/errors/debugerror.h>
246
#include <Inventor/C/errors/debugerror.h>
Lines 247-252 Link Here
247
#include "glue/dlp.h"
256
#include "glue/dlp.h"
248
#include "glue/gl_agl.h"
257
#include "glue/gl_agl.h"
249
#include "glue/gl_cgl.h"
258
#include "glue/gl_cgl.h"
259
#include "glue/gl_egl.h"
250
#include "glue/gl_glx.h"
260
#include "glue/gl_glx.h"
251
#include "glue/gl_wgl.h"
261
#include "glue/gl_wgl.h"
252
#include "threads/threadsutilp.h"
262
#include "threads/threadsutilp.h"
Lines 584-589 cc_glglue_getprocaddress(const cc_glglue * glue, const char * symname) Link Here
584
  ptr = coin_wgl_getprocaddress(glue, symname);
594
  ptr = coin_wgl_getprocaddress(glue, symname);
585
  if (ptr) goto returnpoint;
595
  if (ptr) goto returnpoint;
586
596
597
  ptr = eglglue_getprocaddress(glue, symname);
598
  if (ptr) goto returnpoint;
599
587
  ptr = glxglue_getprocaddress(glue, symname);
600
  ptr = glxglue_getprocaddress(glue, symname);
588
  if (ptr) goto returnpoint;
601
  if (ptr) goto returnpoint;
589
602
Lines 622-627 glglue_cleanup(void) Link Here
622
635
623
#ifdef HAVE_GLX
636
#ifdef HAVE_GLX
624
  glxglue_cleanup();
637
  glxglue_cleanup();
638
#elif defined(HAVE_EGL)
639
  eglglue_cleanup();
625
#elif defined(HAVE_WGL)
640
#elif defined(HAVE_WGL)
626
  wglglue_cleanup();
641
  wglglue_cleanup();
627
#else
642
#else
Lines 2280-2286 cc_glglue_instance(int contextid) Link Here
2280
    assert(glGetError() == GL_NO_ERROR && "GL error when calling glGetString() -- no current GL context?");
2295
    assert(glGetError() == GL_NO_ERROR && "GL error when calling glGetString() -- no current GL context?");
2281
2296
2282
    glglue_set_glVersion(gi);
2297
    glglue_set_glVersion(gi);
2298
#ifdef HAVE_GLX
2283
    glxglue_init(gi);
2299
    glxglue_init(gi);
2300
#elif defined(HAVE_EGL)
2301
    eglglue_init(gi);
2302
#endif
2284
2303
2285
    gi->vendorstr = (const char *)glGetString(GL_VENDOR);
2304
    gi->vendorstr = (const char *)glGetString(GL_VENDOR);
2286
    gi->vendor_is_SGI = strcmp((const char *)gi->vendorstr, "SGI") == 0;
2305
    gi->vendor_is_SGI = strcmp((const char *)gi->vendorstr, "SGI") == 0;
Lines 4389-4394 cc_glglue_context_create_offscreen(unsigned int width, unsigned int height) Link Here
4389
  return NULL;
4408
  return NULL;
4390
#elif defined(HAVE_GLX)
4409
#elif defined(HAVE_GLX)
4391
  return glxglue_context_create_offscreen(width, height);
4410
  return glxglue_context_create_offscreen(width, height);
4411
#elif defined(HAVE_EGL)
4412
  return eglglue_context_create_offscreen(width, height);
4392
#elif defined(HAVE_WGL)
4413
#elif defined(HAVE_WGL)
4393
  return wglglue_context_create_offscreen(width, height);
4414
  return wglglue_context_create_offscreen(width, height);
4394
#else
4415
#else
Lines 4417-4422 cc_glglue_context_make_current(void * ctx) Link Here
4417
  return FALSE;
4438
  return FALSE;
4418
#elif defined(HAVE_GLX)
4439
#elif defined(HAVE_GLX)
4419
  return glxglue_context_make_current(ctx);
4440
  return glxglue_context_make_current(ctx);
4441
#elif defined(HAVE_EGL)
4442
  return eglglue_context_make_current(ctx);
4420
#elif defined(HAVE_WGL)
4443
#elif defined(HAVE_WGL)
4421
  return wglglue_context_make_current(ctx);
4444
  return wglglue_context_make_current(ctx);
4422
#else
4445
#else
Lines 4455-4460 cc_glglue_context_reinstate_previous(void * ctx) Link Here
4455
  assert(FALSE && "unimplemented");
4478
  assert(FALSE && "unimplemented");
4456
#elif defined(HAVE_GLX)
4479
#elif defined(HAVE_GLX)
4457
  glxglue_context_reinstate_previous(ctx);
4480
  glxglue_context_reinstate_previous(ctx);
4481
#elif defined(HAVE_EGL)
4482
  eglglue_context_reinstate_previous(ctx);
4458
#elif defined(HAVE_WGL)
4483
#elif defined(HAVE_WGL)
4459
  wglglue_context_reinstate_previous(ctx);
4484
  wglglue_context_reinstate_previous(ctx);
4460
#else
4485
#else
Lines 4480-4485 cc_glglue_context_destruct(void * ctx) Link Here
4480
  assert(FALSE && "unimplemented");
4505
  assert(FALSE && "unimplemented");
4481
#elif defined(HAVE_GLX)
4506
#elif defined(HAVE_GLX)
4482
  glxglue_context_destruct(ctx);
4507
  glxglue_context_destruct(ctx);
4508
#elif defined(HAVE_EGL)
4509
  eglglue_context_destruct(ctx);
4483
#elif defined(HAVE_WGL)
4510
#elif defined(HAVE_WGL)
4484
  wglglue_context_destruct(ctx);
4511
  wglglue_context_destruct(ctx);
4485
#else
4512
#else
Lines 4603-4608 cc_glglue_context_max_dimensions(unsigned int * width, unsigned int * height) Link Here
4603
    ok = wglglue_context_pbuffer_max(ctx, pbufmax);
4630
    ok = wglglue_context_pbuffer_max(ctx, pbufmax);
4604
#elif defined(HAVE_GLX)
4631
#elif defined(HAVE_GLX)
4605
    ok = glxglue_context_pbuffer_max(ctx, pbufmax);
4632
    ok = glxglue_context_pbuffer_max(ctx, pbufmax);
4633
#elif defined(HAVE_EGL)
4634
    ok = eglglue_context_pbuffer_max(ctx, pbufmax);
4606
#elif defined(HAVE_AGL) || defined(HAVE_CGL)
4635
#elif defined(HAVE_AGL) || defined(HAVE_CGL)
4607
    /* FIXME: implement check on max pbuffer width, height and number
4636
    /* FIXME: implement check on max pbuffer width, height and number
4608
       of pixels for AGL/CGL, if any such limits are imposed there.
4637
       of pixels for AGL/CGL, if any such limits are imposed there.
Lines 4682-4687 cc_glglue_context_can_render_to_texture(void * COIN_UNUSED_ARG(ctx)) Link Here
4682
4711
4683
#if defined(HAVE_GLX) || defined(HAVE_NOGL)
4712
#if defined(HAVE_GLX) || defined(HAVE_NOGL)
4684
  return FALSE;
4713
  return FALSE;
4714
#elif defined(HAVE_EGL)
4715
  return eglglue_context_can_render_to_texture(ctx);
4685
#elif defined(HAVE_WGL)
4716
#elif defined(HAVE_WGL)
4686
  return wglglue_context_can_render_to_texture(ctx);
4717
  return wglglue_context_can_render_to_texture(ctx);
4687
#else
4718
#else
Lines 4709-4714 cc_glglue_context_bind_pbuffer(void * COIN_UNUSED_ARG(ctx)) Link Here
4709
     equivalent to the aglTexImagePBuffer() and wglBindTexImageARB()
4740
     equivalent to the aglTexImagePBuffer() and wglBindTexImageARB()
4710
     calls).  kyrah 20031123. */
4741
     calls).  kyrah 20031123. */
4711
  assert(FALSE && "unimplemented");
4742
  assert(FALSE && "unimplemented");
4743
#elif defined(HAVE_EGL)
4744
  eglglue_context_bind_pbuffer(ctx);
4712
#elif defined(HAVE_WGL)
4745
#elif defined(HAVE_WGL)
4713
  wglglue_context_bind_pbuffer(ctx);
4746
  wglglue_context_bind_pbuffer(ctx);
4714
#else
4747
#else
Lines 4732-4737 cc_glglue_context_release_pbuffer(void * COIN_UNUSED_ARG(ctx)) Link Here
4732
#if defined(HAVE_GLX) || defined(HAVE_NOGL)
4765
#if defined(HAVE_GLX) || defined(HAVE_NOGL)
4733
  /* FIXME: Implement for GLX. kyrah 20031123. */
4766
  /* FIXME: Implement for GLX. kyrah 20031123. */
4734
  assert(FALSE && "unimplemented");
4767
  assert(FALSE && "unimplemented");
4768
#elif defined(HAVE_EGL)
4769
  eglglue_context_release_pbuffer(ctx);
4735
#elif defined(HAVE_WGL)
4770
#elif defined(HAVE_WGL)
4736
  wglglue_context_release_pbuffer(ctx);
4771
  wglglue_context_release_pbuffer(ctx);
4737
#else
4772
#else
Lines 4756-4761 cc_glglue_context_pbuffer_is_bound(void * COIN_UNUSED_ARG(ctx)) Link Here
4756
  /* FIXME: Implement for GLX. kyrah 20031123. */
4791
  /* FIXME: Implement for GLX. kyrah 20031123. */
4757
  assert(FALSE && "unimplemented");
4792
  assert(FALSE && "unimplemented");
4758
  return FALSE;
4793
  return FALSE;
4794
#elif defined(HAVE_EGL)
4795
  return eglglue_context_pbuffer_is_bound(ctx);
4759
#elif defined(HAVE_WGL)
4796
#elif defined(HAVE_WGL)
4760
  return wglglue_context_pbuffer_is_bound(ctx);
4797
  return wglglue_context_pbuffer_is_bound(ctx);
4761
#else
4798
#else
Lines 5107-5112 coin_gl_current_context(void) Link Here
5107
  ctx = glXGetCurrentContext();
5144
  ctx = glXGetCurrentContext();
5108
#endif /* HAVE_GLX */
5145
#endif /* HAVE_GLX */
5109
5146
5147
#ifdef HAVE_EGL
5148
  ctx = eglGetCurrentContext();
5149
#endif /* HAVE_EGL */
5150
5110
#ifdef HAVE_WGL
5151
#ifdef HAVE_WGL
5111
  ctx = wglGetCurrentContext();
5152
  ctx = wglGetCurrentContext();
5112
#endif /* HAVE_WGL */
5153
#endif /* HAVE_WGL */
(-)a/src/glue/gl_egl.cpp (+488 lines)
Line 0 Link Here
1
/**************************************************************************\
2
 * Copyright (c) Kongsberg Oil & Gas Technologies AS
3
 * All rights reserved.
4
 *
5
 * Redistribution and use in source and binary forms, with or without
6
 * modification, are permitted provided that the following conditions are
7
 * met:
8
 *
9
 * Redistributions of source code must retain the above copyright notice,
10
 * this list of conditions and the following disclaimer.
11
 *
12
 * Redistributions in binary form must reproduce the above copyright
13
 * notice, this list of conditions and the following disclaimer in the
14
 * documentation and/or other materials provided with the distribution.
15
 *
16
 * Neither the name of the copyright holder nor the names of its
17
 * contributors may be used to endorse or promote products derived from
18
 * this software without specific prior written permission.
19
 *
20
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24
 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
\**************************************************************************/
32
33
/*
34
 *  Environment variable controls available:
35
 * 
36
 *   - COIN_EGLGLUE_NO_PBUFFERS: set to 1 to force software rendering of
37
 *     offscreen contexts.
38
 */
39
40
#include "glue/gl_egl.h"
41
#include "coindefs.h"
42
43
#ifdef HAVE_CONFIG_H
44
#include "config.h"
45
#endif /* HAVE_CONFIG_H */
46
47
#include <cstdlib>
48
#include <cstring>
49
#include <cassert>
50
51
#include <Inventor/C/tidbits.h>
52
#include <Inventor/C/glue/gl.h>
53
#include <Inventor/C/errors/debugerror.h>
54
#include <Inventor/C/glue/dl.h>
55
56
#include "glue/glp.h"
57
#include "glue/dlp.h"
58
59
/* ********************************************************************** */
60
61
#ifndef HAVE_EGL
62
63
void * eglglue_getprocaddress(const cc_glglue * glue_in, const char * fname)
64
{
65
  assert(FALSE); return NULL;
66
}
67
68
void * eglglue_context_create_offscreen(unsigned int COIN_UNUSED_ARG(width),
69
                                        unsigned int COIN_UNUSED_ARG(height)) {
70
  assert(FALSE); return NULL;
71
}
72
73
SbBool eglglue_context_make_current(void * COIN_UNUSED_ARG(ctx))
74
{
75
  assert(FALSE); return FALSE;
76
}
77
78
void eglglue_context_reinstate_previous(void * COIN_UNUSED_ARG(ctx))
79
{
80
  assert(FALSE);
81
}
82
83
void eglglue_context_destruct(void * COIN_UNUSED_ARG(ctx))
84
{
85
  assert(FALSE);
86
}
87
88
SbBool eglglue_context_pbuffer_max(void * ctx, unsigned int * lims)
89
{
90
  assert(FALSE); return FALSE;
91
}
92
93
#else /* HAVE_EGL */
94
95
/* ********************************************************************** */
96
97
#include <EGL/egl.h>
98
#include <EGL/eglext.h>
99
100
EGLDisplay eglglue_display = EGL_NO_DISPLAY;
101
struct eglglue_contextdata;
102
103
#define CASE_STR( value ) case value: return #value;
104
const char* eglErrorString( EGLint error )
105
{
106
    switch( error )
107
    {
108
    CASE_STR( EGL_SUCCESS             )
109
    CASE_STR( EGL_NOT_INITIALIZED     )
110
    CASE_STR( EGL_BAD_ACCESS          )
111
    CASE_STR( EGL_BAD_ALLOC           )
112
    CASE_STR( EGL_BAD_ATTRIBUTE       )
113
    CASE_STR( EGL_BAD_CONTEXT         )
114
    CASE_STR( EGL_BAD_CONFIG          )
115
    CASE_STR( EGL_BAD_CURRENT_SURFACE )
116
    CASE_STR( EGL_BAD_DISPLAY         )
117
    CASE_STR( EGL_BAD_SURFACE         )
118
    CASE_STR( EGL_BAD_MATCH           )
119
    CASE_STR( EGL_BAD_PARAMETER       )
120
    CASE_STR( EGL_BAD_NATIVE_PIXMAP   )
121
    CASE_STR( EGL_BAD_NATIVE_WINDOW   )
122
    CASE_STR( EGL_CONTEXT_LOST        )
123
    default: return "Unknown";
124
    }
125
}
126
const char* eglAPIString( EGLenum api )
127
{
128
    switch( api )
129
    {
130
    CASE_STR( EGL_OPENGL_API          )
131
    CASE_STR( EGL_OPENGL_ES_API          )
132
    CASE_STR( EGL_OPENVG_API          )
133
    default: return "Unknown";
134
    }
135
}
136
#undef CASE_STR
137
138
struct eglglue_contextdata {
139
  EGLContext context;
140
  EGLSurface surface;
141
  EGLContext storedcontext;
142
  EGLSurface storedsurface;
143
  unsigned int width;
144
  unsigned int height;
145
};
146
147
static struct eglglue_contextdata *
148
eglglue_contextdata_init(unsigned int width, unsigned int height)
149
{
150
  struct eglglue_contextdata * ctx;
151
  ctx = (struct eglglue_contextdata *)malloc(sizeof(struct eglglue_contextdata));
152
153
  ctx->context = EGL_NO_CONTEXT;
154
  ctx->surface = EGL_NO_SURFACE;
155
  ctx->storedcontext = EGL_NO_CONTEXT;
156
  ctx->storedsurface = EGL_NO_SURFACE;
157
  ctx->width = width;
158
  ctx->height = height;
159
  return ctx;
160
}
161
162
static EGLDisplay
163
eglglue_get_display(void)
164
{
165
  if (eglglue_display == EGL_NO_DISPLAY) {
166
      eglglue_display = eglGetPlatformDisplay(EGL_PLATFORM_WAYLAND_KHR, EGL_DEFAULT_DISPLAY, NULL);
167
      if (eglglue_display == EGL_NO_DISPLAY) {
168
        cc_debugerror_post("eglglue_get_display",
169
                           "Display not found.");
170
        return EGL_NO_DISPLAY;
171
      }
172
    if (coin_glglue_debug()) {
173
      cc_debugerror_postinfo("eglglue_get_display",
174
                             "got EGLDisplay==%p",
175
                             eglglue_display);
176
    }
177
  }
178
  return eglglue_display;
179
}
180
181
void
182
eglglue_init(cc_glglue * w)
183
{
184
  w->glx.isdirect = 1;
185
  w->glx.serverversion = NULL;
186
  w->glx.servervendor = NULL;
187
  w->glx.serverextensions = NULL;
188
  w->glx.clientversion = NULL;
189
  w->glx.clientvendor = NULL;
190
  w->glx.clientextensions = NULL;
191
  w->glx.glxextensions = NULL;
192
193
  w->glx.glXGetCurrentDisplay = (COIN_PFNGLXGETCURRENTDISPLAYPROC)eglglue_getprocaddress(w, "eglglue_get_display");
194
195
  if (eglInitialize(eglglue_get_display(), &w->glx.version.major, &w->glx.version.minor) == EGL_FALSE) {
196
    cc_debugerror_post("eglglue_init",
197
                       "Couldn't initialize EGL. %s",
198
                        eglErrorString(eglGetError()));
199
    return;
200
  }
201
202
  if (eglBindAPI(EGL_OPENGL_API) == EGL_FALSE) {
203
    cc_debugerror_post("eglglue_init",
204
                       "eglBindAPI(EGL_OPENGL_API) failed. %s",
205
                       eglErrorString(eglGetError()));
206
    return;
207
  }
208
209
  if (coin_glglue_debug()) {
210
    cc_debugerror_postinfo("eglglue_init",
211
                           "EGL version: %d.%d",
212
                            w->glx.version.major,
213
                            w->glx.version.minor);
214
    cc_debugerror_postinfo("eglglue_init",
215
                           "eglQueryString(EGL_VERSION)=='%s'",
216
                            eglQueryString(eglglue_get_display(), EGL_VERSION));
217
    cc_debugerror_postinfo("eglglue_init",
218
                           "eglQueryString(EGL_VENDOR)=='%s'",
219
                            eglQueryString(eglglue_get_display(), EGL_VENDOR));
220
    cc_debugerror_postinfo("eglglue_init",
221
                           "eglQueryString(EGL_CLIENT_APIS)=='%s'",
222
                            eglQueryString(eglglue_get_display(), EGL_CLIENT_APIS));
223
    cc_debugerror_postinfo("eglglue_init",
224
                           "eglQueryAPI()=='%s'",
225
                           eglAPIString(eglQueryAPI()));
226
    cc_debugerror_postinfo("eglglue_init",
227
                           "eglQueryString(EGL_EXTENSIONS)=='%s'",
228
                            eglQueryString(eglglue_get_display(), EGL_EXTENSIONS));
229
  }
230
}
231
232
static void
233
eglglue_contextdata_cleanup(struct eglglue_contextdata * ctx)
234
{
235
  if (ctx == NULL) { return; }
236
  if (eglglue_get_display() != EGL_NO_DISPLAY && ctx->context != EGL_NO_CONTEXT) eglDestroyContext(eglglue_get_display(), ctx->context);
237
  if (eglglue_get_display() != EGL_NO_DISPLAY && ctx->surface != EGL_NO_SURFACE) eglDestroySurface(eglglue_get_display(), ctx->surface);
238
  if (eglglue_get_display() != EGL_NO_DISPLAY && ctx->storedcontext != EGL_NO_CONTEXT) eglDestroyContext(eglglue_get_display(), ctx->storedcontext);
239
  if (eglglue_get_display() != EGL_NO_DISPLAY && ctx->storedsurface != EGL_NO_SURFACE) eglDestroySurface(eglglue_get_display(), ctx->storedsurface);
240
  free(ctx);
241
}
242
243
void *
244
eglglue_context_create_offscreen(unsigned int width, unsigned int height)
245
{
246
  struct eglglue_contextdata * ctx;
247
  EGLint format;
248
  EGLint numConfigs;
249
  EGLConfig config;
250
  EGLint attrib[] = {
251
    EGL_RENDERABLE_TYPE, EGL_OPENGL_BIT,
252
    EGL_SURFACE_TYPE, EGL_PBUFFER_BIT,
253
    EGL_RED_SIZE, 8,
254
    EGL_GREEN_SIZE, 8,
255
    EGL_BLUE_SIZE, 8,
256
    EGL_ALPHA_SIZE, 8,
257
    EGL_DEPTH_SIZE, 24,
258
    EGL_STENCIL_SIZE, 1,
259
    EGL_NONE
260
  };
261
262
  EGLAttrib surface_attrib[] = {
263
    EGL_TEXTURE_FORMAT, EGL_TEXTURE_RGBA,
264
    EGL_TEXTURE_TARGET, EGL_TEXTURE_2D,
265
    EGL_WIDTH, (EGLint) ctx->width,
266
    EGL_HEIGHT, (EGLint) ctx->height,
267
    EGL_NONE
268
  };
269
270
  ctx = eglglue_contextdata_init(width, height);
271
  if (!ctx) return NULL;
272
273
  const int v = coin_glglue_stencil_bits_hack();
274
  if (v != -1) {
275
    attrib[15] = v;
276
  }
277
278
  if (coin_glglue_debug()) {
279
    cc_debugerror_postinfo("eglglue_context_create_offscreen",
280
                           "Creating offscreen context.");
281
  }
282
283
  if (eglBindAPI(EGL_OPENGL_API) == EGL_FALSE) {
284
    cc_debugerror_post("eglglue_context_create_offscreen",
285
                       "eglBindAPI(EGL_OPENGL_API) failed. %s",
286
                       eglErrorString(eglGetError()));
287
    return NULL;
288
  }
289
290
  const char * env = coin_getenv("COIN_EGLGLUE_NO_PBUFFERS");
291
  if (env && atoi(env) > 0) {
292
    attrib[3] = EGL_PIXMAP_BIT;
293
    if (coin_glglue_debug()) {
294
      cc_debugerror_postinfo("eglglue_context_create_offscreen",
295
                             "Force software rendering.");
296
    }
297
  }
298
299
  eglChooseConfig(eglglue_get_display(), attrib, &config, 1, &numConfigs);
300
  if (numConfigs == 0) {
301
    if (attrib[3] == EGL_PBUFFER_BIT) {
302
      if (coin_glglue_debug()) {
303
        cc_debugerror_postinfo("eglglue_context_create_offscreen",
304
                               "PBuffer offscreen rendering is NOT supported "
305
                               "by the OpenGL driver. Try software rendering.");
306
      }
307
      attrib[3] = EGL_PIXMAP_BIT;
308
      eglChooseConfig(eglglue_get_display(), attrib, &config, 1, &numConfigs);
309
    }
310
  }
311
  if (numConfigs == 0) {
312
    cc_debugerror_post("eglglue_context_create_offscreen",
313
                       "No matching EGL config. %s",
314
                       eglErrorString(eglGetError()));
315
    eglglue_contextdata_cleanup(ctx);
316
    return NULL;
317
  }
318
319
  if (attrib[3] == EGL_PBUFFER_BIT) {
320
    ctx->surface = eglCreatePlatformWindowSurface(eglglue_get_display(), config, 0, surface_attrib);
321
  } else {
322
    ctx->surface = eglCreatePlatformPixmapSurface(eglglue_get_display(), config, 0, surface_attrib);
323
  }
324
  if (ctx->surface == EGL_NO_SURFACE) {
325
    cc_debugerror_post("eglglue_context_create_offscreen",
326
                       "Couldn't create EGL surface. %s",
327
                       eglErrorString(eglGetError()));
328
    eglglue_contextdata_cleanup(ctx);
329
    return NULL;
330
  }
331
332
  ctx->context = eglCreateContext(eglglue_get_display(), config, EGL_NO_CONTEXT, NULL);
333
334
  if (ctx->context == EGL_NO_CONTEXT) {
335
    cc_debugerror_post("eglglue_context_create_offscreen",
336
                       "Couldn't create EGL context. %s",
337
                       eglErrorString(eglGetError()));
338
    eglglue_contextdata_cleanup(ctx);
339
    return NULL;
340
  }
341
342
  if (coin_glglue_debug()) {
343
    cc_debugerror_postinfo("eglglue_context_create_offscreen",
344
                           "created new %s offscreen context == %p",
345
                           attrib[3] == EGL_PBUFFER_BIT ? "pBuffer" : "software",
346
                           ctx->context);
347
  }
348
  return ctx;
349
}
350
351
SbBool
352
eglglue_context_make_current(void * ctx)
353
{
354
  struct eglglue_contextdata * context = (struct eglglue_contextdata *)ctx;
355
356
  context->storedcontext = eglGetCurrentContext();
357
  context->storedsurface = eglGetCurrentSurface(EGL_DRAW);
358
  if (eglMakeCurrent(eglglue_get_display(), context->surface, context->surface, context->context) == EGL_FALSE) {
359
      cc_debugerror_post("eglglue_context_make_current",
360
                         "eglMakeCurrent failed: %s",
361
                         eglErrorString(eglGetError()));
362
      return FALSE;
363
  }
364
365
  if (coin_glglue_debug()) {
366
      cc_debugerror_postinfo("eglglue_context_make_current",
367
                             "EGL Context (0x%X)\n",
368
                             context->context);
369
  }
370
  return TRUE;
371
}
372
373
void
374
eglglue_context_reinstate_previous(void * ctx)
375
{
376
  struct eglglue_contextdata * context = (struct eglglue_contextdata *)ctx;
377
378
  if (context->storedcontext != EGL_NO_CONTEXT && context->storedsurface != EGL_NO_SURFACE) {
379
    if (eglMakeCurrent(eglglue_get_display(), context->storedsurface, context->storedsurface, context->storedcontext) == EGL_TRUE) {
380
      if (coin_glglue_debug()) {
381
        cc_debugerror_postinfo("eglglue_context_make_current",
382
                               "EGL Context (0x%X)\n",
383
                               context->context);
384
      }
385
    } else {
386
      cc_debugerror_post("eglglue_context_make_current",
387
                         "eglMakeCurrent failed: %s",
388
                         eglErrorString(eglGetError()));
389
    }
390
  }
391
}
392
393
void
394
eglglue_context_destruct(void * ctx)
395
{
396
  struct eglglue_contextdata * context = (struct eglglue_contextdata *)ctx;
397
398
  if (coin_glglue_debug()) {
399
    cc_debugerror_postinfo("eglglue_context_destruct",
400
                           "Destroying context %p", context->context);
401
  }
402
  eglglue_contextdata_cleanup(context);
403
}
404
405
void
406
eglglue_context_bind_pbuffer(void * ctx)
407
{
408
  struct eglglue_contextdata * context = (struct eglglue_contextdata *)ctx;
409
410
  if (eglBindTexImage(eglglue_get_display(), context->surface, EGL_BACK_BUFFER) == EGL_FALSE) {
411
    cc_debugerror_post("eglglue_context_bind_pbuffer()"
412
                       "after binding pbuffer: %s",
413
                       eglErrorString(eglGetError()));
414
  }
415
}
416
417
void
418
eglglue_context_release_pbuffer(void * ctx)
419
{
420
  struct eglglue_contextdata * context = (struct eglglue_contextdata *)ctx;
421
422
  if (eglReleaseTexImage(eglglue_get_display(), context->surface, EGL_BACK_BUFFER) == EGL_FALSE) {
423
    cc_debugerror_post("eglglue_context_release_pbuffer()"
424
                       "releasing pbuffer: %s",
425
                       eglErrorString(eglGetError()));
426
  }
427
}
428
429
SbBool
430
eglglue_context_pbuffer_is_bound(void * ctx)
431
{
432
  struct eglglue_contextdata * context = (struct eglglue_contextdata *)ctx;
433
  GLint buffer = EGL_NONE;
434
435
  if(eglQueryContext(eglglue_get_display(), context->context, EGL_RENDER_BUFFER, &buffer) == EGL_FALSE) {
436
    cc_debugerror_post("eglglue_context_pbuffer_is_bound()"
437
                       "after query pbuffer: %s",
438
                       eglErrorString(eglGetError()));
439
  }
440
  return buffer == EGL_BACK_BUFFER;
441
}
442
443
SbBool
444
eglglue_context_can_render_to_texture(void * ctx)
445
{
446
  struct eglglue_contextdata * context = (struct eglglue_contextdata *)ctx;
447
  return context->surface != EGL_NO_SURFACE;
448
}
449
450
SbBool
451
eglglue_context_pbuffer_max(void * ctx, unsigned int * lims)
452
{
453
  int returnval, attribval, i;
454
  const int attribs[] = {
455
    EGL_MAX_PBUFFER_WIDTH, EGL_MAX_PBUFFER_HEIGHT, EGL_MAX_PBUFFER_PIXELS
456
  };
457
  struct eglglue_contextdata * context = (struct eglglue_contextdata *)ctx;
458
459
  if (context->surface == EGL_NO_SURFACE) { return FALSE; }
460
461
  for (i = 0; i < 3; i++) {
462
    if(eglQuerySurface(eglglue_get_display(), context->surface, attribs[i], &attribval) == EGL_FALSE) {
463
      cc_debugerror_post("eglglue_context_pbuffer_max",
464
                         "eglQuerySurface() failed, "
465
                         "returned error code %s",
466
                         eglErrorString(eglGetError()));
467
      return FALSE;
468
    }
469
    assert(attribval >= 0);
470
    lims[i] = (unsigned int)attribval;
471
  }
472
  return TRUE;
473
}
474
475
void *
476
eglglue_getprocaddress(const cc_glglue * glue_in, const char * fname)
477
{
478
  return (void *)eglGetProcAddress(fname);
479
}
480
481
void
482
eglglue_cleanup(void)
483
{
484
  if (eglglue_display != EGL_NO_DISPLAY) eglTerminate(eglglue_display);
485
  eglglue_display = EGL_NO_DISPLAY;
486
}
487
488
#endif /* HAVE_EGL */
(-)a/src/glue/gl_egl.h (+64 lines)
Line 0 Link Here
1
#ifndef COIN_GLUE_INTERNAL_EGL_H
2
#define COIN_GLUE_INTERNAL_EGL_H
3
4
/**************************************************************************\
5
 * Copyright (c) Kongsberg Oil & Gas Technologies AS
6
 * All rights reserved.
7
 * 
8
 * Redistribution and use in source and binary forms, with or without
9
 * modification, are permitted provided that the following conditions are
10
 * met:
11
 * 
12
 * Redistributions of source code must retain the above copyright notice,
13
 * this list of conditions and the following disclaimer.
14
 * 
15
 * Redistributions in binary form must reproduce the above copyright
16
 * notice, this list of conditions and the following disclaimer in the
17
 * documentation and/or other materials provided with the distribution.
18
 * 
19
 * Neither the name of the copyright holder nor the names of its
20
 * contributors may be used to endorse or promote products derived from
21
 * this software without specific prior written permission.
22
 * 
23
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27
 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
29
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
\**************************************************************************/
35
36
#ifndef COIN_INTERNAL
37
#error this is a private header file
38
#endif
39
40
#include <Inventor/C/glue/gl.h>
41
42
#ifdef __cplusplus
43
extern "C" {
44
#endif /* __cplusplus */
45
46
void eglglue_init(cc_glglue * w);
47
48
void * eglglue_getprocaddress(const cc_glglue * w, const char * fname);
49
void * eglglue_context_create_offscreen(unsigned int width,
50
                                        unsigned int height);
51
SbBool eglglue_context_make_current(void * ctx);
52
void eglglue_context_reinstate_previous(void * ctx);
53
void eglglue_context_destruct(void * ctx);
54
void eglglue_context_bind_pbuffer(void * ctx);
55
void eglglue_context_release_pbuffer(void * ctx);
56
SbBool eglglue_context_pbuffer_is_bound(void * ctx);
57
SbBool eglglue_context_can_render_to_texture(void * ctx);
58
SbBool eglglue_context_pbuffer_max(void * ctx, unsigned int * lims);
59
void eglglue_cleanup(void);
60
#ifdef __cplusplus
61
}
62
#endif /* __cplusplus */
63
64
#endif /* !COIN_GLUE_INTERNAL_EGL_H */
(-)a/src/rendering/SoOffscreenRenderer.cpp (+2 lines)
Lines 1764-1769 SoOffscreenRendererP::offscreenContextsNotSupported(void) Link Here
1764
1764
1765
#ifdef HAVE_GLX
1765
#ifdef HAVE_GLX
1766
  return FALSE;
1766
  return FALSE;
1767
#elif defined(HAVE_EGL)
1768
  return FALSE;
1767
#elif defined(HAVE_WGL)
1769
#elif defined(HAVE_WGL)
1768
  return FALSE;
1770
  return FALSE;
1769
#elif defined(COIN_MACOS_10)
1771
#elif defined(COIN_MACOS_10)

Return to bug 869686