+void CL_Gecko_Resize( clgecko_t *instance, int width, int height ) {\r
+ int newWidth, newHeight;\r
+\r
+ // early out if bad parameters are passed (no resize to a texture size bigger than the original texture size)\r
+ if( !instance || !instance->browser) {\r
+ return;\r
+ }\r
+\r
+ newWidth = CeilPowerOf2( width );\r
+ newHeight = CeilPowerOf2( height );\r
+ if ((newWidth != instance->texWidth) || (newHeight != instance->texHeight))\r
+ {\r
+ cl_gecko_unlinktexture( instance );\r
+ instance->texWidth = newWidth;\r
+ instance->texHeight = newHeight;\r
+ cl_gecko_linktexture( instance );\r
+ }\r
+ else\r
+ {\r
+ /* The gecko area will only cover a part of the texture; to avoid\r
+ 'old' pixels bleeding in at the border clear the texture. */\r
+ R_ClearTexture( instance->texture );\r
+ }\r
+\r
+ osgk_browser_resize( instance->browser, width, height);\r
+ instance->width = width;\r
+ instance->height = height;\r
+}\r
+\r
+void CL_Gecko_GetTextureExtent( clgecko_t *instance, float* pwidth, float* pheight )\r
+{\r
+ if( !instance || !instance->browser ) {\r
+ return;\r
+ }\r
+\r
+ *pwidth = (float)instance->width / instance->texWidth;\r
+ *pheight = (float)instance->height / instance->texHeight;\r
+}\r
+\r
+\r