diff --git a/src/itdelatrisu/opsu/objects/curves/Curve.java b/src/itdelatrisu/opsu/objects/curves/Curve.java index fad50877..682fda94 100644 --- a/src/itdelatrisu/opsu/objects/curves/Curve.java +++ b/src/itdelatrisu/opsu/objects/curves/Curve.java @@ -87,12 +87,12 @@ public static void init(int width, int height, float circleSize, Color borderCol Curve.borderColor = borderColor; ContextCapabilities capabilities = GLContext.getCapabilities(); - mmsliderSupported = capabilities.GL_EXT_framebuffer_object && capabilities.OpenGL30; + mmsliderSupported = capabilities.GL_EXT_framebuffer_object; if (mmsliderSupported) CurveRenderState.init(width, height, circleSize); else { if (Options.getSkin().getSliderStyle() != Skin.STYLE_PEPPYSLIDER) - Log.warn("New slider style requires FBO support and OpenGL 3.0."); + Log.warn("New slider style requires FBO support."); } } diff --git a/src/itdelatrisu/opsu/render/CurveRenderState.java b/src/itdelatrisu/opsu/render/CurveRenderState.java index 3696a056..ed8ffb39 100644 --- a/src/itdelatrisu/opsu/render/CurveRenderState.java +++ b/src/itdelatrisu/opsu/render/CurveRenderState.java @@ -409,12 +409,12 @@ public void initShaderProgram() { program = GL20.glCreateProgram(); int vtxShdr = GL20.glCreateShader(GL20.GL_VERTEX_SHADER); int frgShdr = GL20.glCreateShader(GL20.GL_FRAGMENT_SHADER); - GL20.glShaderSource(vtxShdr, "#version 130\n" + GL20.glShaderSource(vtxShdr, "#version 110\n" + "\n" - + "in vec4 in_position;\n" - + "in vec2 in_tex_coord;\n" + + "attribute vec4 in_position;\n" + + "attribute vec2 in_tex_coord;\n" + "\n" - + "out vec2 tex_coord;\n" + + "varying vec2 tex_coord;\n" + "void main()\n" + "{\n" + " gl_Position = in_position;\n" @@ -426,22 +426,21 @@ public void initShaderProgram() { String error = GL20.glGetShaderInfoLog(vtxShdr, 1024); Log.error("Vertex Shader compilation failed.", new Exception(error)); } - GL20.glShaderSource(frgShdr, "#version 130\n" + GL20.glShaderSource(frgShdr, "#version 110\n" + "\n" + "uniform sampler1D tex;\n" + "uniform vec2 tex_size;\n" + "uniform vec3 col_tint;\n" + "uniform vec4 col_border;\n" + "\n" - + "in vec2 tex_coord;\n" - + "out vec4 out_colour;\n" + + "varying vec2 tex_coord;\n" + "\n" + "void main()\n" + "{\n" - + " vec4 in_color = texture(tex, tex_coord.x);\n" + + " vec4 in_color = texture1D(tex, tex_coord.x);\n" + " float blend_factor = in_color.r-in_color.b;\n" + " vec4 new_color = vec4(mix(in_color.xyz*col_border.xyz,col_tint,blend_factor),in_color.w);\n" - + " out_colour = new_color;\n" + + " gl_FragColor = new_color;\n" + "}"); GL20.glCompileShader(frgShdr); res = GL20.glGetShaderi(frgShdr, GL20.GL_COMPILE_STATUS);