Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 04 Jan 2012
Offline Last Active Jan 24 2012 12:09 PM

Posts I've Made

In Topic: Normals for smoothing groups issue

23 January 2012 - 11:23 AM

Well I want the obj reader to be able to handle objects from maya, max, blender and what ever else, so handling just my models won't be good enough( I downloaded the chess pieces from turbosquid.com ). I am trying to follow the format for the obj file spec so maybe I will try generating my normals the other way around like ashman.

Thanks everyone I'll let you know my progress.

In Topic: GUI Images don't render if x position is negative.

18 January 2012 - 12:27 AM

Thanks for the replies.

Using glWindowPos2i did the trick.

I tried glVertex2f and the images showed up in the bottom left regardless of position. I am new to opengl and am going to make a guess as to why this didn't work. Don't you generally need veretex positions for polygons, not raster images or pixmaps?

Lastly, how do I mark a post as solved? I have made two posts and in both cases I need to mark the posts solved/complete/closed.

Thanks for everyones' help.

In Topic: GUI Images don't render if x position is negative.

17 January 2012 - 04:47 PM

Translating it to a negative spot didn't work. It stopped it at zero.

In Topic: GUI Images don't render if x position is negative.

17 January 2012 - 04:10 PM

So how do you draw an image partially off the screen? I am going to try what I am about to say and let you know if it works.

If x is negative use glTranslafef to translate it partially offscreen.

In the mean time if someone else has an idea how to draw image partially on screen let me know.


In Topic: texture coordinates problem

07 January 2012 - 01:45 PM

Thank you very much, texturing works now.

Just to be clear in case someone else reads this though, the linked_tc would use the uv index from the obj file not the vertex index.

Another thing that had me stumped for a bit was calculating normals after reorganizing the coordinates. Doing it after doesn't allow you to use adjacent vertices to calculate normals, so then you only have the normal of the face which will stop GL_SMOOTH from working. I had to calculate the normals before reorganization so that you can do it using adjacent vertices. Then when you reorganize the vertices with the indices from the obj file, you also have to reorganize the normal order using the same indices.