• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

122 Neutral

About gauntalus

  • Rank
  1. OpenGL Screen Coordinates

    I was indeed popping the wrong matrix :-S Thanks deathkrush and everyone else that helped, its working just like I'd envisioned now :)
  2. OpenGL Screen Coordinates

    Hey, I gave that a try (enabling GL_ALPHA_TEST) but I'm still getting the same result. Its hard to tell, but it appears that the screen gets drawn correctly once (with the scene in the background, and a transparent quad drawn in screen coordinates in the foreground) but in the next frame, the scene goes to black and only the quad in the foreground gets drawn. Here's the current state of the code block: glMatrixMode(GL_PROJECTION); glPushMatrix(); glLoadIdentity(); gluOrtho2D(0, 1, 0, 1); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glEnable(GL_ALPHA_TEST); glDisable(GL_LIGHTING); glEnable(GL_BLEND); glColor4f(1.0f, 1.0f, 1.0f, 0.3f); glBegin(GL_QUADS); glVertex2f(0.1f, 0.1f); glVertex2f(0.8f, 0.1f); glVertex2f(0.8f, 0.9f); glVertex2f(0.1f, 0.9f); glEnd(); glPopMatrix(); Any other ideas about what the problem might be?
  3. OpenGL Screen Coordinates

    Hey, things are working out, /sortof/. I tried out the technique the two of you pointed me to, and I am now able to draw quads in 2D using u-v coordinates. However, when I do this, it clobbers everythign in the frame buffer :p Assuming theres already something in the framebuffer that we want to KEEP there, and then overlay a transparent quad in the lower left of the screen, I have the following code: glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluOrtho2D(0, 1, 0, 1); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glDisable(GL_LIGHTING); glEnable(GL_BLEND); glColor4f(1.0, 1.0, 1.0, 0.3); glBegin(GL_QUADS); glVertex2f(0.0, 0.0); glVertex2f(0.5, 0.0); glVertex2f(0.5, 0.5); glVertex2f(0.0, 0.5); glEnd(); Instead of overlaying the transparent quad in the lower left of the screen, it clears the framebuffer to black and THEN draws a transparent quad in the lower left :) How is it that I can avoid the framebuffer getting cleared? Thanks for all your help so far, I appreciate it.
  4. OpenGL Screen Coordinates

    Hey, I took a look at the link but I'm not quite sure how this is going to help me. At this point I have a camera oriented in a certain way, assume some arbitrary orientation. I want to write a function that makes it so I can do something like the following to draw a quad in the lower left quarter of the screen: glBegin(GL_QUADS); glVertex3f( 0.0, 0.0, 0.0); glVertex3f( 0.5, 0.0, 0.0); glVertex3f( 0.5, 0.5, 0.0); glVertex3f( 0.0, 0.5, 0.0); glEnd(); The link that you sent seems to create an entirely new viewport, but I just want to transform my position and orientation so that I can draw in the current viewport easily.
  5. I was wondering if someone could help me out with an easy way to get the x-y screen coordinates for the current camera orientation in an OpenGL scene. I want to be able to draw quads in x-y coordinates to make creation of a menu system easier.
  6. High Performance Rendering

    Sorry if I was unclear, when we render the entire board and ALL the pieces there are 150,000 polys, so each piece is roughly 4500 polys. To answer smitty's question, we're using display lists. I think we'd like to avoid dynamic LoD, since my proposal was unclear I think you probably wouldn't have suggested this otherwise. So, with that said, suggestions?
  7. I have a question about how I should go about rendering models in the chess game that I'm working on. Currently we have insanely high-poly models, once all the pieces are on the screen we are displaying about 150,000 triangles(total, for all the pieces). We're planning on drastically reducing the poly count on each of the models to heighten performance, but I was wondering if in the other direction there was something that I could do to make high poly models a bit more acceptable. Currently we're using GL_TRIANGLES to render the models, but I figured we'd get a huge boost if we just organized the models into GL_TRI_STRIPS. Would we get about a ~300% increase from this? How hard is it to do? Are there any other suggestions that anyone has? I appreciate the help, thanks.
  8. GLSL Questions

    Hmm, no that sounds like what I need. I'm just pretty new to GLSL. Could you recommend some reading? Thanks.
  9. GLSL Questions

    Hey, I had a few questions about GLSL. I was wondering if there is a way to, in effect, make a shader that makes two passes. What I want to do is write a fragment shader that saves all of the fragment colors to a texture. Then on the second pass I want to be able to read from that texture so that I can use the previously computed information in the computation of the final color of each fragment. Is there an easy way to do this? Do I need to clarify my question? Thanks
  10. Anyone? I need help :-/
  11. I was wondering if someone could breifly describe the procedure of taking the union of two surfaces using the GTS library. At this point I've constructed two surfaces, and I just need to figure out how to take the union, the documentation doesn't seem to be very clear about how to do this. So I repeat, for each cube surface that I constructed, I did so by: 1. Adding all of the vertices of the cube as gts_vertex_class()'s. 2. Creating all of the gts_edge_class()es for the cube. 3. Adding each of the 16 faces of the cube as gts_face_class()'s. But I don't know where to go from here. All I need to figure out how to do is take the union of two gts_surface_class()es. (and eventually figure out how to find the difference). Please help if you can, a link to the library is as follows: http://gts.sourceforge.net Click GTS Refereance on the left hand side.
  12. GNU Triangulated Surface Library

    Ok I ended up getting a GTK+ development kit which seemed to contain everything I need. Thanks a bunch! Now if I can just figure out these gts class linker errors :-/
  13. For the past month or so I have been working on a research project for the Rad Lab at college. I've come near the end of the project where I need to be able to take the union of various solids that I have computed. I ran across the GNU Triangulated Surface Library (GTS: http://gts.sourceforge.net ) which seems like just the ticket, but I am having some issues getting things to work in Windows. On their sourceforge project page the library is listed as OS independent, and thus cross-platform. I am writing the program in Windows in Visual Studio .NET, and I successfully installed the library following the instructions in the documentation. Now that the library is installed I am trying to compile with it. In my main source file, I included gts.h, the flagship so to speak of the library, however, when I try to compile Visual Studio complains that it can't find glib.h. Inside of gts.h, there is a #include for glib.h, however, I ran a search for it on my windows partition (i dual boot gentoo) and found nothing. So I downloaded glib.h, added it its directory to the include path and compilied again. This time it complained that it couldn't find glibconfig.h. At this point I stopped, thinking that I was probably going against the grain by just downloading these files, figuring that something needed to be proporly installed. However, google'ing on "glib" and "glib for windows" hasn't been so fruitful. The info that I've found has just referred to its use in GTK, GDK, and Gnome, but nothing else that helps me to be any closer to getting this thing to compile in Visual Studio. So I am asking, does anyone have experience using the GTS library, or maybe Glib in Windows? Seems like it is Unix native, forgive my naivety, I'm still stretching my programming wings. help!
  14. Polygon Intersection Testing

    Hey, thank you everyone for the replies, I'm doing a lot of research online and you've given me a good base to start from. The Boolean CSG algorithm looks like its going to be the way to go since the models that I'll be drawing are pretty complex, imagine a big scaffold with large volumes of unoccupied space inside the model. BSP trees seem like they are just for optimizing drawing on a computer, but that's not what I'm looking for. I need to generate a precise 3d model that can be acutally built in real life, like i need to have a physical model once generated. On that note, I'd really appreciate it if anyone has any good boolean CSG algorithm links that they could offer up. Thanks,
  15. Polygon Intersection Testing

    Ok, we barely glazed over them in my last programming class, but i'll take a more focused look at them. Thanks, Any other suggestions?
  • Advertisement