Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Bad rendering?  (Read 4734 times)

0 Members and 1 Guest are viewing this topic.

molmasepic

  • Newbie
  • *
  • Posts: 43
    • View Profile
Bad rendering?
« on: February 22, 2011, 12:09:12 am »
hey this is about opengl.

anyone know about this?

http://img208.imageshack.us/i/glitcheo.jpg/

if you know how to solve this then share some knowledge xD

thanks

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Bad rendering?
« Reply #1 on: February 22, 2011, 12:33:12 am »
Could you highlight what is the problem?
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

molmasepic

  • Newbie
  • *
  • Posts: 43
    • View Profile
Bad rendering?
« Reply #2 on: February 22, 2011, 12:40:35 am »
hm...its a bit hard to explain


basically when i go to run my game, the model looks badly rendered..


thats supposed to be a model, but it looks like its graphically bugged..


heres some code that i used that involves that model:

Code: [Select]
#import ".\WorldMap3Dv1.h"
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glVertexPointer(3, GL_FLOAT, 0, WorldMap3Dv1Verts);
glTexCoordPointer(2, GL_FLOAT, 0, WorldMap3Dv1TexCoords);
glDrawArrays(GL_TRIANGLES, 0, WorldMap3Dv1NumVerts);



at first i thought it was the graphics card not liking it, but when i used this on my main computer it did the same thing..

any ideas now?


Theres spaces between the model, and alot ._.

Extra details: I used an obj2opengl.perl to load the obj file into a header file(.h)

its probably something wrong with that..

molmasepic

  • Newbie
  • *
  • Posts: 43
    • View Profile
Bad rendering?
« Reply #3 on: February 22, 2011, 07:48:53 am »
nobody knows? ._.

devlin

  • Full Member
  • ***
  • Posts: 128
    • View Profile
Bad rendering?
« Reply #4 on: February 22, 2011, 08:46:55 am »
You really would have to include something that we can compile and test for us to have any chance of helping you.

At first glance - your model loader is not working properly.

What compiler are you using? (or are you using Objective-C?)
I notice you're using #import rather than #include which differs between compilers in what it does. (GCC uses it as a sort of #pragma once directive and visualC++ uses it for COM and .NET stuff only)

molmasepic

  • Newbie
  • *
  • Posts: 43
    • View Profile
Bad rendering?
« Reply #5 on: February 22, 2011, 09:21:23 pm »

devlin

  • Full Member
  • ***
  • Posts: 128
    • View Profile
Bad rendering?
« Reply #6 on: February 23, 2011, 07:56:09 am »
And if you comment out these lines?
Code: [Select]
glEnable(GL_POLYGON_STIPPLE);

molmasepic

  • Newbie
  • *
  • Posts: 43
    • View Profile
Bad rendering?
« Reply #7 on: February 28, 2011, 07:28:18 pm »
Quote from: "devlin"
And if you comment out these lines?
Code: [Select]
glEnable(GL_POLYGON_STIPPLE);



same problem

molmasepic

  • Newbie
  • *
  • Posts: 43
    • View Profile
Bad rendering?
« Reply #8 on: February 28, 2011, 07:56:59 pm »
ok i loaded a smaller model, and i noticed this

http://img27.imageshack.us/i/glitchrealized.png/


if you notice, it shows only one triangle on the mesh(the big triangle that is supposed to be a square.

also it has jagged edges on it, thats not supposed to be there.


im thinking that maybe theres a glitch with the face loading but im not sure

anyone?

devlin

  • Full Member
  • ***
  • Posts: 128
    • View Profile
Bad rendering?
« Reply #9 on: March 01, 2011, 11:18:25 am »
Make sure your normals are facing the right way. You can see if that's the case by disabling GL_CULL_FACE.

Also, make sure your depth buffer have decent values in it - what's your near and far plane values?

 

anything