简体   繁体   中英

opengl-es glUseProgram() arugments

My first time trying out openGL on iOS. I have compiled the source and now I can only run the program, but how can I pass in arguments to that program for more dynamic behavious? Or do I have to compile from source every time with the argument embedded in the source?

I am looking for something like glUseProgram(myProgram, arg1, arg2);

Thanks

You cant use that function like that.

http://www.khronos.org/opengles/sdk/docs/man/

What you are looking for, is using uniforms and attributes, each is specified differently. It is a very extensive subject so I suggest you try reading this:

http://db-in.com/blog/2011/01/all-about-opengl-es-2-x-part-13/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM