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.
11 years ago
Eric Anholt
4eaf4bfe21
Fill in the begin/end counting on win32.
11 years ago
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.
11 years ago
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.
11 years ago
Eric Anholt
0e7b9c0939
Fix generation of redundant typedefs.
11 years ago
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.
11 years ago
Eric Anholt
906d5b6e3a
Conditionalize building the EGL and GLX dispatch code.
11 years ago
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.
11 years ago
Eric Anholt
43acf7b021
Fix make distcheck.
...
Well, not quite. One of the regression tests is failing with
GLXBadFBConfig in that build. Not sure why.
11 years ago
Eric Anholt
26ca6ac8e8
Add missing #defines for GL versions and extensions.
...
Not having them broke some piglit ES2 compat tests.
11 years ago
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.
11 years ago
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.
11 years ago
Eric Anholt
8d208fff51
Print the missing provider information to stderr.
11 years ago
Eric Anholt
0983996e49
Fix calling new entrypoints from within glBegin()/glEnd().
11 years ago
Eric Anholt
4d0d93b1c0
Fix indentation in generated code
11 years ago
Eric Anholt
1cb041fbaa
Fix a compiler warning in the previous commit.
11 years ago
Eric Anholt
8bb5a2545e
Fix extension detection on core GL contexts.
...
The nasty old strings were deprecated.
11 years ago
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.
11 years ago
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.
11 years ago
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).
11 years ago
Eric Anholt
de70a2a0ab
Fix a similar bug to HEAD~2, this time in epoxy_has_glx_extension().
11 years ago
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.
11 years ago
Eric Anholt
2f811c543f
Clean up loader setup for GLX.
11 years ago
Eric Anholt
5f60534bac
Fix up an unfinished comment
11 years ago
Eric Anholt
42fd4b607a
Fix generation of the function pointer typedefs.
...
We were disagreeing with the GL headers on their names.
11 years ago
Eric Anholt
4564d31489
Use self.target instead of mucking around with the filename.
...
This cleans things up for upcoming EGL support.
11 years ago
Eric Anholt
502eaccfd4
Add whitespace in generated code after the enum strings.
11 years ago
Eric Anholt
2203a31ed2
Make function resolving be data-driven.
...
This saves another 24k of built code.
11 years ago
Eric Anholt
a82e54aafa
Make a table full of strings describing our providers.
...
By having shared code to print the names and a shared table of what
the names are, this reduces the built stripped size of the library by
80k.
11 years ago
Eric Anholt
6c1e0e38f3
Fix building from a clean source tree.
...
I had things mixed around wtih srcdir vs builddir, and we were getting
our deps generated into literally '$(builddir)/.deps/...', and then
the Makefile broke trying to include $(builddir)/.deps/... with
variable expansion.
11 years ago
Eric Anholt
8139c7c489
Actually implement GLX version detection.
11 years ago
Eric Anholt
75c97229d3
Assume GLX 1.2 is automatically available on Linux with GLX.
...
This prevents infinite recursion in dispatch when trying to find
symbols to determine the GLX version.
11 years ago
Eric Anholt
ed938dc4c5
Make a few more public functions actually public.
11 years ago
Eric Anholt
66d7b9fb02
Fix the version detection for GL < 3.
...
Those nice enums came late in the GL spec. This code is copied from
piglit, by Matt Turner in 2012.
11 years ago
Eric Anholt
a1d555e446
Fix a copy-and-paste mistake in getting GL version
11 years ago
Eric Anholt
e1a183c4eb
Remove accidentally committed debug printf.
11 years ago
Eric Anholt
69241485d1
Fix test for is_desktop_gl.
...
We're looking for "return true if no ES", and strcmp returns != 0 if
not match (the ES string).
11 years ago
Eric Anholt
0098d0a653
Sort the functions in the generated code.
...
This makes looking through the resulting code much nicer.
11 years ago
Eric Anholt
48297bb543
Fix parallel build of the generated source code.
...
Make didn't know that our rule generated all 3 things, so it would
generate 3 times, and in parallel you'd end up writing over each
other.
11 years ago
Eric Anholt
faad44cc0a
Fix the aliasing support to actually build.
...
Jordan asked me to show my code, so I pushed the snapshot I had,
forgetting that the build was broken at that point in commit
--amending.
11 years ago
Eric Anholt
4c9b7e63b1
Consistently use 4-space indents.
11 years ago
Eric Anholt
a909eb4a22
Add the generator and build infrastructure.
...
Not actually working yet, but it's a snapshot to start from.
11 years ago