[−][src]Crate gles30
Global GLES loader and bindings for GLES 3.0 Core.
It was generated using gl_generator
, so it works basically like the gl
crate does.
use gles30 as gl; gl::load_with(|ptr| SDL_GL_GetProcAddress(ptr)); gl::ClearColor(0.5, 0.5, 0.5, 1.0);
The main difference from the gl
crate is that this crate only loads
GLES 3.0 Core. If you want to really make sure that you're not
accidentally relying on extra functions during development that you won't
have during deployment you can use this crate.
Features
There's two features you can turn on. Both will print stuff to the console
if debug_assertions
are enabled.
debug_trace_messages
: If enabled, immediately before a call to a GL function it'll print the function's name. I expect that you'd keep this off most of the time, but if you're getting segfaults it might help to get a message before each GL call and hopefully you can spot the problem.debug_error_checks
: If enabled, immediately after all calls to GL there's an additional call toglGetError
. If the error value is something other thanNO_ERROR
then you'll immediately get an error message printed showing the name of the function, the arguments you passed, and the error code.
no_std
Support
This library is no_std
friendly! It's just bindings and loader callbacks
after all.
However, having either of the above features for message printing enabled
will cause the crate to link to the std
crate whenever
debug_assertions
are on. It's the price we pay for debugging messages.
Modules
Enums
__GLsync | |
_cl_context | |
_cl_event | |
c_void | Equivalent to C's |