texture

Problems to understand DXGI DirectX 11 Desktop Duplication to get a Buffer or Array

匿名 (未验证) 提交于 2019-12-03 01:36:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to understand DXGI Desktop Duplication. I have read a lot and this is the code I copied from parts of the DesktopDuplication sample on the Microsoft Website. My plan is to get the Buffer or Array from the DesktopImage because I want to make a new Texture for an other program. I hope somebody can explain me what I can do to get it. void DesktopDublication::GetFrame(_Out_ FRAME_DATA* Data, _Out_ bool* Timeout) { IDXGIResource* DesktopResource = nullptr; DXGI_OUTDUPL_FRAME_INFO FrameInfo; // Get new frame HRESULT hr = m_DeskDupl-

解决 白鹭引擎 egret 龙骨动画 Deprecated 已废弃

余生颓废 提交于 2019-12-03 01:36:01
官方文档中龙骨动画的调用方法和事件监听方法,在实际项目中都会提示已废弃,在网上也没找到一个讨论和解决这个问题的帖子,就自己去摸索了一下,下面贴出解决方法。 这是网上找到的比较常见的写法: private createGameScene(): void { var dragonbonesData = RES.getRes( "RobotGame_1_json" ); var textureData = RES.getRes( "texture_json" ); var texture = RES.getRes( "texture_png" ); var dragonbonesFactory:dragonBones.EgretFactory = new dragonBones.EgretFactory(); dragonbonesFactory.addDragonBonesData( dragonBones.DataParser.parseDragonBonesData (dragonbonesData)); dragonbonesFactory.addTextureAtlas( new dragonBones.EgretTextureAtlas (texture,textureData)); var armature: dragonBones.Armature =

Map texture over a mesh with Mayavi

匿名 (未验证) 提交于 2019-12-03 01:34:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I am trying to plot Earth in 3D using python. I made a script from what I found on the internet and using Mayavi I successfully plotted a mesh but I would like to apply a texture from an image ( a blue marble from NASA ). However when I try to do so, the texture only apply on one half of the ellipsoid and si symmetrically duplicated on the other half. Here pictures of my result: Earth 3D (imgur gallery) And my code: import numpy as np import vtk from mayavi import mlab image_file = 'earth_texture.jpg' ; erad = 6371008.7714 #

Blender 2.5 Python animated world texture setup

匿名 (未验证) 提交于 2019-12-03 01:34:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I need to set up an animated (i.e. from video file) world texture in blender 2.58 using python. I make a texture like this: import bpy # create new clouds texture bpy.ops.texture.new() wtex = bpy.data.textures[-1] # set World texture wrld = bpy.data.worlds['World'] slot = wrld.texture_slots.add() slot.texture = wtex slot.use_map_horizon = True This creates a new CloudsTexture and binds it to slot. How can I make an ImageTexture and set it up to have a video as a source? Or, how can I specify the type of a new texture made by bpy.ops.texture

libgdx open gles 2.0 stencil alpha masking

匿名 (未验证) 提交于 2019-12-03 01:26:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm looking for a solution to implement alpha masking with stencil buffer in libgdx with open gles 2.0. I have managed to implement simple alpha masking with stencil buffer and shaders, where if alpha channel of fragment is greater then some specified value it gets discarted. That works fine. The problem is when I want to use some gradient image mask, or fethered png mask, I don't get what I wanned (I get "filled" rectangle mask with no alpha channel), instead I want smooth fade out mask. I know that the problem is that in stencil

Uv-Coordinates: Theoretical questions

匿名 (未验证) 提交于 2019-12-03 01:26:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: In my previouse question I had some problems regarding texturing in OpenGL ES 2.0. With some help this problem is solved now, but some related questions have appeared: How do I know wheather uv-coordinate and vertex-coordinates fit together? I thought there is a bijection between the vertex and uv, for example (0,0) of vertex to (0,0) of uv, and (width,0) of vertex to (1,0), and (0,height) of vertex to (0,1) of uv. But since the texture appears flipped in my example, the thought might be wrong? How can I know the second param of

syntax error: insert } to complete ClassBody

匿名 (未验证) 提交于 2019-12-03 01:26:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I created a method and keep getting an error that I need to include a } at the end of my method. I put the } in and the error is still there! If I then delete that } the same error will pop up on a prior method; and that error wasn't there before. in other words, if i type the } on my most recent method then the error stays there and only there. if i delete it, it duplicates that error on my prior method. private void putThreeBeepers() { for (int i = 0; i 回答1: You really want to go to the top of your file and do proper and consistent

JOGL white texture?

匿名 (未验证) 提交于 2019-12-03 01:23:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to load earth.png and place it over a triangle. The image is 256x256. I have followed an online tutorial and played around with this for hours, but the triangle still remains white. Can any one point me in the right direction. import java.awt.Frame; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.io.IOException; import java.io.InputStream; import javax.media.opengl.*; import javax.media.opengl.awt.GLCanvas; import com.jogamp.opengl.util.texture.Texture; import com.jogamp.opengl.util.texture

Sprite/Texture Atlas: GDI+ Bitmap.MakeTransparent for color-key with OpenTK

匿名 (未验证) 提交于 2019-12-03 01:23:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I am writing a support class for sprite/texture atlas functionality, using C# with OpenTK. Most functionality is working fine thus far (simple 2D tiles on an orthographic view). My problem relates to unexpected display results when calling the GDI+ Bitmap.MakeTransparent() method to set a color (Magenta / 0xFFFF00FF) for use as a color-key. It would seem that I am using incorrect pixel format parameters for the bitmap.LockBits() and GL.TexImage2D() calls. My code was based on examples which indeed worked, but which had in common

Can I avoid texture gradient calculations in webgl?

匿名 (未验证) 提交于 2019-12-03 01:22:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: We have a webgl/three.js application that makes extensive use of texture buffers for passing data between passes and for storing arrays of data. None of these has any use for mipmaps. We are easily able to prevent mipmap generation: at the three.js level we set min and mag filters to NearestFilter, and set generateMipmaps false. However, the shaders do not know at compile time that there is no mipmapping. When compiled using ANGLE we get a lot of warning messages: warning X4121: gradient-based operations must be moved out of flow control to