diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 58 |
1 files changed, 39 insertions, 19 deletions
@@ -14,17 +14,35 @@ to check for instead of just segfaulting, though. Features -------- -* Automatically initializes as new GL functions are used. -* GL 4.4 core and compatibility context support. -* GLES 1/2/3 context support. +* Automatically initializes as new OpenGL functions are used. +* Desktop OpenGL 4.4 core and compatibility context support. +* OpenGL ES 1/2/3 context support. * Knows about function aliases so (e.g.) ```glBufferData()``` can be used with ```GL_ARB_vertex_buffer_object``` implementations, along - with GL 1.5+ implementations. -* EGL, GLX, and WGL support. -* Can be mixed with non-epoxy GL usage. + with desktop OpenGL 1.5+ implementations. +* GLX, and WGL support. +* EGL support. EGL headers are included, so they're not necessary to build Epoxy + with EGL support. +* Can be mixed with non-epoxy OpenGL usage. -Building (Unix) ---------------- +Building (CMake) +----------------- +CMake is now the recommended way to build epoxy. It should be as cample as: + + cd <my-build_dir> + cmake <my-source-dir> + +And then build the project, depending on the type of your toolset, e.g. for Unix +type "make", for MSVC open the solution in Visual studio and build the solution. + +To rebuild the generated headers from the specs, add +"-DEPOXY_REBUILD_FROM_SPECS=ON" to the "cmake" invocation. + +Note that building with CMake currently doesn't support testing. + +Building (Autotools) +--------------------- +On unix you can also use autotools to build: ./autogen.sh make @@ -47,13 +65,16 @@ Dependencies for OS X (macports): The test suite has additional dependencies depending on the platform. (X11, EGL, a running X Server). -Building (MSVC 2013) --------------------- -1) Check src\Makefile.vc to ensure that PYTHONDIR is pointing to your Python installation, either a 32-bit or a 64-bit (x64) installation of Python will do. -2) Open an MSVC Command prompt and run "nmake Makefile.vc CFG=release" or "nmake Makefile.vc CFG=debug" in src\ for a release or debug build. -3) Optionally, add src\ into your PATH and run the previous step in test\. Run the tests by running the built .exe's. -4) Assuming you want to install in %INSTALL_DIR%, copy common.h, gl.h, gl_generated.h, wgl.h, wgl_generated.h, egl.h and egl_generated.h from include\epoxy\ to %INSTALL_DIR%\include\epoxy\, copy src\epoxy.lib to %INSTALL_DIR%\lib\ and copy epoxy-vs12.dll and epoxy-vs12.pdb (if you've built a debug build) from src\ to %INSTALL_DIR%\bin\. Create directories as needed. -5) To clean the project, repeat steps 2 and 3, adding " clean" to the commands. +Building (NMAKE) +----------------- +With MSVC you can also build directly with NMAKE: + +1) Check src\Makefile.vc to ensure that PYTHONDIR is pointing to your Python installation, either a 32-bit or a 64-bit (x64) installation of Python 2 or 3 will do. +2) Copy "include\epoxy\config.h.guess" to "include\epoxy\config.h". +3) Open an MSVC Command prompt and run "nmake Makefile.vc CFG=release" or "nmake Makefile.vc CFG=debug" in src\ for a release or debug build. +4) Optionally, add src\ into your PATH and run the previous step in test\. Run the tests by running the built .exe's. +5) Assuming you want to install in %INSTALL_DIR%, copy common.h, config.h, khrplatform.h, eglplatform.h, gl.h, gl_generated.h, wgl.h, wgl_generated.h, egl.h and egl_generated.h from include\epoxy\ to %INSTALL_DIR%\include\epoxy\, copy src\epoxy.lib to %INSTALL_DIR%\lib\ and copy epoxy-vs12.dll and epoxy-vs12.pdb (if you've built a debug build) from src\ to %INSTALL_DIR%\bin\. Create directories as needed. +6) To clean the project, repeat steps 2 and 3, adding " clean" to the commands. Switching your code to using epoxy ---------------------------------- @@ -65,7 +86,7 @@ It should be as easy as replacing: #include <GL/glext.h> #include <EGL/egl.h> #include <EGL/eglext.h> - #include <windows.h> // for WGL + #include <Windows.h> // for WGL with: @@ -98,14 +119,13 @@ GLEW has several issues: * Doesn't know about aliases of functions (There are 5 providers of glPointParameterfv, for example, and you don't want to have to choose which one to call when they're all the same). -* Doesn't support GL 3.2+ core contexts -* Doesn't support GLES. +* Doesn't support Desktop OpenGL 3.2+ core contexts. +* Doesn't support OpenGL ES. * Doesn't support EGL. * Has a hard-to-maintain parser of extension specification text instead of using the old .spec file or the new .xml. * Has significant startup time overhead when ```glewInit()``` autodetects the world. -* User-visible multithreading support choice for win32. The motivation for this project came out of previous use of libGLEW in [piglit](http://piglit.freedesktop.org/). Other GL dispatch code |