PaoloM wrote:
 |
thumbtacks2 wrote:
Maybe I'll download the pdf link provided by the original poster in this thread and read it over out of interest. It still sounds like basic pixel value manipulations... |
You don't bother even informing yourself and then go on with your unbelievable claims? Without even knowing what you're talking about?
I'm not sure what you are getting at here...besides it's been my goal to stay more "focused" as of late. Speaking of that, in one thing I'm working on, I'm still working out some issues. For instance, this code seems to rotate the back text with the card just fine in two out of three dimensions. Not sure what is going on with one of the dimensions, however, but I'm sure there is an easy solution. The front text works fine. What do you think?
// draw front text
glPushMatrix();
glRotatef(rotx,1.0f,0.0f,0.0f);
glRotatef(roty,0.0f,1.0f,0.0f);
glRotatef(rotz,0.0f,0.0f,1.0f);
glTranslatef(posx,posy,posz);
glColor3f(1.0,0.0f,0.0f);
DrawText(lbase,front_text,front_textx,front_texty,0.051f);
// draw back text
glRotatef(rotx,1.0f,0.0f,0.0f);
glRotatef(rotz,0.0f,0.0f,1.0f);
glRotatef(roty+180,0.0f,1.0f,0.0f);
glTranslatef(posx,posy,posz);
glColor3f(1.0,0.0f,0.0f);
DrawText(lbase,front_text,front_textx,front_texty,posz-2.9f);
glPopMatrix();
[A]
Oh, and DrawText looks like this:
void Notecard :: DrawText(unsigned int base, char * text, float x, float y, float z)
{
if (text==NULL) return;
glPushMatrix();
glTranslatef(x,y,z);
glScalef(0.2f,0.2f,0.0f);
glPushAttrib(GL_LIST_BIT);
glListBase(base);
glCallLists(strlen(text),GL_UNSIGNED_BYTE,text);
glPopAttrib();
glPopMatrix();
}
Edit: kind of hacked together right now...but it will improve over time.