Advertisement Jump to content
  • Advertisement

levjs

Member
  • Content Count

    648
  • Joined

  • Last visited

Community Reputation

466 Neutral

About levjs

  • Rank
    Advanced Member
  1. levjs

    Photography

    Hi guys, I was just wondering if ya'll would take a second to look at some photography and tell me what you think. Also let me know about the site itself it was written by me as well. http://www.backyardproductions.org/ -Levi
  2. levjs

    New Website, Advice?

    Hey guys, I just got finished with this site for my photos. It's flash, written almost entirely in actionscript. I did it all, so I'd like to know what you'd think and any advice you want to give would be appreciated! Thanks, -Levi
  3. levjs

    Project 365 (Non-Development Related)

    Haha. I'm sorry to disappoint. I thought about doing one of those but I figured it get really boring, really really fast. : ) Though the video at the end would be really cool.
  4. So....as an aside to programming, I've been opening up my creative side (or trying to) by delving into photography. I really like it and have decided to start a 365 Day project. I've got to take at least a photo a day. If you want, take a look here. Any other photographers around that want to share any of their projects or anything? -Levi
  5. levjs

    Tree Growing Simulation

    Yeah, I should probably take it off of my profile here. The short story is that it's a parody of bloggers who think that people really want to listen to them rant about their lives in vivid detail. So it's supposed to be taking with a (huge) grain of salt. It was obviously a bad move to reference it on here though. :)
  6. levjs

    Tree Growing Simulation

    Phresnel: I'm sorry. I really did mean the "Thank you for your help." at the end of my post. Looking back I realize it doesn't look that way. So Thank you! And I realize my original question may have seemed a little too open, but I really didn't know where to start, so again, my apologies.
  7. levjs

    Tree Growing Simulation

    Thank you. L-System, from a preliminary look, seems just what I was looking for. Thank you.
  8. levjs

    Tree Growing Simulation

    First of all, ignore the blog. My name isn't Dave and that's something different. If you want the background story, I'd be more than happy to oblige, but this isn't the time or place. Second of all, I'm not new to development. I've been in it for 5 years. I have never tried to model plant growth before, however, so my ignorance in this field could be taken as arrogance. Please forgive me. I am more than capable of reading a technical article and drawing valuable information from it. I think that the kind of question you are referring to is someone asking something like "How do I make a plant grow?". Again, perhaps there are no good articles, or major accepted algorithms for this application, and if so, I am again showing my ignorance in this field. I did do a little preliminary searching on Google to look for a general algorithm, but I found nothing, and I figured since this is a development forum, I would get a lot quicker, a lot faster if I could ask for help here. Thank you for your help though, -Levi
  9. Hi, I'm looking to implement a simple 2D tree growing simulation. Does anyone know any good paper's or articles on this subject? Thank you in advance, -Levi
  10. levjs

    Photography Website

    So I know it's not game development, but I've been getting into photography, and I just put up a site dedicated to it. Check it out and let me know what you think. Both from the "how it looks" side, and from a more technical viewpoint. Backyard Productions Photography Thanks in advance! -Levi
  11. MARS_999 is exactly right about the code. Lets see if I can explain it a little. What you are doing in your code is translating to a certain point, say P1, for cube one, then rotating the cube. The cube rotates around it's axis, or P1. For cube two though, your matrix is already set up to rotate around P1, so when you translate cube two to it's location, P2, and then rotate, not only are you rotating the cube around P2(it's axis), you are also rotating around P1. Since P1 is not the cube's axis, rotating around P1 means that cube 2 orbits around P1. With cube three you get a similar situation. So the solution is to have each cube start from the identity matrix, then translate to it's position, then rotate. glPushMatrix basically saves the current matrix and glPopMatrix loads the former matrix saved by glPushMatrix. It's actually a little more complicated than this, but that's the general idea. So now each cube is only being affected by one translation and one rotation. You should probably read up on viewing transformations in OpenGL. Chapter 3 of the Red Book is a good place to start.
  12. levjs

    lighting on a billboard

    Is there some reason they have to be "lit" by OpenGL. If not, then just disable lighting before you draw your billboards and then re-enable it after you draw them. This will leave them at full brightness. If you need to change the brightness you can with glColor3f.
  13. levjs

    [SOLVED] glTranslatef issue

    Welcome to OpenGL! Try clearing the depth buffer each frame as well as the color buffer. So replace GL11.glClear(GL11.GL_COLOR_BUFFER_BIT); with GL11.glClear(GL11.GL_COLOR_BUFFER_BIT|GL11.GL_DEPTH_BUFFER_BIT);
  14. levjs

    PBO Grayscaled

    Ok, I found the problem, though I'm still not sure why. I had been trying to load a 24 bit (no Alpha-Channel) image. Dascandy's reply got me thinking that maybe the PBO's internal format wasn't set right (the GL_UNSIGNED_BYTE works fine, and is there because my data IS stored in unsigned bytes). So I tried to use a 32 bit image and Voila! Parfait! The question then to me is why? Maybe a bug in the driver? In all my scourings of Google, I have yet to find a function that sets the internal format of PBO's. But thank you all for your help. You have been most patient and kind as always.
  15. levjs

    PBO Grayscaled

    Let me try to explain this a little better. My code is below. The texture is unmapping properly(as far as I can tell). But lets say I am uploading a texture that is 16*16 pixels and has 3 channels(RGB). The total size in bytes of the image should be: 16*16*3=768. But when I call the glTexSubImage2D function it seems to be only copying one byte per pixel instead of 3, so 16*16=256 bytes. So it turns out that the texture is just a grayscale texture that doesn't look like much. Here is the code for the PBO(I have generated a pboID elsewhere). Note: I am not streaming the textures, I am merely using this to load textures at start-up. So I load it from the file into system memory, then into the PBO, then from the PBO to texture. Is this wrong, it seems to be adding another useless step? Do PBO's speed up texture loading when you are merely loading the textures once? Do PBO even work this way? The more I think about this, the more I'm not sure. Am I being stupid? ' glGenTextures(1,&this->texID); glBindTexture(GL_TEXTURE_2D,this->texID); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); glTexImage2D(GL_TEXTURE_2D,0,GL_RGB8,this->width,this->height,0,this->type,GL_UNSIGNED_BYTE,NULL); glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB,pboID); glBufferDataARB(GL_PIXEL_UNPACK_BUFFER_ARB,this->imageSize,0,GL_STREAM_DRAW_ARB); GLubyte *ptr =(GLubyte*)glMapBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB,GL_READ_WRITE_ARB); if(ptr) { updatePixels(ptr,this->imageSize); glUnmapBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB); } glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, this->width, this->height, GL_RGB, GL_UNSIGNED_BYTE, 0); glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB,0); glBindTexture(GL_TEXTURE_2D,this->texID);
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!