PDA

View Full Version : Model Rendering problem...



MolmasEpic
02-22-2011, 02:37 PM
hey i have been having a problem with loading some models in my opengl program..

Im using Code Blocks and MinGW32 on windows 32 bit.

heres the problem: nothing is rendered correctly: http://img403.imageshack.us/content_roun...amp;via=mupload (http://img403.imageshack.us/content_round.php?page=done&l=img403/2910/glitch2p.jpg&via=mupload)

heres some code if you wanna look at it:
main: http://pastebin.com/ZKMW28Dy
the model.h: http://www.mediafire.com/?uu40kuophpsczda

if anything else is needed let me know

some background info: i have tried asking this on 2 other forums, and nobody has been able to help since i posted them(about 3 days)...i also use SFML for the window and 2D graphics.

mobeen
02-22-2011, 07:02 PM
Do the following and then tell us what u get.
1) Disable polygon stipple.
2) Enable back face culling.
3) Disable blending.
One more thing, in your render function you are resetting the texture filtering to linear while this has nothing to do with the output but it is better to do it once at the initialization.

enjoycrf
02-22-2011, 10:52 PM
what kind of model are you laoding?

MolmasEpic
02-24-2011, 03:14 PM
to mobeen: same problem still...

to enjoycrf: im loading a .obj file exported from blender


is there anything else that can solve this??

mobeen
02-24-2011, 08:07 PM
to mobeen: same problem still...

to enjoycrf: im loading a .obj file exported from blender


is there anything else that can solve this??
Could u just load the .obj model in a simple glut project to see it comes out fine.