From b3462c12542a69eeaa3fe90fddfbb15d30c18158 Mon Sep 17 00:00:00 2001 From: marha Date: Mon, 27 Aug 2012 08:17:50 +0200 Subject: xwininfo fontconfig libX11 libXau libXext libxcb mesa pixman xkeyboard-config git update 27 Aug 2012 --- mesalib/src/mesa/swrast/s_texfetch.c | 96 ++++++++++++++-------------- mesalib/src/mesa/swrast/s_texfilter.c | 115 ++++++++++++++++++++++------------ mesalib/src/mesa/swrast/s_texture.c | 5 +- 3 files changed, 125 insertions(+), 91 deletions(-) (limited to 'mesalib/src/mesa/swrast') diff --git a/mesalib/src/mesa/swrast/s_texfetch.c b/mesalib/src/mesa/swrast/s_texfetch.c index db7c887b6..741dd876c 100644 --- a/mesalib/src/mesa/swrast/s_texfetch.c +++ b/mesalib/src/mesa/swrast/s_texfetch.c @@ -426,27 +426,27 @@ texfetch_funcs[MESA_FORMAT_COUNT] = }, { MESA_FORMAT_SRGB_DXT1, - NULL, - _mesa_fetch_texel_2d_f_srgb_dxt1, - NULL + _mesa_fetch_texel_srgb_dxt1, + _mesa_fetch_texel_srgb_dxt1, + _mesa_fetch_texel_srgb_dxt1 }, { MESA_FORMAT_SRGBA_DXT1, - NULL, - _mesa_fetch_texel_2d_f_srgba_dxt1, - NULL + _mesa_fetch_texel_srgba_dxt1, + _mesa_fetch_texel_srgba_dxt1, + _mesa_fetch_texel_srgba_dxt1 }, { MESA_FORMAT_SRGBA_DXT3, - NULL, - _mesa_fetch_texel_2d_f_srgba_dxt3, - NULL + _mesa_fetch_texel_srgba_dxt3, + _mesa_fetch_texel_srgba_dxt3, + _mesa_fetch_texel_srgba_dxt3 }, { MESA_FORMAT_SRGBA_DXT5, - NULL, - _mesa_fetch_texel_2d_f_srgba_dxt5, - NULL + _mesa_fetch_texel_srgba_dxt5, + _mesa_fetch_texel_srgba_dxt5, + _mesa_fetch_texel_srgba_dxt5 }, { @@ -463,27 +463,27 @@ texfetch_funcs[MESA_FORMAT_COUNT] = }, { MESA_FORMAT_RGB_DXT1, - NULL, - _mesa_fetch_texel_2d_f_rgb_dxt1, - NULL + _mesa_fetch_texel_rgb_dxt1, + _mesa_fetch_texel_rgb_dxt1, + _mesa_fetch_texel_rgb_dxt1 }, { MESA_FORMAT_RGBA_DXT1, - NULL, - _mesa_fetch_texel_2d_f_rgba_dxt1, - NULL + _mesa_fetch_texel_rgba_dxt1, + _mesa_fetch_texel_rgba_dxt1, + _mesa_fetch_texel_rgba_dxt1 }, { MESA_FORMAT_RGBA_DXT3, - NULL, - _mesa_fetch_texel_2d_f_rgba_dxt3, - NULL + _mesa_fetch_texel_rgba_dxt3, + _mesa_fetch_texel_rgba_dxt3, + _mesa_fetch_texel_rgba_dxt3 }, { MESA_FORMAT_RGBA_DXT5, - NULL, - _mesa_fetch_texel_2d_f_rgba_dxt5, - NULL + _mesa_fetch_texel_rgba_dxt5, + _mesa_fetch_texel_rgba_dxt5, + _mesa_fetch_texel_rgba_dxt5 }, { MESA_FORMAT_RGBA_FLOAT32, @@ -976,51 +976,51 @@ texfetch_funcs[MESA_FORMAT_COUNT] = }, { MESA_FORMAT_RED_RGTC1, - NULL, - _mesa_fetch_texel_2d_f_red_rgtc1, - NULL + _mesa_fetch_texel_red_rgtc1, + _mesa_fetch_texel_red_rgtc1, + _mesa_fetch_texel_red_rgtc1 }, { MESA_FORMAT_SIGNED_RED_RGTC1, - NULL, - _mesa_fetch_texel_2d_f_signed_red_rgtc1, - NULL + _mesa_fetch_texel_signed_red_rgtc1, + _mesa_fetch_texel_signed_red_rgtc1, + _mesa_fetch_texel_signed_red_rgtc1 }, { MESA_FORMAT_RG_RGTC2, - NULL, - _mesa_fetch_texel_2d_f_rg_rgtc2, - NULL + _mesa_fetch_texel_rg_rgtc2, + _mesa_fetch_texel_rg_rgtc2, + _mesa_fetch_texel_rg_rgtc2 }, { MESA_FORMAT_SIGNED_RG_RGTC2, - NULL, - _mesa_fetch_texel_2d_f_signed_rg_rgtc2, - NULL + _mesa_fetch_texel_signed_rg_rgtc2, + _mesa_fetch_texel_signed_rg_rgtc2, + _mesa_fetch_texel_signed_rg_rgtc2 }, { MESA_FORMAT_L_LATC1, - NULL, - _mesa_fetch_texel_2d_f_l_latc1, - NULL + _mesa_fetch_texel_l_latc1, + _mesa_fetch_texel_l_latc1, + _mesa_fetch_texel_l_latc1 }, { MESA_FORMAT_SIGNED_L_LATC1, - NULL, - _mesa_fetch_texel_2d_f_signed_l_latc1, - NULL + _mesa_fetch_texel_signed_l_latc1, + _mesa_fetch_texel_signed_l_latc1, + _mesa_fetch_texel_signed_l_latc1 }, { MESA_FORMAT_LA_LATC2, - NULL, - _mesa_fetch_texel_2d_f_la_latc2, - NULL + _mesa_fetch_texel_la_latc2, + _mesa_fetch_texel_la_latc2, + _mesa_fetch_texel_la_latc2 }, { MESA_FORMAT_SIGNED_LA_LATC2, - NULL, - _mesa_fetch_texel_2d_f_signed_la_latc2, - NULL + _mesa_fetch_texel_signed_la_latc2, + _mesa_fetch_texel_signed_la_latc2, + _mesa_fetch_texel_signed_la_latc2 }, { MESA_FORMAT_ETC1_RGB8, diff --git a/mesalib/src/mesa/swrast/s_texfilter.c b/mesalib/src/mesa/swrast/s_texfilter.c index 3c2aae913..d116a059d 100644 --- a/mesalib/src/mesa/swrast/s_texfilter.c +++ b/mesalib/src/mesa/swrast/s_texfilter.c @@ -800,6 +800,42 @@ get_border_color(const struct gl_sampler_object *samp, } +/** + * Put z into texel according to GL_DEPTH_MODE. + */ +static INLINE void +apply_depth_mode(GLenum depthMode, GLfloat z, GLfloat texel[4]) +{ + switch (depthMode) { + case GL_LUMINANCE: + ASSIGN_4V(texel, z, z, z, 1.0F); + break; + case GL_INTENSITY: + ASSIGN_4V(texel, z, z, z, z); + break; + case GL_ALPHA: + ASSIGN_4V(texel, 0.0F, 0.0F, 0.0F, z); + break; + case GL_RED: + ASSIGN_4V(texel, z, 0.0F, 0.0F, 1.0F); + break; + default: + _mesa_problem(NULL, "Bad depth texture mode"); + } +} + + +/** + * Is the given texture a depth (or depth/stencil) texture? + */ +static GLboolean +is_depth_texture(const struct gl_texture_object *tObj) +{ + GLenum format = tObj->Image[0][tObj->BaseLevel]->_BaseFormat; + return format == GL_DEPTH_COMPONENT || format == GL_DEPTH_STENCIL_EXT; +} + + /**********************************************************************/ /* 1-D Texture Sampling Functions */ /**********************************************************************/ @@ -2391,6 +2427,11 @@ sample_nearest_cube(struct gl_context *ctx, sample_2d_nearest(ctx, samp, images[tObj->BaseLevel], newCoord, rgba[i]); } + if (is_depth_texture(tObj)) { + for (i = 0; i < n; i++) { + apply_depth_mode(tObj->DepthMode, rgba[i][0], rgba[i]); + } + } } @@ -2410,6 +2451,11 @@ sample_linear_cube(struct gl_context *ctx, sample_2d_linear(ctx, samp, images[tObj->BaseLevel], newCoord, rgba[i]); } + if (is_depth_texture(tObj)) { + for (i = 0; i < n; i++) { + apply_depth_mode(tObj->DepthMode, rgba[i][0], rgba[i]); + } + } } @@ -2440,6 +2486,11 @@ sample_cube_nearest_mipmap_nearest(struct gl_context *ctx, sample_2d_nearest(ctx, samp, images[level], newCoord, rgba[i]); } + if (is_depth_texture(tObj)) { + for (i = 0; i < n; i++) { + apply_depth_mode(tObj->DepthMode, rgba[i][0], rgba[i]); + } + } } @@ -2460,6 +2511,11 @@ sample_cube_linear_mipmap_nearest(struct gl_context *ctx, images = choose_cube_face(tObj, texcoord[i], newCoord); sample_2d_linear(ctx, samp, images[level], newCoord, rgba[i]); } + if (is_depth_texture(tObj)) { + for (i = 0; i < n; i++) { + apply_depth_mode(tObj->DepthMode, rgba[i][0], rgba[i]); + } + } } @@ -2490,6 +2546,11 @@ sample_cube_nearest_mipmap_linear(struct gl_context *ctx, lerp_rgba(rgba[i], f, t0, t1); } } + if (is_depth_texture(tObj)) { + for (i = 0; i < n; i++) { + apply_depth_mode(tObj->DepthMode, rgba[i][0], rgba[i]); + } + } } @@ -2520,6 +2581,11 @@ sample_cube_linear_mipmap_linear(struct gl_context *ctx, lerp_rgba(rgba[i], f, t0, t1); } } + if (is_depth_texture(tObj)) { + for (i = 0; i < n; i++) { + apply_depth_mode(tObj->DepthMode, rgba[i][0], rgba[i]); + } + } } @@ -3520,23 +3586,7 @@ sample_depth_texture( struct gl_context *ctx, result = shadow_compare(function, depthRef, depthSample); - switch (tObj->DepthMode) { - case GL_LUMINANCE: - ASSIGN_4V(texel[i], result, result, result, 1.0F); - break; - case GL_INTENSITY: - ASSIGN_4V(texel[i], result, result, result, result); - break; - case GL_ALPHA: - ASSIGN_4V(texel[i], 0.0F, 0.0F, 0.0F, result); - break; - case GL_RED: - ASSIGN_4V(texel[i], result, 0.0F, 0.0F, 1.0F); - break; - default: - _mesa_problem(ctx, "Bad depth texture mode"); - break; - } + apply_depth_mode(tObj->DepthMode, result, texel[i]); } } else { @@ -3615,20 +3665,7 @@ sample_depth_texture( struct gl_context *ctx, depth00, depth01, depth10, depth11, wi, wj); - switch (tObj->DepthMode) { - case GL_LUMINANCE: - ASSIGN_4V(texel[i], result, result, result, 1.0F); - break; - case GL_INTENSITY: - ASSIGN_4V(texel[i], result, result, result, result); - break; - case GL_ALPHA: - ASSIGN_4V(texel[i], 0.0F, 0.0F, 0.0F, result); - break; - default: - _mesa_problem(ctx, "Bad depth texture mode"); - } - + apply_depth_mode(tObj->DepthMode, result, texel[i]); } /* for */ } /* if filter */ } @@ -3676,11 +3713,10 @@ _swrast_choose_texture_sample_func( struct gl_context *ctx, else { const GLboolean needLambda = (GLboolean) (sampler->MinFilter != sampler->MagFilter); - const GLenum format = t->Image[0][t->BaseLevel]->_BaseFormat; switch (t->Target) { case GL_TEXTURE_1D: - if (format == GL_DEPTH_COMPONENT || format == GL_DEPTH_STENCIL_EXT) { + if (is_depth_texture(t)) { return &sample_depth_texture; } else if (needLambda) { @@ -3694,7 +3730,7 @@ _swrast_choose_texture_sample_func( struct gl_context *ctx, return &sample_nearest_1d; } case GL_TEXTURE_2D: - if (format == GL_DEPTH_COMPONENT || format == GL_DEPTH_STENCIL_EXT) { + if (is_depth_texture(t)) { return &sample_depth_texture; } else if (needLambda) { @@ -3741,10 +3777,7 @@ _swrast_choose_texture_sample_func( struct gl_context *ctx, return &sample_nearest_3d; } case GL_TEXTURE_CUBE_MAP: - if (format == GL_DEPTH_COMPONENT || format == GL_DEPTH_STENCIL_EXT) { - return &sample_depth_texture; - } - else if (needLambda) { + if (needLambda) { return &sample_lambda_cube; } else if (sampler->MinFilter == GL_LINEAR) { @@ -3755,7 +3788,7 @@ _swrast_choose_texture_sample_func( struct gl_context *ctx, return &sample_nearest_cube; } case GL_TEXTURE_RECTANGLE_NV: - if (format == GL_DEPTH_COMPONENT || format == GL_DEPTH_STENCIL_EXT) { + if (is_depth_texture(t)) { return &sample_depth_texture; } else if (needLambda) { @@ -3769,7 +3802,7 @@ _swrast_choose_texture_sample_func( struct gl_context *ctx, return &sample_nearest_rect; } case GL_TEXTURE_1D_ARRAY_EXT: - if (format == GL_DEPTH_COMPONENT || format == GL_DEPTH_STENCIL_EXT) { + if (is_depth_texture(t)) { return &sample_depth_texture; } else if (needLambda) { @@ -3783,7 +3816,7 @@ _swrast_choose_texture_sample_func( struct gl_context *ctx, return &sample_nearest_1d_array; } case GL_TEXTURE_2D_ARRAY_EXT: - if (format == GL_DEPTH_COMPONENT || format == GL_DEPTH_STENCIL_EXT) { + if (is_depth_texture(t)) { return &sample_depth_texture; } else if (needLambda) { diff --git a/mesalib/src/mesa/swrast/s_texture.c b/mesalib/src/mesa/swrast/s_texture.c index 8df4b8439..1b73d46e4 100644 --- a/mesalib/src/mesa/swrast/s_texture.c +++ b/mesalib/src/mesa/swrast/s_texture.c @@ -29,6 +29,7 @@ #include "main/context.h" #include "main/fbobject.h" #include "main/teximage.h" +#include "main/texobj.h" #include "swrast/swrast.h" #include "swrast/s_context.h" @@ -246,7 +247,7 @@ _swrast_unmap_teximage(struct gl_context *ctx, void _swrast_map_texture(struct gl_context *ctx, struct gl_texture_object *texObj) { - const GLuint faces = texObj->Target == GL_TEXTURE_CUBE_MAP ? 6 : 1; + const GLuint faces = _mesa_num_tex_faces(texObj->Target); GLuint face, level; for (face = 0; face < faces; face++) { @@ -267,7 +268,7 @@ _swrast_map_texture(struct gl_context *ctx, struct gl_texture_object *texObj) void _swrast_unmap_texture(struct gl_context *ctx, struct gl_texture_object *texObj) { - const GLuint faces = texObj->Target == GL_TEXTURE_CUBE_MAP ? 6 : 1; + const GLuint faces = _mesa_num_tex_faces(texObj->Target); GLuint face, level; for (face = 0; face < faces; face++) { -- cgit v1.2.3 From 53192e17e55aa9ed3e3721bf4fdcb2b01a595202 Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 31 Aug 2012 15:18:29 +0200 Subject: randrproto xwininfo fontconfig libxcb mesa xkeyboard-config pixman xserver git update 31 Aug 2012 --- mesalib/src/mesa/swrast/s_lines.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mesalib/src/mesa/swrast') diff --git a/mesalib/src/mesa/swrast/s_lines.c b/mesalib/src/mesa/swrast/s_lines.c index 2078be43b..cfd3e6fa9 100644 --- a/mesalib/src/mesa/swrast/s_lines.c +++ b/mesalib/src/mesa/swrast/s_lines.c @@ -188,8 +188,8 @@ _swrast_add_spec_terms_line(struct gl_context *ctx, /* draw */ SWRAST_CONTEXT(ctx)->SpecLine( ctx, ncv0, ncv1 ); /* restore original colors */ - COPY_CHAN4( ncv0->attrib[FRAG_ATTRIB_COL0], cSave[0] ); - COPY_CHAN4( ncv1->attrib[FRAG_ATTRIB_COL0], cSave[1] ); + COPY_CHAN4(ncv0->color, cSave[0]); + COPY_CHAN4(ncv1->color, cSave[1]); } -- cgit v1.2.3 From b86e8562b1ddca2a8bc29f22a79451a041bf5293 Mon Sep 17 00:00:00 2001 From: marha Date: Mon, 3 Sep 2012 09:54:39 +0200 Subject: mesa xkeyboard-config git update 3 sep 2012 --- mesalib/src/mesa/swrast/s_context.c | 14 +++++++------- mesalib/src/mesa/swrast/s_renderbuffer.c | 2 +- mesalib/src/mesa/swrast/s_texcombine.c | 2 +- mesalib/src/mesa/swrast/s_zoom.c | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) (limited to 'mesalib/src/mesa/swrast') diff --git a/mesalib/src/mesa/swrast/s_context.c b/mesalib/src/mesa/swrast/s_context.c index 4ed7b94c7..53497bc9c 100644 --- a/mesalib/src/mesa/swrast/s_context.c +++ b/mesalib/src/mesa/swrast/s_context.c @@ -720,7 +720,7 @@ GLboolean _swrast_CreateContext( struct gl_context *ctx ) { GLuint i; - SWcontext *swrast = (SWcontext *)CALLOC(sizeof(SWcontext)); + SWcontext *swrast = (SWcontext *) calloc(1, sizeof(SWcontext)); #ifdef _OPENMP const GLuint maxThreads = omp_get_max_threads(); #else @@ -775,9 +775,9 @@ _swrast_CreateContext( struct gl_context *ctx ) * using multiple threads, it is necessary to have one SpanArrays instance * per thread. */ - swrast->SpanArrays = (SWspanarrays *) MALLOC(maxThreads * sizeof(SWspanarrays)); + swrast->SpanArrays = (SWspanarrays *) malloc(maxThreads * sizeof(SWspanarrays)); if (!swrast->SpanArrays) { - FREE(swrast); + free(swrast); return GL_FALSE; } for(i = 0; i < maxThreads; i++) { @@ -828,17 +828,17 @@ _swrast_DestroyContext( struct gl_context *ctx ) _mesa_debug(ctx, "_swrast_DestroyContext\n"); } - FREE( swrast->SpanArrays ); + free( swrast->SpanArrays ); if (swrast->ZoomedArrays) - FREE( swrast->ZoomedArrays ); - FREE( swrast->TexelBuffer ); + free( swrast->ZoomedArrays ); + free( swrast->TexelBuffer ); free(swrast->stencil_temp.buf1); free(swrast->stencil_temp.buf2); free(swrast->stencil_temp.buf3); free(swrast->stencil_temp.buf4); - FREE( swrast ); + free( swrast ); ctx->swrast_context = 0; } diff --git a/mesalib/src/mesa/swrast/s_renderbuffer.c b/mesalib/src/mesa/swrast/s_renderbuffer.c index d8a7467b0..e468bdb16 100644 --- a/mesalib/src/mesa/swrast/s_renderbuffer.c +++ b/mesalib/src/mesa/swrast/s_renderbuffer.c @@ -174,7 +174,7 @@ soft_renderbuffer_delete(struct gl_renderbuffer *rb) free(srb->Buffer); srb->Buffer = NULL; } - free(srb); + _mesa_delete_renderbuffer(rb); } diff --git a/mesalib/src/mesa/swrast/s_texcombine.c b/mesalib/src/mesa/swrast/s_texcombine.c index 2a323613e..9c745d118 100644 --- a/mesalib/src/mesa/swrast/s_texcombine.c +++ b/mesalib/src/mesa/swrast/s_texcombine.c @@ -611,7 +611,7 @@ _swrast_texture_span( struct gl_context *ctx, SWspan *span ) * thread. */ swrast->TexelBuffer = - (GLfloat *) MALLOC(ctx->Const.MaxTextureImageUnits * maxThreads * + (GLfloat *) malloc(ctx->Const.MaxTextureImageUnits * maxThreads * SWRAST_MAX_WIDTH * 4 * sizeof(GLfloat)); if (!swrast->TexelBuffer) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "texture_combine"); diff --git a/mesalib/src/mesa/swrast/s_zoom.c b/mesalib/src/mesa/swrast/s_zoom.c index 768bbbafd..9304002d2 100644 --- a/mesalib/src/mesa/swrast/s_zoom.c +++ b/mesalib/src/mesa/swrast/s_zoom.c @@ -143,7 +143,7 @@ zoom_span( struct gl_context *ctx, GLint imgX, GLint imgY, const SWspan *span, if (!swrast->ZoomedArrays) { /* allocate on demand */ - swrast->ZoomedArrays = (SWspanarrays *) CALLOC(sizeof(SWspanarrays)); + swrast->ZoomedArrays = (SWspanarrays *) calloc(1, sizeof(SWspanarrays)); if (!swrast->ZoomedArrays) return; } -- cgit v1.2.3 From 67c4614f29188e4af86e1d88ee82759c896b70b5 Mon Sep 17 00:00:00 2001 From: marha Date: Tue, 4 Sep 2012 15:26:24 +0200 Subject: mesa git update 4 sep 2012 --- mesalib/src/mesa/swrast/s_aalinetemp.h | 2 +- mesalib/src/mesa/swrast/s_span.c | 4 ++-- mesalib/src/mesa/swrast/s_texfilter.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'mesalib/src/mesa/swrast') diff --git a/mesalib/src/mesa/swrast/s_aalinetemp.h b/mesalib/src/mesa/swrast/s_aalinetemp.h index a517fb697..6cfd3bc28 100644 --- a/mesalib/src/mesa/swrast/s_aalinetemp.h +++ b/mesalib/src/mesa/swrast/s_aalinetemp.h @@ -118,7 +118,7 @@ NAME(line)(struct gl_context *ctx, const SWvertex *v0, const SWvertex *v1) line.y1 = v1->attrib[FRAG_ATTRIB_WPOS][1]; line.dx = line.x1 - line.x0; line.dy = line.y1 - line.y0; - line.len = SQRTF(line.dx * line.dx + line.dy * line.dy); + line.len = sqrtf(line.dx * line.dx + line.dy * line.dy); line.halfWidth = 0.5F * CLAMP(ctx->Line.Width, ctx->Const.MinLineWidthAA, ctx->Const.MaxLineWidthAA); diff --git a/mesalib/src/mesa/swrast/s_span.c b/mesalib/src/mesa/swrast/s_span.c index ef51479fd..ff653a622 100644 --- a/mesalib/src/mesa/swrast/s_span.c +++ b/mesalib/src/mesa/swrast/s_span.c @@ -419,8 +419,8 @@ _swrast_compute_lambda(GLfloat dsdx, GLfloat dsdy, GLfloat dtdx, GLfloat dtdy, GLfloat dvdx = texH * ((t + dtdx) / (q + dqdx) - t * invQ); GLfloat dudy = texW * ((s + dsdy) / (q + dqdy) - s * invQ); GLfloat dvdy = texH * ((t + dtdy) / (q + dqdy) - t * invQ); - GLfloat x = SQRTF(dudx * dudx + dvdx * dvdx); - GLfloat y = SQRTF(dudy * dudy + dvdy * dvdy); + GLfloat x = sqrtf(dudx * dudx + dvdx * dvdx); + GLfloat y = sqrtf(dudy * dudy + dvdy * dvdy); GLfloat rho = MAX2(x, y); GLfloat lambda = LOG2(rho); return lambda; diff --git a/mesalib/src/mesa/swrast/s_texfilter.c b/mesalib/src/mesa/swrast/s_texfilter.c index d116a059d..152b1ff3e 100644 --- a/mesalib/src/mesa/swrast/s_texfilter.c +++ b/mesalib/src/mesa/swrast/s_texfilter.c @@ -1795,12 +1795,12 @@ sample_2d_footprint(struct gl_context *ctx, /* Calculate the per anisotropic sample offsets in s,t space. */ if (Px2 > Py2) { - numSamples = ceil(SQRTF(Px2)); + numSamples = ceil(sqrtf(Px2)); ds = ux / ((GLfloat) img->Width2); dt = vx / ((GLfloat) img->Height2); } else { - numSamples = ceil(SQRTF(Py2)); + numSamples = ceil(sqrtf(Py2)); ds = uy / ((GLfloat) img->Width2); dt = vy / ((GLfloat) img->Height2); } -- cgit v1.2.3