[Mesa-dev] [PATCH 1/4] mesa: Add a Version field to the context with VersionMajor*10+VersionMinor.

Kenneth Graunke kenneth at whitecape.org
Fri Jul 27 11:46:35 PDT 2012


On 07/27/2012 06:47 AM, Brian Paul wrote:
> How about a simple inline helper function like this:
> 
> /**
>  * Check if the OpenGL version is greater than or equal to "major.minor"
>  */
> static inline GLboolean
> _mesa_have_version(const struct gl_context *ctx, int major, int minor)
> {
>     return ctx->Version >= major * 10 + minor;
> }
> 
> -Brian

I like it.

--Ken


More information about the mesa-dev mailing list