officialhopsof

Members
  • Content count

    9
  • Joined

  • Last visited

Community Reputation

127 Neutral

About officialhopsof

  • Rank
    Newbie
  1. I am looking for a writer [deleted]
  2. OpenGL Ortho Pixel, possibly Point Sprite?

    Thank you for your response, That was my initial thought as well; however, I was really hoping for a more robust solution. Thank you for your time, Brandon Murphy
  3. Basically, I have a 3d world, and I need to place a single pixel at a location in this 3d world. Whenever the camera looks at the point, I need the pixel to be visible, regardless of its distance from the viewer. I tried just drawing a sphere, but as it gets farther away it gets smaller (as it should). Eventually it gets so small it is no longer drawn, which again, makes perfect sense. But I need to be able to see at least one pixel of this sphere at all times. I am not using OpenGL directly, but am using a Visualization package (vega prime) that uses OpenGL under the hood, which I am able to gain access to. I am also not very well versed in how OpenGL works and as such would very much consider myself a novice of it. I am developing on Windows XP with both CodeBlocks (with mingw) and with VC++ 2003. If you could show me just a very minimalistic example of how to do this, I would be very grateful. Just something like showing me a single drawing routine (like from glBegin() and glEnd()) would be best. The visualization package takes care of all the windows nonsense for me. Thank you very much for your time and help, Brandon Murphy
  4. Faces not showing up

    I just realized my error when i typed that up. while(!fileParser.atEnd()) { int shape = fileParser.next(); int points; if (shape == GL_TRIANGLES) {points = 3;} else if (shape == GL_QUADS) {points = 4;} glBegin(shape); for(int i = 0; i < points; i++) { glColor3f(fileParser.next(), fileParser.next(), fileParser.next()); glVertex3f(fileParser.next()*scale, fileParser.next()*scale, fileParser.next()*scale); } glEnd(); //and put it here } fileParser.restart(); //Move glEnd(); from here its amazing how such simple things can be so hard to find, but when you take a step back and look at them they become obvious. Thank you for your help, Brandon
  5. Faces not showing up

    while(!fileParser.atEnd()) { int shape = fileParser.next(); int points; if (shape == GL_TRIANGLES) {points = 3;} else if (shape == GL_QUADS) {points = 4;} glBegin(shape); for(int i = 0; i < points; i++) { glColor3f(fileParser.next(), fileParser.next(), fileParser.next()); glVertex3f(fileParser.next()*scale, fileParser.next()*scale, fileParser.next()*scale); } } fileParser.restart(); glEnd(); fileParser just stores the colors/vertices in order
  6. Faces not showing up

    I have this situation: Fill and in wirefram: Wireframe Now, as you can see, in the filled one, there are holes showing up, but in the wire frame one, everything seems like it should be. I have face culling disabled, and I am using: glEnable(GL_DEPTH_TEST); glDepthFunc(GL_LESS); does anyone know what may be going wrong here? Just a nudge in the right direction would be fantastic. Thank you, Brandon
  7. Object missing faces

    I am able to move the object around in 3d space, but i think i may be onto something. When i glEnable( GL_CULL_FACE ); then all of a sudden it works on the cube. now i translated this into my actual application, and the back sides of stuff arnt shown, but i am able to see parts of my model that i couldnt before. What i think is happening, is that when face culling is disabled, some parts of my model show up in front of parts that are closer to the camara. to clarify, faces that are farther away, are showing up in front of faces that are nearer to the camara. I think it has something to do with the depth test, but when i enable it, i get a really broken image. Is there a way to fix this? Thank you, Brandon [Edited by - officialhopsof on October 30, 2008 4:39:40 PM]
  8. Object missing faces

    The camera is at the default, whatever OpenGL Specifies. glDisable( GL_CULL_FACE ); didnt seem to work. Thank you, Brandon
  9. Object missing faces

    I have this situation: glBegin(GL_QUADS); // Draw The Cube Using quads glColor3f(0.0f,1.0f,0.0f); // Color Blue glVertex3f( 1.0f, 1.0f,-1.0f); // Top Right Of The Quad (Top) glVertex3f(-1.0f, 1.0f,-1.0f); // Top Left Of The Quad (Top) glVertex3f(-1.0f, 1.0f, 1.0f); // Bottom Left Of The Quad (Top) glVertex3f( 1.0f, 1.0f, 1.0f); // Bottom Right Of The Quad (Top) glColor3f(1.0f,0.5f,0.0f); // Color Orange glVertex3f( 1.0f,-1.0f, 1.0f); // Top Right Of The Quad (Bottom) glVertex3f(-1.0f,-1.0f, 1.0f); // Top Left Of The Quad (Bottom) glVertex3f(-1.0f,-1.0f,-1.0f); // Bottom Left Of The Quad (Bottom) glVertex3f( 1.0f,-1.0f,-1.0f); // Bottom Right Of The Quad (Bottom) glColor3f(1.0f,0.0f,0.0f); // Color Red glVertex3f( 1.0f, 1.0f, 1.0f); // Top Right Of The Quad (Front) glVertex3f(-1.0f, 1.0f, 1.0f); // Top Left Of The Quad (Front) glVertex3f(-1.0f,-1.0f, 1.0f); // Bottom Left Of The Quad (Front) glVertex3f( 1.0f,-1.0f, 1.0f); // Bottom Right Of The Quad (Front) glColor3f(1.0f,1.0f,0.0f); // Color Yellow glVertex3f( 1.0f,-1.0f,-1.0f); // Top Right Of The Quad (Back) glVertex3f(-1.0f,-1.0f,-1.0f); // Top Left Of The Quad (Back) glVertex3f(-1.0f, 1.0f,-1.0f); // Bottom Left Of The Quad (Back) glVertex3f( 1.0f, 1.0f,-1.0f); // Bottom Right Of The Quad (Back) glColor3f(0.0f,0.0f,1.0f); // Color Blue glVertex3f(-1.0f, 1.0f, 1.0f); // Top Right Of The Quad (Left) glVertex3f(-1.0f, 1.0f,-1.0f); // Top Left Of The Quad (Left) glVertex3f(-1.0f,-1.0f,-1.0f); // Bottom Left Of The Quad (Left) glVertex3f(-1.0f,-1.0f, 1.0f); // Bottom Right Of The Quad (Left) glColor3f(1.0f,0.0f,1.0f); // Color Violet glVertex3f( 1.0f, 1.0f,-1.0f); // Top Right Of The Quad (Right) glVertex3f( 1.0f, 1.0f, 1.0f); // Top Left Of The Quad (Right) glVertex3f( 1.0f,-1.0f, 1.0f); // Bottom Left Of The Quad (Right) glVertex3f( 1.0f,-1.0f,-1.0f); // Bottom Right Of The Quad (Right) glEnd(); // End Drawing The Cube *are there not [code] blocks on this forum? I cant seem to find it well as you can see, if you draw that, the front face is missing, and you see the inside of the cube. How can i correct this error? Thank you