this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Moved texture dimensions and has_mipmap into base image storage.

+18 -24
-2
SDL_gpu/GLES_1/SDL_gpu_GLES_1.h
··· 62 62 { 63 63 Uint32 handle; 64 64 Uint32 format; 65 - Uint8 has_mipmaps; 66 - Uint32 tex_w, tex_h; // For power-of-two support 67 65 } ImageData_GLES_1; 68 66 69 67 typedef struct TargetData_GLES_1
-2
SDL_gpu/GLES_2/SDL_gpu_GLES_2.h
··· 43 43 { 44 44 Uint32 handle; 45 45 Uint32 format; 46 - Uint8 has_mipmaps; 47 - Uint32 tex_w, tex_h; // For power-of-two support 48 46 } ImageData_GLES_2; 49 47 50 48 typedef struct TargetData_GLES_2
+15 -14
SDL_gpu/GL_common/SDL_gpu_GL_common.inl
··· 1271 1271 result->target = NULL; 1272 1272 result->renderer = renderer; 1273 1273 result->channels = channels; 1274 + result->has_mipmaps = 0; 1275 + 1274 1276 SDL_Color white = {255, 255, 255, 255}; 1275 1277 result->color = white; 1276 1278 result->use_blending = (channels > 3? 1 : 0); ··· 1281 1283 result->refcount = 1; 1282 1284 data->handle = handle; 1283 1285 data->format = format; 1284 - data->has_mipmaps = 0; 1285 1286 1286 1287 result->w = w; 1287 1288 result->h = h; 1288 1289 // POT textures will change this later 1289 - data->tex_w = w; 1290 - data->tex_h = h; 1290 + result->texture_w = w; 1291 + result->texture_h = h; 1291 1292 1292 1293 return result; 1293 1294 } ··· 1327 1328 glTexImage2D(GL_TEXTURE_2D, 0, internal_format, w, h, 0, 1328 1329 internal_format, GL_UNSIGNED_BYTE, NULL); 1329 1330 // Tell SDL_gpu what we got. 1330 - ((IMAGE_DATA*)(result->data))->tex_w = w; 1331 - ((IMAGE_DATA*)(result->data))->tex_h = h; 1331 + result->texture_w = w; 1332 + result->texture_h = h; 1332 1333 1333 1334 return result; 1334 1335 } ··· 1965 1966 original_format, GL_UNSIGNED_BYTE, newSurface->pixels); 1966 1967 1967 1968 // Tell everyone what we did. 1968 - ((IMAGE_DATA*)(image->data))->tex_w = w; 1969 - ((IMAGE_DATA*)(image->data))->tex_h = h; 1969 + image->texture_w = w; 1970 + image->texture_h = h; 1970 1971 } 1971 1972 1972 1973 // Delete temporary surface ··· 2384 2385 prepareToRenderToTarget(renderer, dest); 2385 2386 prepareToRenderImage(renderer, dest, src); 2386 2387 2387 - Uint16 tex_w = ((IMAGE_DATA*)src->data)->tex_w; 2388 - Uint16 tex_h = ((IMAGE_DATA*)src->data)->tex_h; 2388 + Uint16 tex_w = src->texture_w; 2389 + Uint16 tex_h = src->texture_h; 2389 2390 2390 2391 float x1, y1, x2, y2; 2391 2392 float dx1, dy1, dx2, dy2; ··· 2556 2557 prepareToRenderToTarget(renderer, dest); 2557 2558 prepareToRenderImage(renderer, dest, src); 2558 2559 2559 - Uint16 tex_w = ((IMAGE_DATA*)src->data)->tex_w; 2560 - Uint16 tex_h = ((IMAGE_DATA*)src->data)->tex_h; 2560 + Uint16 tex_w = src->texture_w; 2561 + Uint16 tex_h = src->texture_h; 2561 2562 2562 2563 float x1, y1, x2, y2; 2563 2564 /* ··· 3178 3179 renderer->FlushBlitBuffer(renderer); 3179 3180 bindTexture(renderer, image); 3180 3181 glGenerateMipmap(GL_TEXTURE_2D); 3181 - ((IMAGE_DATA*)image->data)->has_mipmaps = 1; 3182 + image->has_mipmaps = 1; 3182 3183 3183 3184 GLint filter; 3184 3185 glGetTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, &filter); ··· 3277 3278 3278 3279 if(filter == GPU_LINEAR) 3279 3280 { 3280 - if(((IMAGE_DATA*)image->data)->has_mipmaps) 3281 + if(image->has_mipmaps) 3281 3282 minFilter = GL_LINEAR_MIPMAP_NEAREST; 3282 3283 else 3283 3284 minFilter = GL_LINEAR; ··· 3286 3287 } 3287 3288 else if(filter == GPU_LINEAR_MIPMAP) 3288 3289 { 3289 - if(((IMAGE_DATA*)image->data)->has_mipmaps) 3290 + if(image->has_mipmaps) 3290 3291 minFilter = GL_LINEAR_MIPMAP_LINEAR; 3291 3292 else 3292 3293 minFilter = GL_LINEAR;
-2
SDL_gpu/OpenGL_1/SDL_gpu_OpenGL_1.h
··· 51 51 { 52 52 Uint32 handle; 53 53 Uint32 format; 54 - Uint8 has_mipmaps; 55 - Uint32 tex_w, tex_h; // For power-of-two support 56 54 } ImageData_OpenGL_1; 57 55 58 56 typedef struct TargetData_OpenGL_1
-2
SDL_gpu/OpenGL_2/SDL_gpu_OpenGL_2.h
··· 51 51 { 52 52 Uint32 handle; 53 53 Uint32 format; 54 - Uint8 has_mipmaps; 55 - Uint32 tex_w, tex_h; // For power-of-two support 56 54 } ImageData_OpenGL_2; 57 55 58 56 typedef struct TargetData_OpenGL_2
-2
SDL_gpu/OpenGL_3/SDL_gpu_OpenGL_3.h
··· 51 51 { 52 52 Uint32 handle; 53 53 Uint32 format; 54 - Uint8 has_mipmaps; 55 - Uint32 tex_w, tex_h; // For power-of-two support 56 54 } ImageData_OpenGL_3; 57 55 58 56 typedef struct TargetData_OpenGL_3
+3
SDL_gpu/SDL_gpu.h
··· 100 100 GPU_Target* target; 101 101 Uint16 w, h; 102 102 int channels; 103 + Uint32 texture_w, texture_h; // Underlying texture dimensions 104 + Uint8 has_mipmaps; 105 + 103 106 SDL_Color color; 104 107 Uint8 use_blending; 105 108 GPU_BlendEnum blend_mode;