rendering - OpenGL 3.1-4.1 new and deprecated features -


i've been working opengl year now, , have learned lot of stuff. unfortunatly way learned old pre 3.x way, meaning immediate mode, default shaders, matrix stacks, etc. more or less have idea of has changed looking @ opengl specs, don't totally understand of new ways things.

from understanding got rid of matrix stacks, meaning have keep track of own transformation matrices, doesn't seem complicated. got rid of immediate mode, meaning need use vbos or vaos (never know one, maybe both..) send pixel/normal/texture,etc. information shader program. don't way these objects works, think need put info them, , provide ofset of sort show separators between pixel,normal , texture coordinates. briefly explain how works (or send me link explains it)? tried wikipedia , googling it, found myself still not quite understanding them.

another point know more shaders, i've never used them. i'm not going ask how code them or anything, needs go in there , opengl still you. more specifically, need in shaders basic rendering program? know need ligthing calculations , use matrices calculate real vertex position. opengl still take care of backface culling, line clipping, polygon filling , other lower level issues, or have code them yourslef shaders (or don't belong in shaders)?

since immediate mode deprecated doing "hello triangle" application bit more involved. there tutorial on modern opengl here:

http://arcsynthesis.org/gltut/

you should read thoroughly. bear in mind doesn't use vaos you'll have read somewhere else afterwards. vaos don't change things won't have unlearn things mentioned tutorial use them.

and second question... vertex shader executed opengl every vertex. job calculate final position of vertex , prepare data (like normals, light data...) sent fragment shader, given attributes of vertex , other data send shader (uniforms - you'll read in tutorial). fragment shader executed per fragment , in fragment shader calculating final color of each fragment.

you can see here:

http://www.opengl.org/sdk/docs/man4/

that things like, glpolygonmode , glcullface still there.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -