montka

Members
  • Content count

    2
  • Joined

  • Last visited

Community Reputation

104 Neutral

About montka

  • Rank
    Newbie
  1. Hi, I enabled GL_CLIP_DISTANCE: glEnable(GL_CLIP_DISTANCE0); before I call glDrawArraysInstanced(); and my vertex shader looks that: #version 330 layout (location = 0) in vec2 position; layout (location = 1) in vec2 texcoord; layout (location = 2) in vec2 offset; out Vertex { vec2 position; vec2 texcoord; vec2 offset; } vertout; void main () { gl_ClipDistance[0] = -0.1; vertout.position = position; vertout.texcoord = texcoord; vertout.offset = offset; //gl_ClipDistance[1] = -1.0; } gl_ClipDistance is not working - everything is being rendered, why? What I did wrong? My GPU: Nvidia gtx 1060, drivers are up to date.    #edit glIsEnabled(GL_CLIP_DISTANCE0)) returns GL_TRUE;   #edit2 Ok, I know what was wrong. I use Tessellation, so I just filled gl_ClipDistance[0] = -1.0 there and now it's working correct.
  2. Good Morning! I have been trying to implement circular buffer - main VBO contains N values, so I use:  glDrawArrays(GL_PATCHES, 0, N); but the same VAO contains also different VBO with 6 elements. Data from this VBO should be wrapped- it means that the same value from second VBO should be used multiple times. Is it possible? How can I do it?