textures

Programmatically creating directx 11 textures, pros and cons of the three different methods

二次信任 提交于 2019-12-12 07:09:51
问题 The msdn documentation explains that in directx 11 there are multiple ways to fill a directx 11 texture programmatically: (1) Create the texture with default usage texture and initialize it with data from memory (2) Create the texture with dynamic usage, use DeviceContext Map to get a pointer to texture memory, write to it, then use Unmap to indicate you are done (at which point I guess it is copied to the gpu) (3) Create the texture with staging usage and follow same steps as for dynamic

SpriteKit texture not visible

本秂侑毒 提交于 2019-12-12 06:38:07
问题 I'm developing a game where there are characters with a number of animations, which play when the user uses the game controls for moving, fighting, etc. There is a normal state, i.e. when the user is not touching any control, the player's character's texture has been assigned to a Normal State or Resting State texture. If the user exercises these controls very quickly, then the player's character's texture disappears when he goes back to the Normal state. If any of the controls are used

JOGL Texture disappears on mac osx

浪尽此生 提交于 2019-12-12 05:48:16
问题 I have done some research and cant find anyone that have the same experience of this problem. I would appreciate if someone just can confirm that they can draw textures with eclipse and jogl running a macbook pro with JRE1.8. Or does someone else experience same problems? Texture disappears on osx - GL_TEXTURE_2D JOGL Eclipse java 回答1: jmaasing (a JogAmp user) uses Oracle Java 1.8 with JOGL 2.2.4 daily on a Mac Book Pro, he ran my first person shooter at least once and he didn't reproduce

Different size of Buffers for Vertex and Texture Coordinates?

南楼画角 提交于 2019-12-12 05:34:20
问题 Is there any way to use differently sized buffers for glDrawElements? I somehow want to map vertices to texture coordinates, so that the texture coordinate buffer is able to be actually smaller than the vertex buffer. Example: vertex buffer has 16 vertices and the texture coordinate buffer has 6 vertices. vertex_buffer[0] -> texture_coordinates_buffer[0] vertex_buffer[1] -> texture_coordinates_buffer[1] vertex_buffer[2] -> texture_coordinates_buffer[2] vertex_buffer[3] -> texture_coordinates

How to create diagonal stripe patterns and checkerboard patterns?

随声附和 提交于 2019-12-12 05:29:37
问题 Based on this question, I can confirm that horizontal patterns can be imposed onto a matrix (which in this case is an image), by multiplying it with a modulation signal created with this: vModulationSignal = 1 + (0.5 * cos(2 * pi * (signalFreq / numRows) * [0:(numRows - 1)].')); It would also be great if someone could explain to why the above modulation signal works. Now I want to create diagonal patterns such as : And criss-cross (checkered) patterns such as this: using a similar

How to load devIL image from raw data

爱⌒轻易说出口 提交于 2019-12-12 04:56:56
问题 I would like to create devIL image from raw texture data, but I can't seem to find a way to do it. The proper way seems to be ilLoadL with IL_RAW, but I can't get it to work. The documentation in here says that that there should be 13-byte header in the data, so i just put meaningless data there. If I put 0 to "size" parameter of ilLoadL, I'll get black texture, no matter what. Otherwise my program refuses to draw anything. ilIsImage returns true, and I can create openGL texture from it just

THREE.js - Cannot load texture locally in Chrome Browser in Android device

三世轮回 提交于 2019-12-12 04:53:04
问题 I have been trying to load textures for a WebGL application in a Chrome browser in an Android device I came across a similar post THREE.js - Can't load texture locally where a solution to load textures is given for Chrome which works only on a PC/laptop device The flag --allow-file-access-from-files works on a laptop device as I can use the command line but how to do it on a mobile device? Can someone please help with this? 回答1: The Crosswalk projects embeds a Chromium webview and, by

Incorrect reading from DataTextures in shader

一笑奈何 提交于 2019-12-12 04:47:11
问题 I have a program that works great when my POT DataTextures are 1:1 (width:height) in their texel dimensions, however when they are 2:1 or 1:2 in texel dimensions it appears that the texels are being incorrectly read and applied. I'm using continuous indexes (1,2,3,4,5...) to access the texels using the two functions below. I'm wondering if there is something wrong with how I am accessing the texel data, or perhaps if my use of a Float32Array for the integer indexes needs to be switched to a

Barycentric coordinates texture mapping

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 04:33:46
问题 I want to map textures with correct perspective for 3D rendering. I am using barycentric coordinates to locate points on the faces of triangles. Simple affine transformation gave me that standard, weird looking result. This is what I did to correct my perspective, but it seems to have only made the distortion greater: three triangle vertices v1 v2 v3 vertex coordinates are v_.x v_.y v_.z texture coordinates are v_.u v_.v barycentric coordinates corresponding to vertices are b1 b2 b3 I am

Qt iOS: how to return QVideoFrame with type GLTextureHandle from QVideoFilterRunnable

佐手、 提交于 2019-12-12 03:55:17
问题 I'm trying to capture camera output frame and process it further in GPU pipeline. For this reason returing frame as a GPU texture is the best option. After inheriting from QVideoFilterRunnable class received by run method QVideoFrame objects has type which is not equal to QAbstractVideoBuffer::GLTextureHandle. It's equal to NoHandle and I need to do map/unmap and load texture manually by glTexImage , which is not good for performance. Is there any control options that can be used to return