VirtualBox

Ignore:
Timestamp:
Sep 6, 2013 10:22:11 AM (11 years ago)
Author:
vboxsync
Message:

crOpenGL: int gl version presentation

Location:
trunk/src/VBox/GuestHost/OpenGL/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/OpenGL/include/cr_blitter.h

    r48291 r48348  
    3232typedef struct CR_GLSL_CACHE
    3333{
    34     float glVersion;
     34    int iGlVersion;
    3535    GLuint uNoAlpha2DProg;
    3636    GLuint uNoAlpha2DRectProg;
     
    4141{
    4242    memset(pCache, 0, sizeof (*pCache));
    43     pCache->glVersion = 0.0;
    4443    pCache->pDispatch = pDispatch;
    4544}
  • trunk/src/VBox/GuestHost/OpenGL/include/cr_string.h

    r20374 r48348  
    3737DECLEXPORT(void)    crWordsToString( char *string, int nstring, void *data, int ndata );
    3838
     39#define CR_GLVERSION_OFFSET_MAJOR (24)
     40#define CR_GLVERSION_OFFSET_MINOR (16)
     41#define CR_GLVERSION_OFFSET_BUILD (0)
     42
     43#define CR_GLVERSION_MAX_MAJOR (0x7f)
     44#define CR_GLVERSION_MAX_MINOR (0xff)
     45#define CR_GLVERSION_MAX_BUILD (0xffff)
     46
     47#define CR_GLVERSION_MASK_MAJOR (CR_GLVERSION_MAX_MAJOR << CR_GLVERSION_OFFSET_MAJOR)
     48#define CR_GLVERSION_MASK_MINOR (CR_GLVERSION_MAX_MINOR << CR_GLVERSION_OFFSET_MINOR)
     49#define CR_GLVERSION_MASK_BUILD (CR_GLVERSION_MAX_BUILD << CR_GLVERSION_OFFSET_BUILD)
     50
     51#define CR_GLVERSION_COMPOSE_EL(_val, _type) (((_val) << CR_GLVERSION_OFFSET_##_type) & CR_GLVERSION_MASK_##_type)
     52
     53#define CR_GLVERSION_COMPOSE(_maj, _min, _build) (CR_GLVERSION_COMPOSE_EL((_maj), MAJOR) \
     54        + CR_GLVERSION_COMPOSE_EL((_min), MINOR) \
     55        + CR_GLVERSION_COMPOSE_EL((_build), BUILD))
     56
     57#define CR_GLVERSION_GET_EL(_val, _type) (((_val) & CR_GLVERSION_MASK_##_type) >> CR_GLVERSION_OFFSET_##_type)
     58#define CR_GLVERSION_GET_MAJOR(_val) CR_GLVERSION_GET_EL((_val), MAJOR)
     59#define CR_GLVERSION_GET_MINOR(_val) CR_GLVERSION_GET_EL((_val), MINOR)
     60#define CR_GLVERSION_GET_BUILD(_val) CR_GLVERSION_GET_EL((_val), BUILD)
     61
     62DECLEXPORT(int) crStrParseGlVersion(const char * ver);
    3963RT_C_DECLS_END
    4064
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette