-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
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:
fn gl_get_proc_address(name: &[u8]) -> *mut c_void;
And from there you fill in a struct of pointers or you fill in some global static values.
// global fn style
glClearColor(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".
Metadata
Metadata
Assignees
Labels
No labels