Reputation: 2521
I'm a beginner to OpenGL and I'd like a simple introduction to using textures. For my application, I have no need of geometry, just some texture manipulation. I want to be able to scale, rotate, and translate textures, blend textures together (mixing R,G,B components), and display textures on the screen. If you could also tell me how to draw a solid filled rectangle, that would be good.
I'm also fuzzy on shaders. Could I use GLSL to transform the color at every point on a texture by a formula?
Examples or explanations in C would be preferred.
Upvotes: 1
Views: 412
Reputation: 10105
You have asked a lot of questions...
If you want to play with textures and do some 2d effects here is a little pseudocode that could help:
render() {
glClear(...)
glUseProgram(shader_program);
bind_textures();
setup_shader_params();
draw_fullscreen_quad();
glUseProgram(0);
// rest of opengl...
}
read more on:
Upvotes: 2