8,765 reputation
21953
bio website twitter.com/panda_pajama_en
location Tokyo, Japan
age
visits member for 2 years, 6 months
seen 44 mins ago

39m
comment Using full resolution of depth buffer for 2D rendering
@MattEsch: There's only so much you can do with just blitting. Rotations, scaling and deformations come to mind, but also since you have pixel/vertex shaders, the limit of what you can do with hardware is much higher than what you can do with just blitting.
16h
comment Using full resolution of depth buffer for 2D rendering
@MattEsch: The idea is that all those calculations are done in the GPU at blazingly high speeds, so it does make sense to do that.
16h
comment Using full resolution of depth buffer for 2D rendering
@AshleysBrain: you take the denominator (v / k) - a => (v - k * a) / k, and collapse to (k * b) / (v - (k * a)). It's the same result.
17h
answered Using full resolution of depth buffer for 2D rendering
1d
comment How do I correctly project a point behind the camera?
I'll be awarding the bounty to you for helping me understand the problem and come up with a hacky solution that eventually worked.
1d
comment How do I correctly project a point behind the camera?
I've tried with only W < 0, but there are still places where it is incorrectly projected.
May
19
comment How do I correctly project a point behind the camera?
With this I can indeed know when the point is behind the camera. However, this doesn't prevent the projection to reach a singularity at Z=0.
May
14
comment Cannot convert bitmap to texture
Not only more powerful but also easier. With VBO there is no glBegin or glEnd, so your current pronlem is inexistent
May
14
comment Cannot convert bitmap to texture
You may want to consider using a more modern OpenGL approach, with vertex buffers...
May
14
comment Cannot convert bitmap to texture
I don't have much to say. Even though I think that glIsTexture is meaningful only before glImage2D, I do want to point out that you're using PixelInternalFormat.Rgba8. I commonly use PixelInternalFormat.Rgba. How about trying PixelInternalFormat.Rgba?
May
14
comment Cannot convert bitmap to texture
The idea is that, if glIsTexture is returning false, then your culprit is not related at all with glTexImage2D. It has nothing to do with your data. There is some reason why you're not getting a valid texture name, and improperly initialized OpenGL comes to mind. You say you're initializing it properly though...
May
14
comment Cannot convert bitmap to texture
What value are you getting from glGenTexture?
May
14
comment Cannot convert bitmap to texture
glIsTexture is used to determine if the provided name is indeed a texture. It has nothing to do with whether the data inside is correct or not. In other words, glIsTexture is related to glGenTextures and glBindTexture, and has nothing to do with glTexImage2D. The correct place to check with glIsTexture would be right after glBindTexture. I've also had some trouble with GL.GenTextures in the past. How about using GL.GenTexture instead?
May
14
comment How do I correctly project a point behind the camera?
I created a (chatroom)[chat.stackexchange.com/rooms/23757/] for this question. Would you have some time to join me?
May
14
comment How do I correctly project a point behind the camera?
But, by calculating AB, am I not converting the target position from world coordinates to camera coordinates?
May
14
comment How do I correctly project a point behind the camera?
Y is PositionY + (y * Scaling). I'll give it a try tonight
May
14
comment How do I correctly project a point behind the camera?
Not really. How are you "converting and normalizing" the vector? If that is by applying a projection matrix, then you're doing the same thing I'm doing
May
14
comment How do I correctly project a point behind the camera?
How exactly would that step 4 work?
May
14
revised How do I correctly project a point behind the camera?
edited tags
May
14
revised How do I correctly project a point behind the camera?
Clarified the problem a bit more