Would you like to react to this message? Create an account in a few clicks or log in to continue.

2D View Issue

2 posters

Go down

2D View Issue Empty 2D View Issue

Post  sctm81 Wed May 06, 2009 1:55 am

I have been trying to use sio2WindowEnter2D( sio2->_SIO2window, 0.0f, 1.0f ) to show a simple sphere from blender that is positioned in the center in a 2D view. I am u sing glTranslatef to center the window. However when I run the simulator I only see a small white dot at the bottom left corner of the window, no matter what setting i change. Do I have to do any other change to the blender object or the window? Is it a problem that the exported file contains 3d vertexes (how would i export 2d vertexes from blender?)?

here's what i use:

io2WindowEnter2D( sio2->_SIO2window, 0.0f, 1.0f );
sio2WindowEnterLandscape2D( sio2->_SIO2window );

glTranslatef( sio2->_SIO2window->scl->x * (-0.5f), sio2->_SIO2window->scl->y * (-0.5f), 0.0f );
SIO2object *_SIO2object = ( SIO2object * )sio2ResourceGet( sio2->_SIO2resource, SIO2_OBJECT, "object/Sphere" );
sio2ObjectRender(_SIO2object, sio2->_SIO2window, sio2->_SIO2camera, 0, SIO2_RENDER_SOLID_OBJECT );

sio2WindowLeaveLandscape2D( sio2->_SIO2window );


Posts : 29
Join date : 2009-04-24

Back to top Go down

2D View Issue Empty Re: 2D View Issue

Post  sio2interactive Wed May 06, 2009 2:55 am

Of course dude, when you enter 2D mode the units are in pixels... you have to scale your objects to be in screen coordinate...

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

Back to top Go down

Back to top

- Similar topics

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