Skip to content

Commit c2f7b30

Browse files
dsheetsOneSadCookie
authored andcommitted
Updated frag shader for new glsl validators; updated array types
1 parent 3b0ebbf commit c2f7b30

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

web/scripts/gameui.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,13 +166,13 @@ function loadYSlice(gl, y, width, height, planes)
166166
'vbo': makeBuffer(
167167
gl,
168168
gl.ARRAY_BUFFER,
169-
new WebGLFloatArray(pos_array.concat(tc_array))),
169+
new Float32Array(pos_array.concat(tc_array))),
170170
'pos_offset': 0,
171171
'tc_offset': ix * 8,
172172
'ebo': makeBuffer(
173173
gl,
174174
gl.ELEMENT_ARRAY_BUFFER,
175-
new WebGLUnsignedShortArray(e_array)),
175+
new Uint16Array(e_array)),
176176
'count': e_count,
177177
'texture': textures['tiles'],
178178
'image': images['tiles'],
@@ -210,9 +210,9 @@ function makeDrawCommandForObjectAt(gl, tile, x, y)
210210
e_array = [0, 1, 2, 0, 2, 3]
211211

212212
gl.bindBuffer(gl.ARRAY_BUFFER, object_vbo)
213-
gl.bufferData(gl.ARRAY_BUFFER, new WebGLFloatArray(pos_array.concat(tc_array)), gl.STREAM_DRAW)
213+
gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(pos_array.concat(tc_array)), gl.STREAM_DRAW)
214214
gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, object_ebo)
215-
gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new WebGLUnsignedShortArray(e_array), gl.STREAM_DRAW)
215+
gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(e_array), gl.STREAM_DRAW)
216216

217217
if (!images['tiles'])
218218
{

web/shaders/boring.frag

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
uniform sampler2D texture;
22

3-
varying vec2 texture_coords;
3+
varying mediump vec2 texture_coords;
44

55
void main()
66
{

0 commit comments

Comments
 (0)