worked a bit more on the serialization, and added a preliminary SerializeDemo.
This commit is contained in:
@@ -133,9 +133,9 @@ void GL_DialogWindow::draw(btScalar deltaTime)
|
||||
if (!m_screenWidth || !m_screenHeight)
|
||||
return;
|
||||
|
||||
m_dialogHorPos = m_collisionObject->getWorldTransform().getOrigin()[0]+m_screenWidth/2-m_dialogWidth/2;
|
||||
m_dialogHorPos = int(m_collisionObject->getWorldTransform().getOrigin()[0]+m_screenWidth/2.f-m_dialogWidth/2.f);
|
||||
|
||||
m_dialogVertPos = m_collisionObject->getWorldTransform().getOrigin()[1]+m_screenHeight/2-m_dialogHeight/2;
|
||||
m_dialogVertPos = int(m_collisionObject->getWorldTransform().getOrigin()[1]+m_screenHeight/2.f-m_dialogHeight/2.f);
|
||||
saveOpenGLState();
|
||||
|
||||
//drawRect(m_dialogHorPos,m_dialogVertPos,m_dialogHorPos+m_dialogWidth,m_dialogVertPos+m_dialogHeight,0xa6000000);
|
||||
@@ -273,8 +273,8 @@ void GL_TextControl::draw(int& parentHorPos,int& parentVertPos,btScalar deltaTim
|
||||
void GL_ToggleControl::draw(int& parentHorPos2,int& parentVertPos2,btScalar deltaTime)
|
||||
{
|
||||
|
||||
int controlHorPos = m_toggleBody->getWorldTransform().getOrigin()[0]+m_parentWindow->getScreenWidth()/2;//-m_parentWindow->getDialogWidth()/2;
|
||||
int controlVertPos = m_toggleBody->getWorldTransform().getOrigin()[1]+m_parentWindow->getScreenHeight()/2;//-m_parentWindow->getDialogHeight()/2;
|
||||
int controlHorPos = int(m_toggleBody->getWorldTransform().getOrigin()[0]+m_parentWindow->getScreenWidth()/2);
|
||||
int controlVertPos = int(m_toggleBody->getWorldTransform().getOrigin()[1]+m_parentWindow->getScreenHeight()/2);
|
||||
|
||||
int parentHorPos = controlHorPos-8;
|
||||
int parentVertPos = controlVertPos-8;
|
||||
@@ -308,8 +308,8 @@ void GL_ToggleControl::draw(int& parentHorPos2,int& parentVertPos2,btScalar delt
|
||||
void GL_SliderControl::draw(int& parentHorPos2,int& parentVertPos2,btScalar deltaTime)
|
||||
{
|
||||
|
||||
int controlHorPos = m_sliderBody->getWorldTransform().getOrigin()[0]+m_parentWindow->getScreenWidth()/2;
|
||||
int controlVertPos = m_sliderBody->getWorldTransform().getOrigin()[1]+m_parentWindow->getScreenHeight()/2;
|
||||
int controlHorPos = int(m_sliderBody->getWorldTransform().getOrigin()[0]+m_parentWindow->getScreenWidth()/2);
|
||||
int controlVertPos = int(m_sliderBody->getWorldTransform().getOrigin()[1]+m_parentWindow->getScreenHeight()/2);
|
||||
|
||||
int parentHorPos = controlHorPos-8;
|
||||
int parentVertPos = controlVertPos-8;
|
||||
|
||||
@@ -337,9 +337,9 @@ void GL_ShapeDrawer::drawCylinder(float radius,float halfHeight, int upAxis)
|
||||
gluDisk(quadObj,0,radius,15, 10);
|
||||
|
||||
gluCylinder(quadObj, radius, radius, 2.f*halfHeight, 15, 10);
|
||||
glTranslatef(0.0, 0.0, 2.*halfHeight);
|
||||
glRotatef(-180.0, 0.0, 1.0, 0.0);
|
||||
gluDisk(quadObj,0,radius,15, 10);
|
||||
glTranslatef(0.0f, 0.0f, 2.f*halfHeight);
|
||||
glRotatef(-180.0f, 0.0f, 1.0f, 0.0f);
|
||||
gluDisk(quadObj,0.f,radius,15, 10);
|
||||
|
||||
glPopMatrix();
|
||||
gluDeleteQuadric(quadObj);
|
||||
@@ -392,9 +392,9 @@ void renderSquareA(float x, float y, float z)
|
||||
{
|
||||
glBegin(GL_LINE_LOOP);
|
||||
glVertex3f(x, y, z);
|
||||
glVertex3f(x + 10., y, z);
|
||||
glVertex3f(x + 10., y + 10., z);
|
||||
glVertex3f(x, y + 10., z);
|
||||
glVertex3f(x + 10.f, y, z);
|
||||
glVertex3f(x + 10.f, y + 10.f, z);
|
||||
glVertex3f(x, y + 10.f, z);
|
||||
glEnd();
|
||||
}
|
||||
|
||||
@@ -523,7 +523,7 @@ void GL_ShapeDrawer::drawOpenGL(btScalar* m, const btCollisionShape* shape, cons
|
||||
|
||||
glMatrixMode(GL_TEXTURE);
|
||||
glLoadIdentity();
|
||||
glScalef(0.025,0.025,0.025);
|
||||
glScalef(0.025f,0.025f,0.025f);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifdef _WINDOWS
|
||||
/*
|
||||
Bullet Continuous Collision Detection and Physics Library
|
||||
Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
|
||||
Copyright (c) 2003-2010 Erwin Coumans http://bulletphysics.org
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty.
|
||||
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
||||
Reference in New Issue
Block a user