mipmaps

Which memory barrier does glGenerateMipmap require?

妖精的绣舞 提交于 2019-12-08 17:12:20
问题 I've written to the first mipmap level of a texture using GL_ARB_shader_image_load_store. The documentation states that I need to call glMemoryBarrier before I use the contents of this image in other operations, in order to flush the caches appropriately. For instance, before I do a glTexSubImage2D operation, I need to issue GL_TEXTURE_UPDATE_BARRIER_BIT​, and before I issue a draw call using a shader that samples that texture, I need to issue GL_TEXTURE_FETCH_BARRIER_BIT​. However, which

Android Mipmap?

风格不统一 提交于 2019-12-08 16:12:43
问题 Whenever I try to generate a new Android project with AndroidStudio, it keeps hiding the folder "drawables". This has never happened to me before. I've been looking around and I've realized its been generating this folder called "mipmap". I searched around a little bit and I've found this is similar to drawables, but was this some big change in the new AndroidStudio release I missed?? If not how can I get my Drawables folder back? I've tried rebuilding my project, creating new projects and

Android studio mipmap and 9-patch drawables

喜你入骨 提交于 2019-12-08 00:52:05
问题 I am facing strange issue trying to put 9 patch drawables into new android studio mipmap directories. I've put all the images to specified folders, just as I used to do with drawable, but when I try to include it in a project it says Cannot resolve symbol @mipmap/myfile but it definitely "finds" it as you can see at the screenshot. I think it cannot resolve the symbol because the "real" filename has .9, but dots cannot be used in defining drawable. ( I tried, it didn't work :) ) Is someone

Android App Icon size too small

本秂侑毒 提交于 2019-12-07 15:48:42
问题 I am working on a test android app. The problem I am having is that the app icon is very very small. I have added different sizes in different mipmap folder but the size is still the same = very tiny. I have tried to add large size in all of the folders but it didn't work either. How to fix this? 回答1: Do you use the correct icon size? Launcher icons (.Png) 48 × 48 (mdpi) 72 × 72 (hdpi) 96 × 96 (xhdpi) 144 × 144 (xxhdpi) 192 × 192 (xxxhdpi) 512 × 512 (Google Play store) You could use Android

Mipmapping in OpenGL

戏子无情 提交于 2019-12-06 09:21:58
I'm having a lot of trouble getting mipmaps to work. I'm using OpenGL 1.1, and I don't have glu, so I'm using the following texture initiation code: glGenTextures(1,&texname); glBindTexture(GL_TEXTURE_2D,texname); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_REPEAT); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_REPEAT); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST_MIPMAP_NEAREST); w=width;h=height; for(int i=0;i<mipmaps;i++,w/=2,h/=2) glTexImage2D(GL_TEXTURE_2D,i,GL_RGBA8,w,h,0,GL_RGBA,GL_UNSIGNED

Android studio mipmap and 9-patch drawables

二次信任 提交于 2019-12-06 04:34:06
I am facing strange issue trying to put 9 patch drawables into new android studio mipmap directories. I've put all the images to specified folders, just as I used to do with drawable, but when I try to include it in a project it says Cannot resolve symbol @mipmap/myfile but it definitely "finds" it as you can see at the screenshot. I think it cannot resolve the symbol because the "real" filename has .9, but dots cannot be used in defining drawable. ( I tried, it didn't work :) ) Is someone esle is facing same problem? Currently, I've added the drawables folders and defined everything eclipse

glTexImage2D vs. gluBuild2DMipmaps

橙三吉。 提交于 2019-12-06 00:29:17
Very basic OpenGL texture creation code: int width, height; BYTE * data; FILE * file; // open texture data file = fopen( filename, "rb" ); if ( file == NULL ) return 0; // allocate buffer width = 256; height = 256; data =(BYTE*) malloc( width * height * 3 ); // read texture data fread( data, width * height * 3, 1, file ); fclose( file ); glGenTextures( 1, &texture ); glBindTexture( GL_TEXTURE_2D, texture ); //gluBuild2DMipmaps( GL_TEXTURE_2D, 3, width, height, GL_RGB, GL_UNSIGNED_BYTE, data ); glTexImage2D( GL_TEXTURE_2D,0, GL_RGB, width, height,0, GL_RGB, GL_UNSIGNED_BYTE, data ); free( data

Manual selection lod of mipmaps in a fragment shader using three.js

戏子无情 提交于 2019-12-05 14:29:50
I'm writing a physically based shader using glsl es in three.js. For the addition of specular global illumination I use a cubemap dds texture with mipmap chain inside (precalculate with CubeMapGen as it's explained here ). I need to access this texture in fragment shader and I would like to select manually the index of mipmap. The correct function for doing this is vec4 textureCubeLod(samplerCube sampler, vec3 coord, float lod) but it's available only in vertex shader. In my fragment shader I'm using the similar function vec4 textureCube(samplerCube sampler, vec3 coord, float bias) but it

Unable to use android:icon=“@mipmap/ic_launcher” in Manifest after play services 7.5.0

核能气质少年 提交于 2019-12-05 03:37:39
I have recently update play services using dependencies compile 'com.google.android.gms:play-services:7.5.0' My app icon launcher is in @mipmap/ic_launcher" but this is showing error in AndroidManifest.xml . Should i again place this icon in drawable or else ? Help me to find out the solution. UPDATE: Here is Messages from Android studio Error:(17, 9) Execution failed for task ':app:processDebugManifest'. > Manifest merger failed : Attribute application@icon value=(@mipmap/ic_launcher) from AndroidManifest.xml:17:9 is also present at com.pnikosis:materialish-progress:1.0:13:9 value=(@drawable

Android launcher icon still showing default in Android oreo

馋奶兔 提交于 2019-12-04 19:08:12
问题 I Changed my application launcher icon using android studio 3.0.1 File -> Image Asset In Android version 8.1 icon looks like below image my AndroidManifest details <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:hardwareAccelerated="true" android:supportsRtl="true" android:theme="@style/AppTheme"> I double checked the icons. ic_launcher and ic_launcher_round are my new icons Every