sio2FontPrint should disable color/normal array

View previous topic View next topic Go down

sio2FontPrint should disable color/normal array

Post  matt on Mon Nov 03, 2008 6:41 pm

My font was rendered in weird colors. I found out that it was because I was rendering a texture with client state GL_COLOR_ARRAY before. Therefore, sio2FontPrint should make sure that color and normal arrays are disabled before rendering.

Best,
Matt

matt

Posts : 155
Join date : 2008-09-30

View user profile http://elfrun.net

Back to top Go down

Re: sio2FontPrint should disable color/normal array

Post  sio2interactive on Mon Nov 03, 2008 7:25 pm

Sorry but no... if you are using an sio2 API to draw use its reset function to reset all the states, if you are drawing manually it is your job to turn back off everything that you have set... its like allocating / freeing memory the one that allocate it is responsible of freeing it Wink

Basic programming 101 rules Wink

Cheers,
avatar
sio2interactive

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

View user profile http://sio2interactive.com

Back to top Go down

Re: sio2FontPrint should disable color/normal array

Post  matt on Tue Nov 04, 2008 4:12 pm

So...
sio2interactive wrote:it is your job to turn back off everything that you have set
...if I've enabled GL_VERTEX_ARRAY, I shall disable it afterwards? Then SIO2 keeps black ;-)

Just kidding. You're right of course. It was my fault not to disable the color array in one of my own functions.

Best,
Matt

matt

Posts : 155
Join date : 2008-09-30

View user profile http://elfrun.net

Back to top Go down

Re: sio2FontPrint should disable color/normal array

Post  sio2interactive on Tue Nov 04, 2008 4:25 pm

GL_VERTEX_ARRAY should always be ON since its the only way to draw on the device...
avatar
sio2interactive

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

View user profile http://sio2interactive.com

Back to top Go down

Re: sio2FontPrint should disable color/normal array

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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