textures

Can't use glGetTexImage to read a depth map texture

霸气de小男生 提交于 2021-02-11 15:14:43
问题 I've successfully created a frame buffer object and created a texture containing the depth map of my scene. I know I'm doing this correctly since I apply my texture to a rectangle and it looks just fine : Now I'd like to read the values from the texture I've created in my main program and not inside the shaders. Looking into it I found out about two functions, namely: glGetTexImage() and glReadPixels(). Since I'm quite new to openGL, the documentation about these brings more questions than

Adding local assets keeps loading forever in spark ar tool

人走茶凉 提交于 2021-02-11 07:02:36
问题 Whenever I try to load any local asset to my project, it just keeps loading forever and neither loads nor the uploading stops and if I try to do anything else on top of it, the application hangs. This is happening everytime and I have to manually close application and try again yet for the same result. Can anyone help me fix this? 回答1: I found the issue. I was doing dragging and dropping of the headOccluder.obj directly onto the face tracker. So It was taking so much time. I followed that

Adding local assets keeps loading forever in spark ar tool

强颜欢笑 提交于 2021-02-11 07:01:41
问题 Whenever I try to load any local asset to my project, it just keeps loading forever and neither loads nor the uploading stops and if I try to do anything else on top of it, the application hangs. This is happening everytime and I have to manually close application and try again yet for the same result. Can anyone help me fix this? 回答1: I found the issue. I was doing dragging and dropping of the headOccluder.obj directly onto the face tracker. So It was taking so much time. I followed that

Failing to properly initialize a 2D texture from memory in Direct3D 11

白昼怎懂夜的黑 提交于 2021-02-10 15:28:13
问题 I am trying to produce a simple array in system memory that represent a R8G8B8A8 texture and than transfer that texture to the GPU memory. First, I allocate an array and fill it with the desired green color data: frame.width = 3; frame.height = 1; auto components = 4; auto length = components * frame.width * frame.height; frame.data = new uint8_t[length]; frame.data[0 + 0 * frame.width] = 0; frame.data[1 + 0 * frame.width] = 255; frame.data[2 + 0 * frame.width] = 0; frame.data[3 + 0 * frame

LWJGL texture rendering/indexing

三世轮回 提交于 2021-02-10 06:46:27
问题 I am currently having issues with trying to render two textures onto two totally separate objects through a single vertex, and fragment shader. The issue seems to lie in trying to index, and bind the two textures onto their own objects. In trying to index and bind the textures, the smaller index will always appear onto both objects. Can someone help me, or at least push me into the right direction? here is my code for the main class, the renderer, and the fragment shader. (feel free to

How to generate texture mapping images?

那年仲夏 提交于 2021-02-07 14:33:24
问题 I want to put/wrap images to 3D objects. To keep things simple and fast, instead of using(and learning) a 3D library I want to use mapping images. Mapping images are used in such a way: So you generate the mapping images once for each object and use the same mapping for all images you want to wrap. My question is how can I generate such mapping images (given the 3D model)? Since I don't know about the terminology my searches failed me. Sorry if I am using the wrong jargon. Below you can see a

How to generate texture mapping images?

有些话、适合烂在心里 提交于 2021-02-07 14:32:38
问题 I want to put/wrap images to 3D objects. To keep things simple and fast, instead of using(and learning) a 3D library I want to use mapping images. Mapping images are used in such a way: So you generate the mapping images once for each object and use the same mapping for all images you want to wrap. My question is how can I generate such mapping images (given the 3D model)? Since I don't know about the terminology my searches failed me. Sorry if I am using the wrong jargon. Below you can see a

rendering video on a texture in LibGDX

本秂侑毒 提交于 2021-02-07 13:39:14
问题 i am new to LibGDX i'm building a game and i have an animated background that has about 10 seconds of animation (250 frames aprox.) since it's useless to try and build a sprite sheet for this (large background of course) is there a way to render video files are png sequence to a texture so i can have my animated background drawn in the game? 回答1: There is now an extension for video playback gdx-video. 回答2: If your idea is to put a texture on background and render the image and timely replace

rendering video on a texture in LibGDX

雨燕双飞 提交于 2021-02-07 13:38:36
问题 i am new to LibGDX i'm building a game and i have an animated background that has about 10 seconds of animation (250 frames aprox.) since it's useless to try and build a sprite sheet for this (large background of course) is there a way to render video files are png sequence to a texture so i can have my animated background drawn in the game? 回答1: There is now an extension for video playback gdx-video. 回答2: If your idea is to put a texture on background and render the image and timely replace

OpenGL texture rendering does not match original

允我心安 提交于 2021-02-05 09:16:26
问题 I am trying to render a texture with OpenGL. The texture I am using as a test is a bunch of black rectangles on a white background, as follows: However, when rendering, the texture seem to be duplicated and overlayed multiple times on top of itself: I set the scene up using: std::string vertexSource = ShaderLoader::load("vertexSource.vert"); const char* vsource = vertexSource.c_str(); std::string fragmentSource = ShaderLoader::load("fragmentSource.frag"); const char* fsource = fragmentSource