tag:blogger.com,1999:blog-4669969500017841857.post4673137473610412224..comments2015-03-24T09:03:37.483-07:00Comments on OpenGL dot obj: Loading .obj in OpenGLtejushttp://www.blogger.com/profile/17827208975881448752noreply@blogger.comBlogger10125tag:blogger.com,1999:blog-4669969500017841857.post-68532534913051639922015-03-24T09:03:37.483-07:002015-03-24T09:03:37.483-07:00The code is wrong. When you check if the file was ...The code is wrong. When you check if the file was opended correctly in sentence if(!fp) the cmd return "Can´t open file" always because the fopen function only returns a pointer to file if success or a pointer to NULL when it fails, the sentende !fp its !=0 and its always. The solution its to change if(!fp){... to if(fp==NULL).Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4669969500017841857.post-57199636029868797712013-03-18T05:03:12.039-07:002013-03-18T05:03:12.039-07:00jst awesome............
clean coding..and almost ...jst awesome............<br /><br />clean coding..and almost the shortest obj loader code...<br />:)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4669969500017841857.post-62881087723900515622013-02-24T20:56:16.807-08:002013-02-24T20:56:16.807-08:00Do u know how to load faces?
I tried with ds
gl...Do u know how to load faces?<br /><br />I tried with ds <br /><br />glBegin(GL_TRIANGLES);<br />glVertex3f(x1,y1,z1);<br />glvertex3f(x2,y2,z2);<br />glVertex3f(x3,y3,z3);<br />glEndl()<br /><br />but its not working..<br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4669969500017841857.post-4012448452263020052013-02-24T17:29:26.683-08:002013-02-24T17:29:26.683-08:00You have the code and can't look for the line ...You have the code and can't look for the line with glTranslatef ... This actually works, and it DOES NOT SHOW only a few points...<br /><br />line 72, change -105 value to something smaller... or implement the callback function to vary that parameter...Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4669969500017841857.post-67059677772863595322013-02-22T21:24:50.161-08:002013-02-22T21:24:50.161-08:00Code is really useful.But i am having d same prob....Code is really useful.But i am having d same prob.When i change d .obj file its showing only few points.Also can anyone help me to load faces.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4669969500017841857.post-54530954657756494562013-01-20T07:46:02.695-08:002013-01-20T07:46:02.695-08:00Do you know how to load faces.Do you know how to load faces.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4669969500017841857.post-48017564625540350932012-12-17T09:09:13.930-08:002012-12-17T09:09:13.930-08:00Omg, an obj loader that render points. Soo useful!...Omg, an obj loader that render points. Soo useful!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4669969500017841857.post-50171839563905143682012-08-08T18:05:27.906-07:002012-08-08T18:05:27.906-07:00Well it is designed to show only dots.
and to incr...Well it is designed to show only dots.<br />and to increase the size replace your glTranslatef values with<br />glTranslatef(0.0f,0.0f,-3.0f);Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4669969500017841857.post-42735430176766360682012-08-02T13:35:08.988-07:002012-08-02T13:35:08.988-07:00Same here buddy the object is way way smallerSame here buddy the object is way way smallerAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-4669969500017841857.post-22098145561848240742012-06-13T13:45:51.607-07:002012-06-13T13:45:51.607-07:00Hey! Nice simple and sleek code, problem is it won...Hey! Nice simple and sleek code, problem is it wont work for me. I mean it compiles without any error or anything but all i can see is 1 - 4 dots rotating depend on /obj file. Can you help me with that? Tried both on win7 and ubuntukubanoreply@blogger.com