FontGLUT.cpp (pymol-v2.1.0.tar.bz2) | : | FontGLUT.cpp (pymol-open-source-2.2.0) | ||
---|---|---|---|---|
skipping to change at line 112 | skipping to change at line 112 | |||
error = true; | error = true; | |||
} | } | |||
} | } | |||
} | } | |||
st += 1; | st += 1; | |||
return c; | return c; | |||
} | } | |||
static const char *FontGLUTRenderOpenGL(RenderInfo * info, CFontGLUT * I, const char *st, float size, | static const char *FontGLUTRenderOpenGL(RenderInfo * info, CFontGLUT * I, const char *st, float size, | |||
float *rpos SHADERCGOARG) | float *rpos, short needSize, short relativeMod e, short shouldRender SHADERCGOARG) | |||
{ | { | |||
PyMOLGlobals *G = I->Font.G; | PyMOLGlobals *G = I->Font.G; | |||
if(G->ValidContext) { | if(G->ValidContext) { | |||
int c; | int c; | |||
FontGLUTBitmapFontRec *font_info = I->glutFont; | FontGLUTBitmapFontRec *font_info = I->glutFont; | |||
int first, last; | int first, last; | |||
FontGLUTBitmapCharRec const *ch; | FontGLUTBitmapCharRec const *ch; | |||
int textured = true && SHADERCGOARGV; | int textured = true && SHADERCGOARGV; | |||
int pushed = OrthoGetPushed(G); | int pushed = OrthoGetPushed(G); | |||
int sampling = 1; | int sampling = 1; | |||
skipping to change at line 286 | skipping to change at line 286 | |||
int id = CharacterFind(G, &fprnt); | int id = CharacterFind(G, &fprnt); | |||
if(!id) { | if(!id) { | |||
id = CharacterNewFromBitmap(G, ch->width, | id = CharacterNewFromBitmap(G, ch->width, | |||
ch->height, | ch->height, | |||
(unsigned char *) ch->bitmap, | (unsigned char *) ch->bitmap, | |||
(float) ch->xorig, | (float) ch->xorig, | |||
(float) ch->yorig, | (float) ch->yorig, | |||
(float) ch->advance, &fprnt, sampl ing); | (float) ch->advance, &fprnt, sampl ing); | |||
} | } | |||
if(id) { | if(id) { | |||
CharacterRenderOpenGL(G, info, id, false SHADERCGOARGVAR); / * handles advance */ | CharacterRenderOpenGL(G, info, id, false, relativeMode SHADERC GOARGVAR); /* handles advance */ | |||
} | } | |||
} | } | |||
} | } | |||
} | } | |||
} | } | |||
} | } | |||
if(textured) | if(textured) | |||
CharacterRenderOpenGLDone(G, info); | CharacterRenderOpenGLDone(G, info); | |||
if(textured && !pushed) { | if(textured && !pushed) { | |||
skipping to change at line 309 | skipping to change at line 309 | |||
if(!textured) { | if(!textured) { | |||
FontGLUTRestore(I); | FontGLUTRestore(I); | |||
glFlush(); /* workaround for screen flashes on late-model n Vidia hardware */ | glFlush(); /* workaround for screen flashes on late-model n Vidia hardware */ | |||
} | } | |||
} | } | |||
} | } | |||
return st; | return st; | |||
} | } | |||
static const char *FontGLUTRenderRay(CRay * ray, CFontGLUT * I, const char *st, float size, | static const char *FontGLUTRenderRay(CRay * ray, CFontGLUT * I, const char *st, float size, | |||
float *rpos) | float *rpos, short needSize, short relativeMode) | |||
{ | { | |||
PyMOLGlobals *G = I->Font.G; | PyMOLGlobals *G = I->Font.G; | |||
int c; | int c; | |||
FontGLUTBitmapFontRec *font_info = I->glutFont; | FontGLUTBitmapFontRec *font_info = I->glutFont; | |||
int first, last; | int first, last; | |||
FontGLUTBitmapCharRec const *ch; | FontGLUTBitmapCharRec const *ch; | |||
CharFngrprnt fprnt; | CharFngrprnt fprnt; | |||
unsigned char *rgba; | unsigned char *rgba; | |||
int sampling = 1; | int sampling = 1; | |||
float xn[3], yn[3], x_adj[3], y_adj[3], pos[3], *v; | float xn[3], yn[3], x_adj[3], y_adj[3], pos[3], *v; | |||
End of changes. 3 change blocks. | ||||
3 lines changed or deleted | 3 lines changed or added |