Tag Info

New answers tagged

1

No, there is not a simpler way. As you said, you must recreate all sampler objects that are affected by a change. However, it doesn't have to be a lot of work. Typically, you can share a few samplers across many shaders. I typically have a single sampler with trilinear/aniso filtering and repeat addressing, reused for textures across all shaders. If the ...


1

Until OpenGL 3.0, each version of OpenGL was a direct superset of the previous one, so as long as a graphics card and its drivers support the functions you use, you don't have to worry about compatibility. Also, until 3.0 was released, there was no way to choose an OpenGL version because if you got a newer version than you wanted, you just got functionality ...


0

I know how you feel, SDL2 is somewhat different from the earlier one, to make it easier, I'll explain how SDL_Renderer, SDL_Window, and SDL_Texture works. //CREATE WINDOW SDL_Window *window = SDL_CreateWindow("Title", 100, 100, 400, 600,SDL_WINDOW_SHOWN); /*You have created a variable named window which is in the type of SDL_Window, SDL_Create Window ...


1

So, the answer it turns out is to create a child scene node of the sunNode positioning it some distance away. Ogre::SceneNode* sunBBNode = sunNode->createChildSceneNode("sunFlare", Ogre::Vector3(0,0,-1000)); Creating the billboard is easy. In this case, I am just using the Examples/Flare material from the default Ogre media. Ogre::BillboardSet* ...


0

The renderer cannot accept SDL_Surface*'s so you will have to convert them to textures by SDL_Texture* texture = SDL_CreateTextureFromSurface(render, surface) The renderer is basically an SDL_Window* that is hidden from the user where the graphics are rendered at first, then the rendered data gets switched with the window's data To do this you must use ...


2

You're multiplying your vertex position and normal by the view matrix, change it to only use the model matrix. vec4 pos4 = model * vec4(vertex_position, 1.0); Change the normal_matrix to just be the inverse transpose of the model matrix only. glm::mat4 normal_matrix = glm::transpose(glm::inverse(modelMatrix));



Top 50 recent answers are included