Commit Graph

23 Commits

Author SHA1 Message Date
Jonas Kulla c44f4d7d28 gl-util.h: GL_RGBA8 is not a legal internalformat under GLES2
GL_RGBA ought to be synonymous.
2014-07-19 15:40:40 +00:00
Jonas Kulla b8d861b4cd gl-util.h: Remove wrappers for things abstracted via GLMeta 2014-07-16 05:22:43 +02:00
Jonas Kulla a26c73930d GLMeta: Add framebuffer blitting support 2014-07-16 04:48:40 +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 ea20154978 Spacing 2014-05-22 05:49:06 +02:00
Jonas Kulla e0a4dfe372 Bitmap: Make #get_pixel/#set_pixel more accurate
This gets rid of the "batch/flush" semantics for #set_pixel
and instead just directly uploads the pixel color to the
texture, circumventing the float conversion entirely.
Also makes a lot of code simpler in many places as calling
'flush()' is no longer required for bitmaps.
2014-01-31 10:19:16 +01:00
Edward Rudd c6bd61d2de code style fixes 2014-01-01 11:01:05 -05: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 397856089d Tilemap: Optimize atlas assembly from mega surface tileset
Use 'glPixelStorei()' parameters to upload sub images
directly from the same surface instead of creating
helper surfaces to upload from.
2013-10-16 19:20:36 +02:00
Jonas Kulla caccee5db2 Fix up glew include paths 2013-10-14 02:22:34 +02:00
Jonas Kulla 20ec560145 Wrap color clear in 'FBO::clear()' convenience function 2013-10-01 13:10:14 +02:00
Jonas Kulla da4e0fbed0 Implement smooth scaling 2013-09-23 11:00:50 +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 4620901002 Forgot some EXT functions 2013-09-07 02:42:56 +02:00
Jonas Kulla 6c7d751dbd Remove 'Default' FBO binding (only allow 'Read' and 'Draw')
Also make code more verbose by removing default mode
parameter value to 'FBO::bind'
2013-09-06 14:56:30 +02:00
Jonas Kulla abc927c91d Use EXT version of gl functions 2013-09-06 14:37:28 +02:00
Jonas Kulla a9f400e64a Undef utility macro in header 2013-09-06 13:14:34 +02:00
Jonas Kulla 5ca513fcec Document gl-util types 2013-09-06 12:33:33 +02:00
Jonas Kulla b151a22f6e Rename 'Tex' to 'TEX' for consistency 2013-09-06 12:26:41 +02:00
Jonas Kulla ba3b904f34 Thanks to the ID abstraction, we can use proper overloading now! 2013-09-06 12:22:55 +02:00
Jonas Kulla 55596e9da9 Rename 'RB'(renderbuffer) to 'RBO'(renderbuffer object) 2013-09-06 12:16:24 +02:00
Jonas Kulla ff25887f41 Initial commit 2013-09-01 16:27:21 +02:00