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.
This commit is contained in:
Jonas Kulla 2013-09-23 07:15:01 +02:00
parent 88c1489554
commit 9e63fb6b64
29 changed files with 701 additions and 295 deletions

View file

@ -1,3 +1,5 @@
/* Shader for approximating the way RMXP does bitmap
* blending via DirectDraw */
uniform sampler2D source;
uniform sampler2D destination;
@ -6,9 +8,11 @@ uniform vec4 subRect;
uniform float opacity;
varying vec2 v_texCoord;
void main()
{
vec2 coor = gl_TexCoord[0].xy;
vec2 coor = v_texCoord;
vec2 dstCoor = (coor - subRect.xy) * subRect.zw;
vec4 srcFrag = texture2D(source, coor);