the error of integrate with ogre iOS

Help with integrating libRocket into your engine and game

Re: the error of integrate with ogre iOS

Postby underdoeg on Thu Aug 16, 2012 4:24 pm

Hi, I'm having the same problem. Did you ever succeed converting it to 16bits?

thanks
underdoeg
 
Posts: 10
Joined: Tue Mar 27, 2012 4:48 pm

Re: the error of integrate with ogre iOS

Postby underdoeg on Thu Aug 16, 2012 5:18 pm

actually I got the geometry to render with this code:

Code: Select all
// Create the index buffer.
        Ogre::HardwareIndexBufferSharedPtr index_buffer = Ogre::HardwareBufferManager::getSingleton().createIndexBuffer(Ogre::HardwareIndexBuffer::IT_16BIT, num_indices, Ogre::HardwareBuffer::HBU_STATIC_WRITE_ONLY);
        geometry->render_operation.indexData->indexBuffer = index_buffer;
        geometry->render_operation.useIndexes = true;

        // Fill the index buffer.
    uint16_t* ogre_indices = (uint16_t*)index_buffer->lock(0, index_buffer->getSizeInBytes(), Ogre::HardwareBuffer::HBL_NORMAL);
        //memcpy(ogre_indices, indices, sizeof(unsigned int) * num_indices);
        for (int i = 0; i < num_indices; ++i)
        {
        ogre_indices[i] = indices[i];
    }
    index_buffer->unlock();


But the font does not yet render correctly. all I see are white rectangles....
underdoeg
 
Posts: 10
Joined: Tue Mar 27, 2012 4:48 pm

Re: the error of integrate with ogre iOS

Postby yaxinhoo on Wed Aug 22, 2012 5:22 am

i got the same result with , viewtopic.php?f=2&t=931 . but it just work for gles1 , no for gles2 , when render on gles2 , it always crash on render.
yaxinhoo
 
Posts: 47
Joined: Sat Sep 18, 2010 4:52 am

Previous

Return to Engine Integration


cron