Since I have several questions at once, I thought I would post them under one thread instead of 3 separate threads.
Question #1
I'm not sure how I would use prospective and orthographic at the same time (within one viewport). Or maybe I am not thinking about the problem in the right way, but I am trying to draw 2D and 3D at the same time. For example, having a heath bar overlay while having a 3D scene in the background.
My current implementation is below:
Question #2Code:glMatrixMode(GL_PROJECTION); glLoadIdentity(); //camera setup glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); //3D drawing gluOrtho2D(-1, 1, -1, 1); glLoadIdentity(); //2D drawing glutSwapBuffers();
I am also working with models. I can load the models and textures just find as well as display the mesh. However, the texture comes out as which ever color I have been using previously. My implementation for textures is:
Should I be disabling / enabling a command?Code:if (!glIsTexture(texture)){return;} glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL); glBindTexture(GL_TEXTURE_2D,texture);
When I do not use glColor(...) commands the texture works just fine.
Question #3
I was also wondering what the best choice is for loading in models with bone structure support. I have ms3d and obj, but I believe 3ds is a fairly good choice (correct me if I am wrong). I was going to go along with ms3d, but I haven't found too many exporters for it so far. If you have a recommendation (that does not require a dll), please provide the site (preferably with an example).
Thank you for your help!



LinkBack URL
About LinkBacks


