Commit Graph
367 Commits
Author SHA1 Message Date
Eric Anholt f4992e1518 Use get_core_proc_address() on win32.
This is needed for glGetString() lookup to work, since
wglGetProcAddress() returns NULL for core procs.
2013-12-10 14:11:26 -08:00
Eric Anholt 4eaf4bfe21 Fill in the begin/end counting on win32. 2013-12-10 14:11:26 -08:00
Eric Anholt b128dd9b25 Move the check for whether to dlsym or GPA on linux to the common C code.
This is going to change for macos and win32, and this will be easier
than trying to spread that logic through the python code and into the
generated code.
2013-12-09 23:01:33 -08:00
Eric Anholt d73f06fb45 Use ``` on a bunch of code in the README.
Some of it is to be prettier, and some of it is to avoid misformatting
when using live preview at http://tmpvar.com/markdown.html
2013-12-09 22:57:41 -08:00
Eric Anholt edf5aedb6f Rewrite a lot of the README.
The story about how we came to needing GetProcAddress functions isn't
that interesting, but the featureset is something that should be
(particularly when comparing to similar tools that exist).

Fixes #7
2013-12-09 22:54:23 -08:00
Carl Worth 880b6b39a5 Convert list of items to an actual list
Otherwise, these were running together in a single line, making them
hard to read.
2013-12-09 22:23:16 -08:00
Carl Worth eb5f6ac74e Fix "include" examples to use Github-flavored code block
Previously, these lines were using '>' which is the Markdown syntax
for a "blockquote", but within this, the '#' in "#include" was still
interpreted as a header, (which was not desired), and throwing away
the rest of the line.

It seems that a "codeblock" is what is wanted here instead, (which
should result in un-interpreted text wrapped in <pre>). Markdown
expects 4-space indent for this.

See:

	https://help.github.com/articles/github-flavored-markdown
2013-12-09 22:22:33 -08:00
Eric Anholt bfd687da89 Port tests directory to win32. 2013-12-06 18:34:46 -08:00
Eric Anholt 259136845d Start porting the GL dispatch code to win32.
It now builds successfully builds a .dll file.  Not that it's usable
or anything yet.
2013-12-06 18:34:46 -08:00
Eric Anholt 0e7b9c0939 Fix generation of redundant typedefs. 2013-12-06 17:32:13 -08:00
Eric Anholt 60ea7c38a2 Move GLX/EGL dispatch code using those API types to separate files.
The dlopen bits are left in place, but the functions required the
types, and in the case of EGL, the types require that the platform
header actually exists.
2013-12-06 15:50:01 -08:00
Eric Anholt 906d5b6e3a Conditionalize building the EGL and GLX dispatch code. 2013-12-06 15:50:01 -08:00
Eric Anholt 0d7d26537d Conditionalize building GLX and EGL tests and headers.
Note that the generated code is still generated, they just aren't
built and installed.  The goal with that is that someone could take
the built .c and .h files and drop it into their own project, if they
want to avoid shared libs.
2013-12-06 15:50:01 -08:00
Eric Anholt 19053c4d6f Fix out of tree build 2013-12-06 15:50:01 -08:00
Eric Anholt 43acf7b021 Fix make distcheck.
Well, not quite.  One of the regression tests is failing with
GLXBadFBConfig in that build.  Not sure why.
2013-12-06 11:50:00 -08:00
Eric Anholt 01ce694073 Add a compile-time test for missing #defines. 2013-12-06 11:38:41 -08:00
Eric Anholt 08101c5145 Add some more defines that are present in normal gl.h 2013-12-06 11:38:41 -08:00
Eric Anholt 26ca6ac8e8 Add missing #defines for GL versions and extensions.
Not having them broke some piglit ES2 compat tests.
2013-12-05 17:40:16 -08:00
Eric Anholt 1626703ca5 Add a missing ATI enum token to the registry.
There's no spec for this, but it's mentioned widely enough on the
internet that they'd better not allocate anything else to it.
2013-12-05 17:26:08 -08:00
Eric Anholt 604d9a085e Remove incorrect alias for BindVertexArray.
From Mesa:
        /* The "Interactions with APPLE_vertex_array_object" section of the
          * GL_ARB_vertex_array_object spec says:
          *
          *     "The first bind call, either BindVertexArray or
          *     BindVertexArrayAPPLE, determines the semantic of the object."
          */
2013-12-05 17:04:31 -08:00
Eric Anholt f097de94eb Add support for GLES extensions.
I think we don't want to be checking that the context is actually of
the declared types -- if the extension is exposed in the extension
string, the entrypoints had better be there.
2013-12-05 15:41:27 -08:00
Eric Anholt 9b8ac73231 Improve the quality of the missing providers output.
In particular, note when it's probably our bug, not the app's bug.
2013-12-05 15:15:12 -08:00
Eric Anholt 8d208fff51 Print the missing provider information to stderr. 2013-12-05 15:11:36 -08:00
Eric Anholt 0983996e49 Fix calling new entrypoints from within glBegin()/glEnd(). 2013-12-05 15:07:08 -08:00
Eric Anholt 9ffa5d25c4 Add a test for a bug when called during glBegin()/glEnd(). 2013-12-05 15:07:08 -08:00
Eric Anholt 4d0d93b1c0 Fix indentation in generated code 2013-12-05 13:14:47 -08:00
Eric Anholt 1cb041fbaa Fix a compiler warning in the previous commit. 2013-12-05 13:07:09 -08:00
Eric Anholt 8bb5a2545e Fix extension detection on core GL contexts.
The nasty old strings were deprecated.
2013-12-05 13:02:51 -08:00
Eric Anholt 20f03e65c4 Add a new test for our public API against a core context.
Our extension detection for core is totally broken.
2013-12-05 12:56:58 -08:00
Eric Anholt a258cdcffe Pull a helper function from piglit.
I need this for doing testing against core contexts.
2013-12-05 12:56:58 -08:00
Eric Anholt f2d5248e3d Add missing .gitignore bits for EGL 2013-12-05 12:56:57 -08:00
Eric Anholt c6df72b7d0 Drop a bit of commented out python.
It was used in debugging before I figured out I needed to resolve
aliases late.
2013-12-05 12:38:42 -08:00
Eric Anholt 0270c80008 Add support for EGL.
This totally replaces the getprocaddress and dlsym code, which was
basically just stubs up until now.  The is_glx/is_egl() is also
dropped -- they weren't doing anything, and the only false answer they
could give is if the dlopen were to fail.
2013-12-05 12:38:15 -08:00
Eric Anholt 111c54992b Drop the installed _common.h headers.
I was thinking at one point that part of the build was going to
require not including the #defines from the generated code, but would
want these prototypes.  It turns out that's not the case (and if it
is, I'll just wrap the #defines in an ifdef).
2013-12-05 11:12:23 -08:00
Eric Anholt 2be86a9a9c Add .gitignore for the built tests. 2013-12-05 11:06:23 -08:00
Eric Anholt 2ba8d853b4 Add some more gl.h definitions that might be used by applications.
These in particular get used by software that was doing
GetProcAddress, and we want to be able to just drop in our gl.h
instead.
2013-12-04 23:10:13 -08:00
Eric Anholt 725b8cfc81 Add C++ guards. 2013-12-04 23:07:13 -08:00
Eric Anholt de70a2a0ab Fix a similar bug to HEAD~2, this time in epoxy_has_glx_extension(). 2013-12-04 19:22:13 -08:00
Eric Anholt 7603c144db Add a failing testcase for the public API of epoxy_has_glx_extension. 2013-12-04 19:20:34 -08:00
Eric Anholt 0f67bf3f11 Fix bug in public entrypoint for epoxy_glx_version()
Unfortunately, for GLX 1.4+ entrypoints (just glxGetProcAddress
currently) or extensions, if there isn't a context bound then we don't
have a dpy and screen available to provide useful debug messages.  Oh
well.
2013-12-04 19:18:31 -08:00
Eric Anholt 14f822ee91 Add a testcase for a bug in the public API. 2013-12-04 19:18:31 -08:00
Eric Anholt 2f811c543f Clean up loader setup for GLX. 2013-12-04 19:01:07 -08:00
Eric Anholt 5f60534bac Fix up an unfinished comment 2013-12-04 19:01:07 -08:00
Eric Anholt 617fd39b5b Add a test for including system GL headers after epoxy. 2013-12-04 16:19:20 -08:00
Eric Anholt 689abf4d4d Fix including system glx.h after our glx.h 2013-12-04 16:19:20 -08:00
Eric Anholt 106298f2f9 Add a little more testing of our public GLX API. 2013-12-04 16:11:53 -08:00
Eric Anholt 42fd4b607a Fix generation of the function pointer typedefs.
We were disagreeing with the GL headers on their names.
2013-12-04 16:07:15 -08:00
Eric Anholt 4564d31489 Use self.target instead of mucking around with the filename.
This cleans things up for upcoming EGL support.
2013-12-02 19:19:31 -08:00
Eric Anholt 502eaccfd4 Add whitespace in generated code after the enum strings. 2013-12-02 16:18:34 -08:00
Eric Anholt 2203a31ed2 Make function resolving be data-driven.
This saves another 24k of built code.
2013-12-02 16:18:34 -08:00