Vertex Buffer Objects (VBO) Support lazarus / 39-Graphics ---------------------------------------------------------------------- local-vision · 2013-07-09 15:29 Does the OpenGLControl offer Vertex Buffer Object support? And, if so so does anyone have a working example? Getting Vertex Arrays to work is not problem. But there seems very little on the subject of Vertex Buffer Objects and the OpenGLControl. Note: FYI I am familiar with VBO construct so please don't direct me to the OpenGL website as an answer unless it's Lazarus related. Again, I am looking for a working example with Lazarus and the OpenGLControl. Many thanks. ---------------------------------------------------------------------- BlueIcaro · 2013-07-09 17:21 Hello, in windows instalation, into examples folder, you 'll find a example about Openglcontrol use. In my computer I installed lazarus into  C driver so the path is: QuoteC:\lazarus\examples\openglcontrol OpenGlControl, only is a context (DC) crossplataform  to show your "opengl images" on the paint event you should use your opengl instructions to draw. For example Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i (...)glBindTexture(GL_TEXTURE_2D, textures[1]);    glBegin(GL_QUADS);      {Left Face}      glNormal3f(-1.0, 0.0, 0.0);      glTexCoord2f( 1.0, 1.0);     glVertex3f(-0.5, 0.5, 0.5);      glTexCoord2f( 0.0, 1.0);     glVertex3f(-0.5, 0.5,-0.5);      glTexCoord2f( 0.0, 0.0);   glVertex3f(-0.5,-0.5,-0.5);      glTexCoord2f( 1.0, 0.0);     glVertex3f(-0.5,-0.5, 0.5);      {Right Face}      glNormal3f( 1.0, 0.0, 0.0);      glTexCoord2f( 1.0, 1.0);     glVertex3f( 0.5, 0.5,-0.5);      glTexCoord2f( 0.0, 1.0);     glVertex3f( 0.5, 0.5, 0.5);      glTexCoord2f( 0.0, 0.0);     glVertex3f( 0.5,-0.5, 0.5);    glTexCoord2f( 1.0, 0.0);     glVertex3f( 0.5,-0.5,-0.5);          glEnd;(...)  See the example of OpengGlControl OpenglControl, only creates the DC, the opengl comands that you can use, depends of the version of GL file that you include into your uses clause. The versions that comes with Lazarus 1.10, is fpc 2.6.2, and this version of FreePascal, comes with a old version of OpenGL library, I think only suports until 2.0 OpenGL, I'm not sure, because I'm not a master in OpenGL. Also, if you download fpc 2.7.2 you will find the lasted opengl headers, that comes with the definitios of the lastest OpenGl Library, this is interesting if you want use Opengl 3.0 and above. I downloaded the fpc 2.7.2, and I take only the GL files to compile some samples with lazarus 1.10, and it's works nice. Also there is tutorial at the wiki about opengl http://wiki.lazarus.freepascal.org/OpenGL_Tutorial /BlueIcaro ---------------------------------------------------------------------- Leledumbo · 2013-07-09 22:09 QuoteDoes the OpenGLControl offer Vertex Buffer Object support?AFAIK no, OpenGLControl only provides LCL control that can be used to draw OpenGL scene. It doesn't provide any additional functionality. You might want to try GLScene for extremely much more powerful library. ---------------------------------------------------------------------- marcov · 2013-07-10 09:39 Note that nowadays (since opengl3) context creation needs explicit support for newer opengl features. Otherwise one is limited to opengl 1.x/2.x. ---------------------------------------------------------------------- User137 · 2013-07-10 12:06 Uhh.. TOpenGLControl is only window context. You should include a OpenGL 4.3 compatible header such as dglOpenGL (i use with nxPascal). http://files.delphigl.com/new/dglOpenGL.zip You can use VBO's, latest fragment shaders and so forth. Every internet guide for C++ and other languages you can find, about OpenGL commands works exactly the same here. It's just the calling order for them that matter, but they all rely on the same DLL. ---------------------------------------------------------------------- local-vision · 2013-07-11 00:56 Thanks for all the input. Very Much Appreciated. My experience with the OpenGLControl has been very positive. It makes things very easy while allowing me to remain low level in terms of OpenGL. QuoteTOpenGLControl is only window context Agreed. But I can move my Lazarus OpenGL project to Mac, Linux and Windows as if it were all the same thing. Sure, at the same time GLScene and, in particular, dglOpenGL certainly have my attention. But can these be used on the Mac, Windows as well as Linux? Any examples? ---------------------------------------------------------------------- User137 · 2013-07-11 07:12 Quote from: local-vision on July 11, 2013, 02:56:35 amAny examples?Yes, i'm using TOpenGLContext along with dglOpenGL in nxPascal https://code.google.com/p/nxpascal/ In addition to other simple ones, such as texture demo, there is also demo for custom window creation. I haven't gotten to test these on Linux, but i never include Windows in uses-list, so i assume it's all crossplatform.