<div dir="ltr"><div class="gmail_extra"><div class="gmail_extra"><div class="gmail_extra"><div class="gmail_extra">Oh and another note, you cannot load your gl function such as (glClear in my previous reply, this time I use glGenTextures):</div><div class="gmail_extra"><br></div><div class="gmail_extra"><span class="m_-2230333533607922155gmail-Apple-tab-span" style="white-space:pre-wrap">     </span>var glGenTextures: procedure(n: GLsizei; var textures: GLuint); cdecl;</div><div class="gmail_extra"><br></div><div class="gmail_extra">Until you create and make current your OpenGL context.</div><div class="gmail_extra"><span class="m_-2230333533607922155gmail-Apple-tab-span" style="white-space:pre-wrap">      </span></div><div class="gmail_extra"><span class="m_-2230333533607922155gmail-Apple-tab-span" style="white-space:pre-wrap">      </span>SDL_GL_MakeCurrent(window, context); // after this is done the first time you can then load the OpenGL functions matching your requested version<span class="m_-2230333533607922155gmail-Apple-tab-span" style="white-space:pre-wrap">   </span></div><div class="gmail_extra"><span class="m_-2230333533607922155gmail-Apple-tab-span" style="white-space:pre-wrap"><br></span></div><div class="gmail_extra">So the order is</div><div class="gmail_extra"><br></div><div class="gmail_extra">SDL_Init()</div><div class="gmail_extra">SDL_GL_SetAttribute() multiple times</div><div class="gmail_extra">SDL_CreateWindow() returns your window</div><div class="gmail_extra">SDL_GL_CreateContext() returns your context</div><div class="gmail_extra">SDL_GL_MakeCurrent() makes gl functions available</div><div class="gmail_extra">SDL_GL_GetProcAddress() for every gl function in your requested versionĀ <br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Then you are done initializing everything and can write a game/demo/whatever thing you want.</div></div></div></div></div>