|
What does GL do when you try to upload a non-pow2 texture, without using the non-pow2 extension? When I do this, it works just as a pow-2 texture does, but: (a) Does it upscale the texture to pow-2 internally, or leave it as it is (b) Is the behaviour in a) dependent on GL version or anything else? (c) Is there a way to get the width/height of an uploaded texture?
|
# ¿ Oct 2, 2008 09:51 |
|
|
# ¿ Apr 29, 2024 14:08 |
|
I presume that it also runs in plain debug mode, rather than only in the debugger? If this is the case, then it could be a whole number of things. My money's on uninitialised variables - see this page for more info.
|
# ¿ Oct 2, 2008 15:16 |
|
How reliable are non-pow2 textures in OpenGL? They've been promoted to the core spec and I've never had any problem with them, but I've only had a very limited range of cards to test on (all nvidia). I've just come back to graphics coding after a pretty lengthy absence - are they still slow, or is the speed difference negligible?
|
# ¿ Dec 15, 2008 11:15 |
|
Ok, that's a bit more drastic than I was expecting, and pretty conclusive. I was actually only considering using one for a full-screen overlay (ie using one 1024x768 texture) because using a 1024x1024 is causing slight but noticeable scaling artifacts. I don't think this is going to impact performance - I'm more worried that drivers (especially ATI's) will be dodgy and give me the old white texture routine.
|
# ¿ Dec 15, 2008 12:24 |
|
OneEightHundred posted:As far as I know, rectangle textures (see: ARB_texture_rectangle) give good speed on all hardware, you just have to deal with the fact that the coordinates aren't normalized and you can't mipmap them.
|
# ¿ Dec 16, 2008 13:25 |
|
This is a bit of a ridiculous question because it seems so basic, but: I can't get smooth scrolling in OpenGL (using ortho projection). It seems to be because the floating point coords are getting rounded down (which makes sense) and I wouldn't have thought it would be noticeable at 60 fps, but it is. When I use integer coords, everything is fine.
|
# ¿ Jan 20, 2010 20:51 |
|
Alcool Tue posted:From my limited perspective on General Programming, properly declared float values aren't going to round themselves down unless you're turning them into ints OR you're running math with both ints and floats as values, which could either truncate your floats or add a .0 to your ints depending on some poo poo.
|
# ¿ Jan 21, 2010 15:23 |
|
What's up with this vertex shader?code:
code:
|
# ¿ May 16, 2010 00:04 |
|
PDP-1 posted:The w component of your vector should pretty much always be 1. edit: I'm using the 'w' component to store extra information which I use in the vertex shader, if you were wondering.
|
# ¿ May 16, 2010 02:19 |
|
|
# ¿ Apr 29, 2024 14:08 |
|
edit: ok, it's working. Turns out the problem was actually in the fragment shader where I was doing something with gl_FrontColor which I shouldn't have been doing.
newsomnuke fucked around with this message at 13:15 on May 16, 2010 |
# ¿ May 16, 2010 12:28 |