title: Awesomium with OpenGL Texture Shift
body: <p>I'm trying to use awesomium with opengl (glut and cpp) and I'm having trouble rendering the webpages to textures. The textures are randomly (different every time I run the program) shifted in the x and y axis. Picture: <img src="https://i.stack.imgur.com/4qGrZ.jpg" alt="Shifted Texture"> </p>
  
  <p>I thought GL_CLAMP_TO_EDGE would take care of that problem but it did not. What am I doing wrong?</p>
  
  <p>The Awesomiumpart:</p>
  
  <pre><code>    web_core = WebCore::Initialize(WebConfig());
      view  = web_core-&gt;CreateWebView(WIDTH, HEIGHT);
      WebURL url(WSLit(URL));
      view-&gt;LoadURL(url);
      BindMethods(view);
      while (view-&gt;IsLoading())
          web_core-&gt;Update();
      Sleep(300);
      web_core-&gt;Update();
      surface = (BitmapSurface*)view-&gt;surface();  
  </code></pre>
  
  <p>The part loading the texture:</p>
  
  <pre><code>    glBindTexture(GL_TEXTURE_2D, 13);   
      glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
      glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
      glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
      glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
      glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, WIDTH, HEIGHT, 0,
          GL_BGRA_EXT, GL_UNSIGNED_BYTE, surface);
  </code></pre>