Jump to content
  • Advertisement

thekingforever

Member
  • Content Count

    5
  • Joined

  • Last visited

Community Reputation

100 Neutral

About thekingforever

  • Rank
    Newbie
  1. thekingforever

    OpenGL cursor not showing correctly?

    This is correct, but you should also be double-checking that your hardware supports non-power-of-two textures. Most hardware should nowadays, but you'd be surprised to find that there is still hardware out there that doesn't. If you ever release this to the public you may be in for a nasty shock. Now things get interesting. There is some OpenGL 2.0/2.1 hardware out there that reports support for non-power-of-two textures (as it is required to by that GL_VERSION) but will drop you back to software emulation if you use them. Hello GeForce FX. If you need to run on this class of hardware, the only really safe option is to just use a power-of-two texture instead. [/quote] Thanks for that information. I have an FX 5900 lying around (blown capacitors but I can fix that) So I'll power it up on that and see how that goes.
  2. thekingforever

    OpenGL cursor not showing correctly?

    Aha! Thankyou! I put this in my Init function: glPixelStorei(GL_UNPACK_ALIGNMENT, 1); Now the cursor is aligned. I can now press on with transparency, thankyou very much for your help! (the book, oddly didn't seem to cover this. Or I've missed it)
  3. thekingforever

    OpenGL cursor not showing correctly?

    Thanks. I'll have a look into it and write back.
  4. thekingforever

    OpenGL cursor not showing correctly?

    Thanks for your reply. I am using a modified version of the source code from Chapter 7 "Terrain" from Beginning OpenGL Game Programming. (not sure if I can post it here) What could I have done to cause this when the landscape and the water render fine? They repeat the texture which I think might be the problem, as I copy and pasted the routine the code uses: (I'm pretty sure this amount of code is okay even if the samples are copyright the authors) image.Load("water.tga"); glGenTextures(1, &m_waterTexture); glBindTexture(GL_TEXTURE_2D, m_waterTexture); gluBuild2DMipmaps(GL_TEXTURE_2D, GL_RGB, image.GetWidth(), image.GetHeight(), GL_RGB, GL_UNSIGNED_BYTE, image.GetImage()); image.Release(); image.Load("mouse.tga"); glGenTextures(1, &m_mouseTexture); glBindTexture(GL_TEXTURE_2D, m_mouseTexture); gluBuild2DMipmaps(GL_TEXTURE_2D, GL_RGB, image.GetWidth(), image.GetHeight(), GL_RGB, GL_UNSIGNED_BYTE, image.GetImage()); image.Release(); I'm not sure how to specify the texture to "stretch" to the quad it's been given. Thanks for any help. I'm new to all of this, perhaps ambitious but rubbish. But that's where we all start.
  5. Hi there! So I have drawn a cursor on the screen as a quad using a texture. I switch from perspective to orthog, draw it, and revert back. However, there's a graphics bug with the cursor.... You can see how it looks as opposed to how it's supposed to look. Forgive the black background, that's temporary. Here's the drawing code: (C++) [source]//draw the mouse glBindTexture(GL_TEXTURE_2D, m_mouseTexture); glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); glBegin(GL_QUADS); glTexCoord2f(0.0f, 0.0f); glVertex3f(mouseX+0.0, mouseY+0.0, 0.0); glTexCoord2f(1.0f, 0.0f); glVertex3f(mouseX+25.0, mouseY+0.0, 0.0); glTexCoord2f(1.0f, 1.0f); glVertex3f(mouseX+25.0, mouseY-25.0, 0.0); glTexCoord2f(0.0f, 1.0f); glVertex3f(mouseX+0.0, mouseY-25.0, 0.0); glEnd();[/source] Thanks for any help. Thought this would be the best place but please move if it's inappropriate.
  • 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!