title: Drawing points using openGL/SDL
body: <p>i'm trying to track my hands then for each x,y i will draw a point on openGL window .</p>
  
  <p>that's my code :</p>
  
  <pre><code>#include "GraphicsEffects.h"
  #include "Errors.h"
  
  GraphicsEffects::GraphicsEffects():
   _vboID(0)
  {}
  
  
  void GraphicsEffects::init(){
  SDL_Init(SDL_INIT_EVERYTHING);
  _window = SDL_CreateWindow("2D Painting", SDL_WINDOWPOS_CENTERED,       SDL_WINDOWPOS_CENTERED , 600, 600, SDL_WINDOW_OPENGL);
  
  if(_window == nullptr){
      fatalError("SDL window could not be created! "); }
  
  
  SDL_GLContext glContext = SDL_GL_CreateContext(_window);
  if(glContext == nullptr) {
      fatalError("SDL_GL context could not be created!");
  }
  
  GLenum error = glewInit();
  if(error != GLEW_OK){
      fatalError("Could not initialize glew!");
  }
  
  SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
  glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
  
  if(_vboID == 0){
      glGenBuffers(1, &amp;_vboID);
  }
  
  _colorProgram.compileShaders("Shaders/color.vert", "Shaders/color.frag");
  _colorProgram.addAttribute("vertexPosition");
  _colorProgram.linkShaders();
  
  }
  
  
  void GraphicsEffects::draw(int x, int y){
  int pointData[2];
  pointData[0] = x;
  pointData[1] = y;
  
  glClearDepth(1.0);
  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
  
  _colorProgram.use();
  
  glBindBuffer(GL_ARRAY_BUFFER, _vboID);
  
  glBufferData(GL_ARRAY_BUFFER, sizeof(pointData), pointData, GL_STATIC_DRAW);
  glEnableVertexAttribArray(0);
  glVertexAttribPointer(0, 2, GL_INT, GL_FALSE, 0, 0);
  
  glDrawArrays(GL_POINT, 0, 1);
  
  glBindBuffer(GL_ARRAY_BUFFER, 0);
  
  _colorProgram.unuse();
  
  SDL_GL_SwapWindow(_window);
  
  
  }
  </code></pre>
  
  <p>For Shaders/color.vert : "vertex shader file" </p>
  
  <pre><code>#version 130
  
  in vec2 vertexPosition;
  
  void main() {
      gl_Position.xy = vertexPosition;
      gl_Position.z = 0;
      gl_Position.w = 1.0;
  }
  </code></pre>
  
  <p>for Shader/color.frag: "fragment shader" </p>
  
  <pre><code>#version 130 
  
  out vec4 color ;
  
  void main() {
      color = vec4(1.0, 1.0, 0.0, 1.0);
  }
  </code></pre>
  
  <p>i expected i will get points with my (x,y) movements but nothing appears on the window ! </p>