- Sort Posts
- 6 replies
- Last post
Re: adding virtual buttons
Hi Ruben,
I reproduced your mistake I believe - I made all the obvious changes and got the same crash.
But it turned out to simply be the length of the vbVertices array in renderFrameQCAR which is hard coded to 24 * 4 = 96. Change this to:
GLfloat vbVertices[NUM_BUTTONS * 24];
and you'll find the problem goes away. This array of vertices is used to draw the outlines of the virtual buttons.
Re: adding virtual buttons
I get
EXC_BAD_ACCESS
The error is in this line
// Iterate through this target's virtual buttons:
for (int i = 0; i getNumVirtualButtons(); ++i) {
target->getNumVirtualButtons() has value"5" .
I dont understand nothing
I don´t need toggle buttons, only show 5 .
Tahnk you
Re: adding virtual buttons
Hi Ruben,
(Assuming you're using SDK 1.5)
I believe that's all you need to do. Is it not working? If not, in what way is it not working?
If, like the other buttons in the sample app, you want to have a menu entry to toggle the new virtual button, then you'll also need to edit EAGLView.mm:VirtualButton_UpdateCallback and VBOverlayViewController.mm to add the menu entry.
good to know!