*added ImGUI styles
 *added new assets (fonts, shaders)
 *added cimgui.dll
 *added imports for bindbc-sdl (for WASM)
 *added simple demo
 *added demo launcher
 *added snake demo
 *impoved demo utils
 *added cimgui.bc library for WASM
-improved wasm build script
-small change in vector
This commit is contained in:
Mergul 2019-11-12 20:33:31 +01:00
parent 73f2aa6861
commit cb7609dcaa
82 changed files with 11188 additions and 413 deletions

Binary file not shown.

View file

@ -0,0 +1,42 @@
precision mediump int;
precision mediump float;
precision lowp sampler2D;
precision lowp samplerCube;
#ifdef GLES
#if __VERSION__ >290
in mediump vec2 uv;
#else
varying mediump vec2 uv;
#endif
#else
#if __VERSION__ > 320
in vec2 uv;
#else
varying vec2 uv;
#endif
#endif
//layout(binding = 0)uniform sampler2D tex;
uniform sampler2D tex;
//layout(location = 0) out vec4 outColor;
void main() {
#ifdef GLES
#if __VERSION__ >290
gl_FragColor = texture(tex,uv);
#else
gl_FragColor = texture2D(tex,uv);
#endif
#else
#if __VERSION__ > 320
gl_FragColor = texture(tex,uv);
#else
gl_FragColor = texture2D(tex,uv);
#endif
#endif
if(gl_FragColor.a < 0.01)discard;
}

View file

@ -0,0 +1,55 @@
precision highp float;
precision highp int;
precision lowp sampler2D;
precision lowp samplerCube;
#ifdef GLES
#if __VERSION__ >290
layout(location = 0) uniform vec4 matrix_1;
layout(location = 1) uniform vec4 matrix_2;
layout(location = 2) uniform vec4 uv_transform;
layout(location = 0) in vec2 positions;
layout(location = 1) in vec2 tex_coords;
out mediump vec2 uv;
#else
uniform vec4 matrix_1;
uniform vec4 matrix_2;
uniform vec4 uv_transform;
attribute vec2 positions;
attribute vec2 tex_coords;
varying mediump vec2 uv;
#endif
#else
#if __VERSION__ > 320
layout(location = 0) uniform vec4 matrix_1;
layout(location = 1) uniform vec4 matrix_2;
layout(location = 2) uniform vec4 uv_transform;
layout(location = 0) in vec2 positions;
layout(location = 1) in vec2 tex_coords;
out vec2 uv;
#else
uniform vec4 matrix_1;
uniform vec4 matrix_2;
uniform vec4 uv_transform;
attribute vec2 positions;
attribute vec2 tex_coords;
varying vec2 uv;
#endif
#endif
void main() {
vec3 position = mat3(matrix_1.x,matrix_1.y,0,matrix_1.z,matrix_1.w,0,matrix_2.xy,1) * vec3(positions,1.0);
uv = tex_coords * uv_transform.zw + uv_transform.xy;
gl_Position = vec4(position.xy,0,1.0);
}