Commit Graph

12 Commits

Author SHA1 Message Date
Jonas Kulla 27b7815f52 GLState: Remove 'BlendNone' mode in favor of disabling blending alltogether 2014-07-20 13:17:12 +02:00
Jonas Kulla 6c481e5eb8 Eliminate GLEW dependency
GL entrypoint resolution is now done manually. This has a couple
immediate benefits, such as not having to retrieve hundreds of
functions pointers that we'll never use. It's also nice to have
an exact overview of all the entrypoints used by mkxp.

This change allows mkxp to run fine with core contexts, not sure
how relevant that is going to be in the future.

What's noteworthy is that  _all_ entrypoints, even the ones core
in 1.1 and guaranteed to be in every libGL, are resolved
dynamically.
This has the added benefit of not having to link directly against
libGL anymore, which also cleans up the output of `ldd` quite
a bit (SDL2 loads most system deps dynamically at runtime).

GL headers are still required at build time.
2014-06-13 18:46:45 +02:00
Jonas Kulla 2cc2ebca31 GLState: Get rid of GL_TEXTURE_2D enable/disable
This bit was deprecated/removed in core GL.

There was only one place where this was used (flash tiles
in Tilemap), and since the full shader rewrite, it was
effectively a no-op anyway (flash shader doesn't sample texture).
2014-05-30 23:13:58 +02:00
Jonas Kulla 87c1e376b9 GLState: Add bound shader program to managed state
Squishes a handful of redundant binds per frame.
2014-01-20 00:58:39 +01:00
Edward Rudd eacc143ea0 update extension usage..
nearly all of the previous required extensions are CORE in OpenGL 2.0
the remaining ones need to have fallback checks for ARB vs EXT vs APPLE 
variants..
2013-12-31 16:31:03 -05:00
Jonas Kulla ef2430e0c3 Sanitize #include statements
The general rule I'm aiming for is to <> include
system wide / installed paths / generally everything
that's outside the git managed source tree (this means
mruby paths too!), and "" include everything else,
ie. local mkxp headers.

The only current exception are the mri headers, which
all have './' at their front as to not clash with
system wide ruby headers. I'm leaving them be for now
until I can come up with a better general solution.
2013-12-04 17:48:37 +01:00
Jonas Kulla caccee5db2 Fix up glew include paths 2013-10-14 02:22:34 +02:00
Jonas Kulla 39436ad231 Fix up SDL2 include paths
Using "SDL2/SDL_xxx.h" instead of "SDL_xxx.h" caused
the include paths provided by pkg-config to be ignored,
and headers from a standard include path to be used instead.
2013-10-13 23:21:34 +02:00
Jonas Kulla 9e63fb6b64 Remove the remaining bits of deprecated GL usage
The drawing is now completely shader based, which makes away
with all usage of the depracted matrix stack. This also allows
us to do things like simple translations and texture coordinate
translation directly instead of doing everything indirectly
through matrices.

Fixed vertex attributes ('vertexPointer()' etc) are also
replaced with user defined attribute arrays.
2013-09-23 07:50:22 +02:00
Jonas Kulla abc927c91d Use EXT version of gl functions 2013-09-06 14:37:28 +02:00
Jonas Kulla a21423ca1c Move GL state initialization into GLState 2013-09-04 21:05:47 +02:00
Jonas Kulla ff25887f41 Initial commit 2013-09-01 16:27:21 +02:00