Deleting a shape in opengl
Hello,
I created a cube and I've made some changes in it. I want to delete the cube and create a new one during the program's run. How can I do it? Is there a function that erases vertexes and deletes the shape?
Thanks
no.
There is no way to erase vertices after you have rendered them.
I think you misunderstand how frame based real time graphics works.
IF you describe in detail what you want done then i might help you.
There is no way to erase vertices after you have rendered them.
I think you misunderstand how frame based real time graphics works.
IF you describe in detail what you want done then i might help you.
www.flashbang.se | www.thegeekstate.com | nehe.gamedev.net | glAux fix for lesson 6 | [twitter]thegeekstate[/twitter]
If your not using any sort of call list and you're keeping the vertices yourself and rendering them with glDrawArray or glDrawElements or even just glVertex calls you can during runtime change those values and see the changes on screen. As for deleting them if your storing the verts say in a pointer you could delete the pointer, have a check that says if this pointer is null then don't draw this cube.
example:
void rendercube()
{
if(pVerts)
{
//some draw code here
}
return;
}
example:
void rendercube()
{
if(pVerts)
{
//some draw code here
}
return;
}
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement