Jump to content
  • Advertisement

DrDerekDoctors

Member
  • Content count

    33
  • Joined

  • Last visited

Community Reputation

122 Neutral

About DrDerekDoctors

  • Rank
    Member
  1. DrDerekDoctors

    Texture warping on non-rectangular quads

    Righty, I had a look at that thing, Brother Bob and while it's good for some purposes it introduces fake perspective into the texture, which I really would prefer not to have in some instances. i.e, now it's a case of: I fiddled around with the program but there wasn't anything I could find to alleviate this effect. Is this simply not possible? Thanks,
  2. DrDerekDoctors

    Texture warping on non-rectangular quads

    Aha! Perfect, thankyou Brother Bob! :)
  3. DrDerekDoctors

    Texture warping on non-rectangular quads

    Sadly, it's part of a HUGE function which it can't really be unpicked from in a manner which would allow you to compile it. But basically if you draw a trapezoidal GL_QUAD perpendicular to the screen with a rectangular/square bit of texture on it, then half the texture goes on one of the triangles in the quad and the other half goes on the other triangle, but as the triangles are of differing sizes it means you get a texture which looks warped. It may be that I *have* to subdivide the quad into lots of smaller quads in order to fix it, but ideally there'd be some simple texture switch I could flick which would make it distribute the texels evenly in a quad.
  4. DrDerekDoctors

    Texture warping on non-rectangular quads

    The mapping co-ordinates are correct. If you look at all four corners they're in the right place, it's just that rather than stretching the texture over the entire quad evenly, it's mapping it as two triangles.
  5. I am probably the stupidest man alive for asking this, but I've been developing a 2D game engine using OpenGL and it's been pretty peachy up until now. However that's because all my quads have been rectangles but I've decided I want to allow arbitrary shaped quads with textures on them, and so when I have something trapezoidal I get that horrible texture spread problem. All polygons in my engine are perpendicular to the screen so it's not like I can fix this using perspective, so how can I get texture mapping like in "wanted" instead of what I've "got" at the moment? Thanks, (and apologies for thickness)
  6. DrDerekDoctors

    Texture cache / sprite sheet building

    Ta', I've grabbed it and will give it a look over, although as a C rather than C++ person it'll take a bit longer.
  7. DrDerekDoctors

    Texture cache / sprite sheet building

    Absolutely spot on! Thanks muchly! :)
  8. Hello, I was wondering if anyone had any pointers for writing a program to compile a series of arbitralily sized rectangles into another arbitrarily sized rectangle. I know this isn't really a graphics thing, but I'd imagine that it's mostly used in conjunction with graphics so figured this was the best place to start. Obviously it *can* be done through brute force, but that seems a really wasteful approach. Also I suppose it could be done just by shoving the largest stuff in the top corner first, but again I'm not sure that'd yield the best results. So, anyone have any pointers?
  9. DrDerekDoctors

    glActiveTexture extension dependencies

    Hmm, thanks. I can get it past the glActiveTexture now on his machine but it still borks when it gets to the glTexEnvi calls. Again, this is a bit confusing as he has GL_ARB_texture_env_combine, GL_EXT_texture_env_combine and GL_ARB_texture_env_add in his OpenGL extension list. He seems to have an odd card as it claims it's OpenGL 1.1 so it really shouldn't have those. I'll try making my own pointer to glTexEnvi (AllegroGL *should* do it automatically, but I've caught it not doing so in the past) and hope that it works... Thanks again,
  10. Odd problem here, I thought that in order to use glActiveTexture then all that needed to be present was GL_ARB_multitexture, however a person who's testing my new remake's machine falls over at the call to glActiveTexture. Are there other extensions which need to be present for this function to work? Thanks,
  11. dot3, eh? I'll look into that, thanks!
  12. Indeed, that's the obvious solution which I was pretty much resigned to from the beginning, but I was hoping there was a cleverer way of doing it via a simple blend mode or texture combiner.
  13. I suspected that it would come down to shaders, yes. Poo. I really wanna' keep the spec down what with it being a remake. Thanks,
  14. Hello there, I'm gonna' embark on a remake of Wizball which requires me to have desaturated versions of objects in the world which then get coloured in. Now obviously I'd prefer to just have a single instance of the texture in memory and then draw it desaturated via some means but I'm damned if I can figure out if this is easily possible in OpenGL 1.3, let alone 1.1 (which is really the ideal driver level I'd be targetting). Anyone got any ideas? Thanks,
  15. DrDerekDoctors

    Circle-circle tangents

    Erissian: My first thoughts was of the lines that run through the centre of the circle thing, but if you draw that on paper with two circles of different size you'll see that the shape you end up with is wrong, sadly. Ta' for the input, though. Oh, and it's a realtime thing - it's actually for a friend whose making a 3D space shooter where everthing is comprised of circles and capsules. LilBudyWizer: I shall have a look at that and give it a whizz, thanks.
  • 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!