summaryrefslogtreecommitdiffstats
path: root/objloader.c
diff options
context:
space:
mode:
Diffstat (limited to 'objloader.c')
-rw-r--r--objloader.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/objloader.c b/objloader.c
index 7521822..34de2b9 100644
--- a/objloader.c
+++ b/objloader.c
@@ -7,6 +7,10 @@
* Code:
* http://www.gamedev.net/community/forums/topic.asp?topic_id=312335
*
+ * todo: move obj files and texures into folder named e.g. "obj", or find some way
+ * of figuring out the current directory, hmm, could modify a path string, e.g.
+ * "./cube/cube.obj" -> "/cube/*", I would need to loop for last occurence of "/"
+ *
*/
#include <SDL/SDL.h>
@@ -143,19 +147,6 @@ void render(ObjModel *model)
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
draw_ground();
-#if 0
- glPushMatrix();
- glTranslatef(0.0f, 0.0f, -50.0f);
- glScalef(0.2f, 0.2f, 0.2f);
- glColor3f(1.0f, 0.0f, 0.0f);
- glBegin(GL_QUADS);
- glVertex3f(25.0f, 0.0f, 0.0f);
- glVertex3f(25.0f, 50.0f, 0.0f);
- glVertex3f(-25.0f, 50.0f, 0.0f);
- glVertex3f(-25.0f, 0.0f, 0.0f);
- glEnd();
-#endif
-
glPushMatrix();
glScalef(0.1f, 0.1f, 0.1f);
glTranslatef(0.0f, 0.0f, -150.0f);
@@ -231,6 +222,8 @@ int main(void)
ObjModel *model = ObjLoadModel(memory, bytes);
printf("Object Model has: %d faces!\n", model->nFace);
+ if (model->mtl != NULL)
+ printf("ambient texture map: %s\n", model->mtl->map_Ka);
/* main loop */
while (program_running)