|
|
|
|
171
|
slop::SlopSelection slop::GLSlopSelect( slop::SlopOptions* options, bool* cancelled, SlopWindow* window ) {
|
171
|
slop::SlopSelection slop::GLSlopSelect( slop::SlopOptions* options, bool* cancelled, SlopWindow* window ) {
|
172
|
slop::mouse = new slop::Mouse( x11, options->nodecorations, window->window );
|
172
|
slop::mouse = new slop::Mouse( x11, options->nodecorations, window->window );
|
173
|
|
173
|
|
174
|
- std::string vert = "#version 130\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 uvCoord;\nvoid main()\n{\nuvCoord = uv;\ngl_Position = vec4(position,0,1);\n}\n";
|
|
|
175
|
- std::string frag = "#version 130\n uniform sampler2D texture;\n varying vec2 uvCoord;\n out vec4 outColor;\n void main()\n {\n outColor = texture2D( texture, uvCoord );\n }\n";
|
|
|
|
|
174
|
+ std::string vert = "#version 120\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 uvCoord;\nvoid main()\n{\nuvCoord = uv;\ngl_Position = vec4(position,0,1);\n}\n";
|
|
|
175
|
+ std::string frag = "#version 120\nuniform sampler2D texture;\nvarying vec2 uvCoord;\nvoid main()\n {\ngl_FragColor = texture2D( texture, uvCoord );\n}\n";
|
176
|
slop::Shader* textured = new slop::Shader( vert, frag, false );
|
176
|
slop::Shader* textured = new slop::Shader( vert, frag, false );
|
177
|
std::vector<slop::Shader*> shaders;
|
177
|
std::vector<slop::Shader*> shaders;
|
178
|
for( int i=0;i<options->shaders.size();i++ ) {
|
178
|
for( int i=0;i<options->shaders.size();i++ ) {
|