knighce

Member
  • Content count

    2
  • Joined

  • Last visited

Community Reputation

143 Neutral

About knighce

  • Rank
    Newbie
  1. How to draw in modern OpenGL

    Thanks for the replies. I think I get it now.
  2. How to draw in modern OpenGL

    Hi, I'm fairly new here and I'm also new to modern OpenGL. I am currently learning OpenGL 3 which I suppose is the starting point of the modern OpenGL. Now for my newb question, how do I draw multiple polygons (such as 2 separate triangles) in OpenGL. I remember in the old OpenGL, you could do something like multiple call to glBegin()~glEnd() translating them to different locations. But how do i this using OpenGL objects?(vao,vbo, etc.) Sorry if I look brainless asking this question, but maybe someone could help me. Thanks in advance. Details below - Wall of text (you can skip it if you don't have time) I have gone through different tutorials and could draw single triangle or even a cube. However for some reason I dont get how to draw multiple polygons in different location (not connected, as the cube is composed of multiple triangles). Maybe I just don't fully understand how OpenGL objects work. I believe it has to do with vertex buffer object. I drew my triangle or cube using a vertex buffer which is supplied with an array of vertices as the buffer data. But how do i draw another cube in different location resulting in having two cudes on the screen? Many thanks, Jonah