2D View Issue
2 posters
2D View Issue
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 );
glPushMatrix();
{
glTranslatef( sio2->_SIO2window->scl->x * (-0.5f), sio2->_SIO2window->scl->y * (-0.5f), 0.0f );
}
glPopMatrix();
SIO2object *_SIO2object = ( SIO2object * )sio2ResourceGet( sio2->_SIO2resource, SIO2_OBJECT, "object/Sphere" );
sio2ObjectRender(_SIO2object, sio2->_SIO2window, sio2->_SIO2camera, 0, SIO2_RENDER_SOLID_OBJECT );
sio2WindowLeaveLandscape2D( sio2->_SIO2window );
sio2WindowLeave2D();
here's what i use:
io2WindowEnter2D( sio2->_SIO2window, 0.0f, 1.0f );
sio2WindowEnterLandscape2D( sio2->_SIO2window );
glPushMatrix();
{
glTranslatef( sio2->_SIO2window->scl->x * (-0.5f), sio2->_SIO2window->scl->y * (-0.5f), 0.0f );
}
glPopMatrix();
SIO2object *_SIO2object = ( SIO2object * )sio2ResourceGet( sio2->_SIO2resource, SIO2_OBJECT, "object/Sphere" );
sio2ObjectRender(_SIO2object, sio2->_SIO2window, sio2->_SIO2camera, 0, SIO2_RENDER_SOLID_OBJECT );
sio2WindowLeaveLandscape2D( sio2->_SIO2window );
sio2WindowLeave2D();
sctm81- Posts : 29
Join date : 2009-04-24
Re: 2D View Issue
Of course dude, when you enter 2D mode the units are in pixels... you have to scale your objects to be in screen coordinate...
Similar topics
» erratic problem exporting and rendering
» Not able to view texture
» about the camera view in tutorial03
» Looking for some guidance on game loop and 2d/3d view switching
» SIO2 1.4 is around the corner...
» Not able to view texture
» about the camera view in tutorial03
» Looking for some guidance on game loop and 2d/3d view switching
» SIO2 1.4 is around the corner...
Permissions in this forum:
You cannot reply to topics in this forum