New answers tagged


Whenever you modify a camera's position, you need to call camera.update() so that it will update all of the other variables that the camera uses. This update call should be done before any drawing is done. In my games, I usually call camera.update() at the beginning of my render function. Second, it looks like you are calling camera.translate(100,100) every ...


You should generate mipmaps, those are textures for objects further away, antialiasing could also help to make things smooth


Add some random points Repell points located too close to each other Add some points along the edges Do Delaunay Triangulation on all the points Done


I tested it. it is caused by if(delta >= 1){ tick(); updates++; delta--; } Change it to if(delta >= 0.0001){ tick(); updates++; delta--; } .If this doesn't then it is probably the problem of your computer being too slow. But don't worry, this is not a big deal.


Fixed!!!!! Forgot to transpose world, view, and projection matrix. So fixing the aspect ratio and making sure to transpose the matrices fixed the issue. I have to remember that HLSL is column-major rather than row major.


The flag called SDL_WINDOW_INPUT_GRABBED seems to prevent the problem from happening. But still not sure if that is the, or a, correct solution. SDL_CreateWindow( "SDL Tutorial",SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, screenWidth, screenHeight, SDL_WINDOW_FULLSCREEN | SDL_WINDOW_SHOWN | SDL_WINDOW_BORDERLESS | SDL_WINDOW_INPUT_GRABBED );


There are two main benefits: First, if you downsample by more than a factor of two, some pixels in the original image will have no impact on the result image. Using GL_LINEAR, each destination pixel will only sample from at most 4 pixels from the source image; the other pixels simply get discarded. By downsampling by a factor of two, you ensure that each ...


It's important to note that glxinfo -v only reports the supported values for the default OpenGL framebuffer, the one that represents the visible screen itself. It's common for other configurations (ones not reported by glxinfo) to be supported in offscreen framebuffer objects (FBOs). As you've noticed, most video cards do not support a 32-bit depth buffer ...


The Phong model (diffuse + specular + ambient) is just an approximation of how light behaves. In reality, there's what's called a BRDF or bidirectional reflectance distribution function. It is a function which tell you, for a given point on the surface the probability of light bouncing in a given direction given an incident ray of light. The components ...

Top 50 recent answers are included