textures

Sharp edged sprites

时间秒杀一切 提交于 2020-01-16 18:41:27
问题 Im new to cocos2D and I would like to draw as I tried using CCSprite and also tired to resolve it using [brush setBlendFunc:(ccBlendFunc){GL_ONE, GL_ONE_MINUS_SRC_ALPHA}]; [brush.texture setAliasTexParameters]; But I got only image as in which the edges are blunt/blur. How I can make the blur edged images as sharp as the first one? Can someone suggest me the right way?? The code I use to generate the above image is brush = [CCSprite spriteWithFile:@"sketch.png"]; [brush setColor:ccc3(0, 0, 0)

libgdx changing the texture on a pre textured model

心已入冬 提交于 2020-01-16 03:27:25
问题 I've exported a model from blender but I want some instances to use a different texture if (x % 2 == 0) { shipInstance.materials.clear(); shipInstance.materials.add(new Material()); shipInstance.materials.get(0).set(new TextureAttribute(TextureAttribute.Diffuse, enemyTexture)); unfortunately doesn't work! In a similar way I want to be able to change things like shininess and smoothing (I'm guessing you can change things like this that are using the default shader?) I've also (later) tried

DirectX11 Render CameraStream to Texture - Device::CreateShaderResourceView fails

眉间皱痕 提交于 2020-01-15 23:35:55
问题 [Prologue] I am gonna try to render a Video stream from IDS uEye Cameras to DirectX Scene. The camera's colormode is currently set to IS_CM_RGBA8_PACKED . For now, I just capture a single Picture from the cam, freeze it to a char* cameraBufferLeft_ and try to use this as a ShaderResourceView (which should replace a previously used .dds File). Previously, I had Problems on CreateTexture2D function aswell, because the camera mode was set to IS_CM_RGB8_PACKED , which means there was no Alpha

Split parameter in a texture atlas file?

纵饮孤独 提交于 2020-01-15 08:00:27
问题 How exactly works the split parameter in a skin.atlas file. Libgdx texture packer creates these from 9-patches I believe. I need to manually add these sometimes (when using the texturepacker in the linked tag or when manually inserting/editing a texture) and cant seem to figure it out how they exactly work. Sometimes a single pixel makes my elements disappear or does not fill the split. Here is a example files: roundtext138.png format: RGBA8888 filter: Nearest,Nearest repeat: none button

opengl - framebuffer texture clipped smaller than I set it?

谁说我不能喝 提交于 2020-01-15 03:40:12
问题 I'm using opengl ES 2.0 I'm using a framebuffer linked to a texture to compile an offscreen render (of some simplistic metaballs), and then I'm rendering that texture to the main back buffer. Everything is looking great except that the texture appears clipped, ie. it is not the full window dimensions (short of about 128 pixels on one axis). Here's a screenshot: http://tinypic.com/r/9telwg/7 Any ideas what could cause this? I read here to set glViewport to the size of the texture, but that

android bitmap pixel format for glTexImage2D

妖精的绣舞 提交于 2020-01-14 14:49:07
问题 I'm trying to load textures to use with NDK OpenGL from Java with the Bitmap class. It works, but I'm having problems with the pixel format. First, in Java, I load a bitmap from the assets folder like this: Bitmap bitmap = BitmapFactory.decodeStream(amgr.open(path)); return bitmap.copy(Bitmap.Config.ARGB_8888, false); the bitmap config does not have an option for RGBA channel order. [JNI things happen here] Using GLES 1, I then buffer the texture like so: glTexImage2D(GL_TEXTURE_2D, 0, GL

android bitmap pixel format for glTexImage2D

倖福魔咒の 提交于 2020-01-14 14:49:06
问题 I'm trying to load textures to use with NDK OpenGL from Java with the Bitmap class. It works, but I'm having problems with the pixel format. First, in Java, I load a bitmap from the assets folder like this: Bitmap bitmap = BitmapFactory.decodeStream(amgr.open(path)); return bitmap.copy(Bitmap.Config.ARGB_8888, false); the bitmap config does not have an option for RGBA channel order. [JNI things happen here] Using GLES 1, I then buffer the texture like so: glTexImage2D(GL_TEXTURE_2D, 0, GL

Loading Textures in Directx

雨燕双飞 提交于 2020-01-14 06:11:01
问题 Im Trying to load textures in directx to draw a textured quad. but the D3DXCreateTextureFromFile never returns D3D_OK .... here is my code to load the texture.... FeralTexture(string Name,FeralVector2 Position,IDirect3DDevice9 *device) { FileName = Name; m_pDevice = device; x= Position.x; y= Position.y; if(D3DXCreateTextureFromFile(m_pDevice,FileName.c_str(),&m_pTextureFile) != D3D_OK) { TextureCreated = false; m_pTextureFile = NULL; D3DXCreateTextureFromFile(m_pDevice,FileName.c_str(),&m

Loading Textures in Directx

给你一囗甜甜゛ 提交于 2020-01-14 06:10:33
问题 Im Trying to load textures in directx to draw a textured quad. but the D3DXCreateTextureFromFile never returns D3D_OK .... here is my code to load the texture.... FeralTexture(string Name,FeralVector2 Position,IDirect3DDevice9 *device) { FileName = Name; m_pDevice = device; x= Position.x; y= Position.y; if(D3DXCreateTextureFromFile(m_pDevice,FileName.c_str(),&m_pTextureFile) != D3D_OK) { TextureCreated = false; m_pTextureFile = NULL; D3DXCreateTextureFromFile(m_pDevice,FileName.c_str(),&m

Calling Resources.Load on a texture is not working

本小妞迷上赌 提交于 2020-01-13 20:43:27
问题 I'm trying to load a Texture from the Resources folder but it keeps on returning null . t = (Texture)Resources.Load("Circle") as Texture; The circle texture has an extension of .tga . 回答1: You must put Circle.tga in Assets/Resources folder. Plus if you have subfolder, for example Resources/Textures/Circle.tga then do like this: Texture t = Resources.Load("Textures/Circle") as Texture; 回答2: The extension of the file isn't necessary. So this is correct: t = (Texture)Resources.Load("Circle") as