Tag Info

Hot answers tagged

2

It is possible to just pass the Content Manager to your modules, and have them load their own textures/data. Its also tidier, as the Module is responsible for loading its own textures, and doesn't have to depend on its resources being loaded elsewhere. I do something similar - my data objects have a string specifying a texture/model, and my rendering code ...


2

Be sure you open the Sprite sheet from the path of the asset. You can achieve this either opening the sheet within the project window or going thru your documents to the asset folder of the project location. You can open it with your editor of choice and can then update and apply the changes to the project file "your sprite sheet" doing this will update ...


2

To be safe I'd delete and recreate the entire FBO. Some drivers have strange stability issues when recycling/resizing FBOs. I've had entire screen flickers and occasional crashes. Switching attached textures to another of the same size & type seem to work fine all the time on all drivers but with some drivers it is much faster (more than 100x) to have ...


1

To calculate perspective projection divide by w. vec4 result = vec4(x, y, z, 1) * perspective_view_model_matrix; result /= w; You are then left with the (x,y) in screen space (-1 to 1). Multiply this by 1/2 screen width,height and you get pixel coordinates. You then need to take the corresponding vertex UVs, multiply by the texture size and you get ...


1

An .obj model file may come with a companion file with the extension .mtl. Such a file is a material library that contains entries mapping from a material name to properties, including texture filenames to use for things like diffuse and specular. In your obj-file, there are mtllib a.mtl directives to indicate the material library to use, and usemtl aaaa ...


1

Usage of glVertexAttribPointer is suspicious. glVertexAttribPointer( 2, // 3, // Mistake in TexCoords, should be 2 GL_FLOAT, // GL_FALSE, // 0, // Should be size of your vertex (void*)0 // Should be offset within vertex ); Check the documentation ...


1

If you use a point sampler for your mask texture, then you can store as many IDs as bits in your texture: for a 32-bit RGBA texture you'd be able to store 128 different IDs. In such a case though, as you have a single bit per ID, there's virtually no blending as you have only 0 or 1. The more bits you devote per ID, the greater the blending granularity, ...



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