Cucus

Members
  • Content count

    2
  • Joined

  • Last visited

Community Reputation

100 Neutral

About Cucus

  • Rank
    Newbie
  1. Hi, I'm checking information about a way to make a colision detection with openGL methods. A way to detect this is looking if a pixel is drawed two times (two objects in the same place). So, is there somewhere a place to find information about this? Thanks
  2. Hi, I'm trying to render a robot which has 7 joints. Each joint is an object called "Joint". I load the vertices correctly but I don't know why I can just see the first joint. I new in openGL so I don't understand very well if my calls are correct or not and the reason why... Here you can check my code: vertexArray is the array where I put my vertexs points previously. GLuint vertexs[color="#000000"];[/color] glGenBuffers[color="#000000"]([/color][color="#000080"]1[/color][color="#000000"],&[/color]vertexs[color="#000000"]);[/color] glBindBuffer[color="#000000"]([/color]GL_ARRAY_BUFFER[color="#000000"],[/color]vertexs[color="#000000"]);[/color] glBufferData[color="#000000"]([/color]GL_ARRAY_BUFFER[color="#000000"],[/color]sizeVertex[color="#000000"]*[/color][color="#808000"]sizeof[/color][color="#000000"]([/color]GLfloat[color="#000000"]),[/color]vertexArray[color="#000000"],[/color]GL_DYNAMIC_DRAW[color="#000000"]);[/color] glEnableVertexAttribArray[color="#000000"]([/color][color="#000080"]0[/color][color="#000000"]);[/color] glVertexAttribPointer[color="#000000"]([/color][color="#000080"]0[/color][color="#000000"],[/color] [color="#000080"]3[/color][color="#000000"],[/color] GL_FLOAT[color="#000000"],[/color] GL_FALSE[color="#000000"],[/color] [color="#000080"]0[/color][color="#000000"],[/color] [color="#000080"]0[/color][color="#000000"]);[/color] the render function: [color="#808000"]void[/color] Joint[color="#000000"]::[/color]render[color="#000000"]()[/color][color="#000000"]{[/color] glDrawArrays[color="#000000"]([/color]GL_TRIANGLES[color="#000000"],[/color][color="#000080"]0[/color][color="#000000"],[/color]sizeVertex[color="#000000"]);[/color]} Can you see a problem? Thanks