FORUM CLOSED, PLEASE REGISTER AT FORUM.SIO2INTERACTIVE.COM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Crash when rendering model as well as font

4 posters

Go down

Crash when rendering model as well as font Empty Crash when rendering model as well as font

Post  AstAn Wed Sep 09, 2009 12:15 pm

I can render a font or a model without any problem but when I am rendering both I get a crash EXC_BAD_ACCESS. The font is from a different package than the camera and the model. Another strange thing that happens is that the font seems to have the same vertex colours as the model like they are both sharing the same buffer.

Crash when rendering model as well as font Render10Crash when rendering model as well as font Callst10

It would be nice if someone could push me into the right direction. For me it seems like both use the same vertex buffer and both try to free it.

Daniel

AstAn

Posts : 12
Join date : 2009-08-22

Back to top Go down

Crash when rendering model as well as font Empty Re: Crash when rendering model as well as font

Post  IanLinart Wed Sep 09, 2009 2:07 pm

Can you post your init code?
IanLinart
IanLinart

Posts : 26
Join date : 2009-08-12
Age : 36
Location : Montréal

http://iapps.linart.qc.ca

Back to top Go down

Crash when rendering model as well as font Empty Re: Crash when rendering model as well as font

Post  AstAn Wed Sep 09, 2009 2:36 pm

Which part of the init code? I have wrapped a lot of stuff so it is not like I have one method that I could post here.

AstAn

Posts : 12
Join date : 2009-08-22

Back to top Go down

Crash when rendering model as well as font Empty Re: Crash when rendering model as well as font

Post  oioioi Wed Sep 09, 2009 2:48 pm

If you use sio2objectRender to render your object you have to call sio2objectReset after rendering the model, if you use sio2ResourceRender this is not the problem

oioioi

Posts : 136
Join date : 2008-12-02
Location : Norway

Back to top Go down

Crash when rendering model as well as font Empty Re: Crash when rendering model as well as font

Post  AstAn Wed Sep 09, 2009 3:18 pm

Thanks that was exactly the problem.

Another problem I have is that the font I render is overdrawing:

Crash when rendering model as well as font Overdr10

I wonder how that happens as the buffers are cleared each frame.

AstAn

Posts : 12
Join date : 2009-08-22

Back to top Go down

Crash when rendering model as well as font Empty Re: Crash when rendering model as well as font

Post  sio2interactive Wed Sep 09, 2009 3:24 pm

Like oioioi was saying you have to manage the state... so you have to reset what you have set on...

sio2ObjectReset();
sio2MaterialReset();
sio2FontReset();
sio2WidgetReset();

etc...

You can find more information in the code comments of the tutorials...
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 45
Location : Shanghai

http://sio2interactive.com

Back to top Go down

Crash when rendering model as well as font Empty Re: Crash when rendering model as well as font

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum