You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Separate from initializing a GL context (very platform specific) is the issue of making that GL context even slightly easy to use (fairly platform neutral).
Basically you usually end up with a function like:
fngl_get_proc_address(name:&[u8]) -> *mutc_void;
And from there you fill in a struct of pointers or you fill in some global static values.
// global fn styleglClearColor(1.0,1.0,0.5,1.0);// struct style
gl.Clear(GL_COLOR_BUFFER_BIT);
The global functions style is a hair easier to use, but the struct style connects the fns more closely to their context (which is essentially "more correct").
So we should have a lesson about how you do all this. We don't have to do the full thing necessarily, since our actual GL usage is very modest. We can just show people what they would do and then say "now go use the crate".
The text was updated successfully, but these errors were encountered:
Separate from initializing a GL context (very platform specific) is the issue of making that GL context even slightly easy to use (fairly platform neutral).
Basically you usually end up with a function like:
And from there you fill in a struct of pointers or you fill in some global static values.
The global functions style is a hair easier to use, but the struct style connects the fns more closely to their context (which is essentially "more correct").
So we should have a lesson about how you do all this. We don't have to do the full thing necessarily, since our actual GL usage is very modest. We can just show people what they would do and then say "now go use the crate".
The text was updated successfully, but these errors were encountered: