• Content count

  • Joined

  • Last visited

Community Reputation

163 Neutral

About ade-the-heat

  • Rank
    Advanced Member
  1. udp recvfrom returns 0

    for tcp returning a 0 means an orderly shutdown has taken place. For udp there is no connection to shut down. Also we can see the packets containing good data being sent every half a second.
  2. udp recvfrom returns 0

    I'm talking to my server using udp sockets on linux. The server works fine as it's been talking to my other apps for literally years. So I wanted to create a mini linux udp app that just sends a request to the server and loops around receiving responses that are sent every half a second. So I send the request off - the server sends responses that I can see every half a second - visible using wireshark. The recvfrom calls returns every half a second BUT - it is returning a 0 each time. Now in tcp this means the other end has gracefully closed down - but in udp it should return either the length of the data or a -1 for error. So what's causing it to return a 0 ? As I say you can see the packet being sent from my server to me on wireshark.
  3. I want to create a socket and do a bind on my local pc. I call getaddrinfo like this: getaddrinfo(NULL, "0", &hints, &serverinfo); with hints ai_family = AF_INET, socktype=SOCK_DGRAM and ai_flags = AI_PASSIVE. when I look at serverinfo[0].ai_addr and do some converting I get the ip address to be and portnumer=0 as well. Shouldn't they contain my pc's ip address and a new port number ?
  4. OpenGL so whats in opengl version 3?

    feck !!! I need a course ! Seems way too hard for me now !
  5. OpenGL so whats in opengl version 3?

    Apparently the simple code below can't be done in 3.1 as most of the calls are deprecated - just draws a green square. So how would you draw a green square using 3.1 ? glClear( GL_COLOR_BUFFER_BIT ); This statement clears the color buffer, so that the screen will start blank. glMatrixMode( GL_PROJECTION ); /* Subsequent matrix commands will affect the projection matrix */ glLoadIdentity(); /* Initialise the projection matrix to identity */ glFrustum( -1, 1, -1, 1, 1, 1000 ); /* Apply a perspective-projection matrix */ glMatrixMode( GL_MODELVIEW ); /* Subsequent matrix commands will affect the modelview matrix */ glLoadIdentity(); /* Initialise the modelview to identity */ glTranslatef( 0, 0, -3 ); /* Translate the modelview 3 units along the Z axis */ glBegin( GL_POLYGON ); /* Begin issuing a polygon */ glColor3f( 0, 1, 0 ); /* Set the current color to green */ glVertex3f( -1, -1, 0 ); /* Issue a vertex */ glVertex3f( -1, 1, 0 ); /* Issue a vertex */ glVertex3f( 1, 1, 0 ); /* Issue a vertex */ glVertex3f( 1, -1, 0 ); /* Issue a vertex */ glEnd();
  6. OpenGL so whats in opengl version 3?

    well the specs were as clear as mud. They seem to suggest that glbegin, glEnd have been deprecated as has many of the functions needed to do vertex arrays. I also read that the entire fixed functionality has been removed as well. Has anyone got some simple code they can show to highliught the differences before and after 3.1.
  7. version 2 was the shaders and FBOs etc so whats in version 3 ? cheers
  8. In the orange book it described the realworldz opengl shader demo - supposedly has hundreds of planets in a vast 3d universe. You know where i can get this from ? cheers
  9. creating alpha channel for tree in PaintshopPro

    Done ! It was easy. [Edited by - ade-the-heat on August 20, 2007 4:49:25 PM]
  10. creating alpha channel for tree in PaintshopPro

    ok I'm still lost. I don;'t have time to get used to PSPro as I'm doing programming and and model creation as well. I found the magic wand. Half of the tree went shimmery. The bottom half stayed the same. After that I messed with the feather but nothing really did anything. I also did the create image thing but still nothing happened that I could see. Are there easy steps to this ? You'll have to humour me. So do the magic wand - half of the tree shimmers. Then create somthinh from image (has about 4 options none of which did anything really). Then set the alpha value for the part of the image which isn't the tree (how ?). Then sav e it to png (how? I tried this and it came up withmore options that didn't do anything. Also remember I want the alpbha channel saved as well). cheers
  11. I've got a tree. I want to create a billboard texture from it so that the tree itself is not transparent but the 'white' color around the tree is see through. PaintShop Pro help doesn't seem to helpful. The long hard way is to use the free hand selection and carefully go round the outside of the tree until it's selected. Sounds painful - especially as I have loads of trees to do. Is there an easy way of doing this ? eg set all alpha channel to zero for white color and 1.0 for non-white ? cheers
  12. I know I should know this! On starting my laptop I get about 4 apps start up every time, Dell Network Assistant, Corel Draw, Paint Shop Pro etc How do I stop all this ? I can't find it in Control Panel. cheers
  13. Also - if you're using texture rectangles instead of GL_TEXTURE_2D then when you draw your quad from 0,0 to 1,1 then in effect you are only rendering one pixel. With rectangles you're supposed to do from 0,0, to width,height hope this helps
  14. firstly you haven't given us your shader code, nor can I see where it gets enabled. Also, when you render your quad all that will do is activate your shader and write to the color atachment- I can't see where your texture is linked to the COLOR_ATTCHMENT point. After drawing the quad your texture will now be ready to render.
  15. We're using FBOs and on our card the value of GL_MAX_COLOR_ATTACHMENTS_EXT is 4. Can we have more than 4 textures in use in the shader with an FBO - eg we would want to have say 4 input textures and say 2 output ones with glFragData[i] ? Or are we limited to 4 in total ? cheers