Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

205 Neutral

About zix99

  • Rank
  1. zix99

    256x256 Textures

    There are no "special parameters" to load larger textures (other than changing the width and the height when passing it to OpenGL, obviously). It could be any number of cases at this point. You could have bad loading code to load the image from a file, or bad uploading code that sends it to OpenGL. Either describing your problem more in detail or showing us some code would be useful. Hope that helps, ~Chris
  2. zix99

    newbie has a problem w/ tga.

    Does the fact that you call CleanupImage(); at the end of the loading procedure before I see any OpenGL upload code mean anything? This seems to be the problem... the rest of your code looks fine. ~Zix
  3. zix99

    newbie has a problem w/ tga.

    Square remaining white usually means the data wasn't uploaded correctly, or you haven't enabled GL_TEXTURE_2D (or you have fog cranked up on white, or light.. but I doubt that's your problem). Hope that helps, ~Zix
  4. What exactly is the leak from? glGenTextures() just creates a texture ID (no memory to my knowledge is even located.. it simply returns a unique, unused, number) (In my programs i don't even use glGenTextures, i simply create a unique ID). You claim it's not your code creating the memory leak, but, it'd be a good idea to show us the code anyway. Also, how do you know it's creating a memory leak? (Does it pop up an exception? Or are you using some memory manager (ie mmgr) ). ~Chris
  5. zix99

    computer just turns off

    The most common causes of random shutdowns is power supply spike, and overheating computer. Since your computer only randomly shuts down when you're playing games, my guess is that it's because it's overheating (especially since it's in the summer). Make sure all the cooling stuff is working properly (fan, heat sink is on correctly, etc), and make sure it's dust-free. Hope that helps, ~Zix P.S. I'm really tired right now, so what I say could be completely off :)
  6. Look up some trig. First off, all functions in math.h (that I know of) operate on radians, rather than degrees (To convert degrees to radians, just divide by 57.2957795). Then it's as easy as xmodifier = sinf(rotation_as_radians) * magnitude; ymodifier = cosf(rotation_as_radians) * magnitude; (Magnitude can be interpreted as speed of movement) Yes, I know I've flipped around sin and cos (as sin is traditionally the y axis), but in this case, using OpenGL, that's the way things work. Hope that helps ~zix
  7. Quote:Original post by pieslice You seem not to save the return value (GLint) of the gluBuild2DMipmaps anywhere. The gluBuild2DMipmaps function returns the texture handle which is passed as a parameter to glBindTexture(); I suggest that you make your texture loading function to return the texture handle instead of bool. And if stuff goes wrong, you can return for instance -1. That's wrong, gluBuild2DMipmaps function returns a GLInt of the error code (0 means success). See gluBuild2dMipmaps reference page You have to get texture ID using glGenTextures() function, or by managing it yourself. (He's doing it correctly by using glGenTextures(1, &texture); The fact that his texture is showing up, but is darker than it should be, means there is an OpenGL coloring problem, or a texture loading/Initialization problem, not an ID problem. Hope that clears things up, ~Zix
  8. Here's my reply to your previous thread: Quote:Original post by hahaha If i texture map a quad, its a lot faster than glDrawPixels...Ive got a question though. If i use glDrawPixels the color of the image is perfect. If i texture map a quad the color is wrong. I enable GL_COLOR_MATERIAL,disable lighting,enable depth test. Any ideas why the color is wrong? Do you mean color is 'wrong', as in, RGB is mixed up? (ie: The blue channel swaps with the red?), or do you mean, the colors appear imperfect (Maybe the image is being forced to 16 bit instead of 24/32 bit), or do you mean that maybe the pixel colors are being mixed because of the mipmaps? Screenshots help (Just use photobucket or something). And my Reply to this one: Try setting glColor4f(1.0f,1.0f,1.0f,1.0f), right before you draw the quad. ~Zix
  9. zix99

    Which Is Faster????

    Well, without a doubt, storing an image as a texture, and then drawing a texture quad will be faster. If it's not faster, that means you're doing something wrong (or something is fishy with your drivers). Let us see some code: How do you upload the texture to the graphics card? What's your drawing code look like? ~Chris
  10. From looking at those screenshots, my guess is that it seems to be a texture loading/filtering problem. Could we see some that code? Try messing around with some of the filtering options, ie: set to GL_NEAREST instead of GL_LINEAR or try setting GL_CLAMP_TO_EDGE. It appears as though all your little textures is stores in one large texture? And then you just alter the coords to display which image you want, right? If this is the case, setting GL_NEAREST will fix that, or using slightly different tex coords. Hope that helps ~Chris
  11. I found This webpage very useful in helping myself understand what exactly all this constant stuff meant. Take a look... it enlightened me, and I have been using constants for a long time now. ~Chris
  12. zix99

    OpenGL + SDL + FRAPS slowdown

    GeForce 4 MX is a pretty old card, it wouldn't surprise me if that was the main problem. Overlays in general can be expensive, and then with a window over a window it involves clipping. I don't think you can do anything to fix the issue (besides force your program to full screen) Edit: Try turning off VSync in the control panel (assuming windows), and see how it reacts to different window overlays. ~Zix
  13. zix99

    free sounds?

    The Free Sound Project Just make sure to read the license, but it's very short and easy to understand.
  14. zix99

    Class Pointer Problem

    Quote:Original post by TheTroll You are just making a copy of the pointer, not a copy of the SMeshBuffer struck So dereference it and do the copy. *bufferOrig = *buffer; theTroll Before you do what TheTroll said, make sure bufferOrig is valid. ie: buffer = new SMeshBuffer; ...setup buffer... bufferOrig = new SMeshBuffer; *bufferOrig = *buffer; ~zix
  15. zix99

    Terrain Texturing

    Ya, it could depending on the size of the textures and the size of the terrain. You may have to swap back and fourth from the HD and the graphics VRAM. I'm sure there are tutorials out there that could explain it better than I could. I'm also sure there are more efficient methods of doing splatting for more than 4 textures.
  • Advertisement

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!