Hot answers tagged

2

I just want to know how to properly handle rendering a large amount of different TYPES of object. Whatever you consider a "type of object," you can usually avoid actually having too many types of things that the renderer needs to know how to process and draw. Fundamentally, for every given draw call, the renderer needs to know: what geometry (vertex ...


2

There's no good way to detect different data formats from each other in shader code. In general you should always give the same kind of data to your shaders. You need to pre-process your data before drawing with it. Pick one format and convert all data to that, and then write your shaders to use that format. One other way is to detect the format before ...


2

This would depend on whether your game uses direct calls to the bindings or not. So if your library deals with all low level stuff itself, you build it, link to your game and you are good to go, no need for extra linking of GLFW, GLEW, etc. But going this way your game will not have direct access to the recources and functions these helper libraries give. If ...


2

Even though you are binding the textures correctly with glActiveTexture and glBindTexture you are not telling GLSL which sampler uniform goes to which texture. What you should do is this: glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, colorBuffers[0]); glUniformi(glGetUniformLocation(bloomShader.program, "colorTexture"), colorBuffers[0]); ...


1

Any other forms of shadow mapping are probably going to be slower. I would not necessarily say it is too slow if you are getting 90 frames per second, though. When you have nothing going on in a scene it's very common to go from a very high frame rate to a much lower one. Yes, in a sense 4/5 of your power is going to shadows, but it is a relative measure ...


1

Your question needs re-phrasing. SDL and OPENGL are two different technologies so to speak. Also, this question will lead to opinions instead of facts Wikipedia says: Simple DirectMedia Layer (SDL) is a cross-platform software development library designed to provide a low level hardware abstraction layer to computer multimedia hardware components. Open ...


1

The problem you are experiencing is called Gimbal Lock. There are some ways to circumvent this problem. One possibility is to use Quaternions. There are plenty of resources on the web about them so I won't go to deep into the details here. Quaternions are fast but not very intuitive for a 3D editor. But it is possible to convert Euler angles to Quaternions. ...



Only top voted, non community-wiki answers of a minimum length are eligible