Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Cucus

Member Since 16 May 2011
Offline Last Active Jun 30 2011 09:37 AM

Topics I've Started

drawing a pixel two times

29 June 2011 - 08:12 AM

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

Troubles with glEnableVertexAttribArray

16 May 2011 - 01:21 PM

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;
glGenBuffers(1,&vertexs);
glBindBuffer(GL_ARRAY_BUFFER,vertexs);
glBufferData(GL_ARRAY_BUFFER,sizeVertex*sizeof(GLfloat),vertexArray,GL_DYNAMIC_DRAW);
glEnableVertexAttribArray(0);
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, 0);

the render function:
void Joint::render(){ glDrawArrays(GL_TRIANGLES,0,sizeVertex);}

Can you see a problem? Thanks

PARTNERS