Questions tagged [glteximage2d]

72 questions
2
votes
1 answer

glTexImage2D failing in GLUT/FreeType example with OpenGL 3 and above

I'm using the example found here: http://en.wikibooks.org/wiki/OpenGL_Programming/Modern_OpenGL_Tutorial_Text_Rendering_01 The issue is that when I specify an OpenGL context with a version above 3, ie: glutInitContextVersion (3, 2); Calling…
Andrew Klein
  • 23
  • 1
  • 3
1
vote
1 answer

OpenGL error 'invalid value' when calling glTexSubImage2D

I have a small application that I'm using for testing that is doing some post processing effects. My goal is to read the pixels using double PBO's and then render the pixels to a full screen texture quad and modify/add my effects in a fragment…
Fajak
  • 51
  • 1
  • 6
1
vote
2 answers

glGetTexImage doesn't work with CVOpenGLTextureRef

I'm writing an app for Mac OS X with OpenGL 2.1 I have a CVOpenGLTextureRef which holds the texture that I render with GL_QUADS and everything works fine. I now need to determine which pixels of the texture are black, therefore I have written this…
Andrea3000
  • 1,018
  • 1
  • 11
  • 26
1
vote
1 answer

glTexSubImage2d not working after adding in a particle system (with textures on each particle)

We were happily using glTexSubImage2d to update a texture every few frames which had been initialised with glTexImage2d in our GL initialisation. After adding in a particle system with each particle textured itself our quad showing the…
Infiniti Fizz
  • 1,726
  • 4
  • 24
  • 40
1
vote
1 answer

Why is OPENGL missing 16-bit RGB format that is unsigned?

I have been using a 16-bit monochrome texture using the GL_R16 format. This works just fine. I am now in need of a 3-channel 16-bit texture. When examining the manpage glTexStorage2D though, I see that there seems to be a gap in functionality. One…
Bram
  • 7,440
  • 3
  • 52
  • 94
1
vote
1 answer

Sampling integer texture in WebGL returns weird values

I'm trying to render an grayscale image from a 16-bit array buffer in WebGL2, by applying window leveling in the fragment shader. I'v generated the texture as below: let typedArray = new Int16Array(data); gl.texImage2D( gl.TEXTURE_2D, …
1
vote
1 answer

TextureArray with image2D/Computeshader

I am currently trying to bind multiple Textures to a Computeshader. Because there is only a small limited amount of image unites available, I thought of binding a TextureArray with the advantage of doing less bindings with more Textures. As far as I…
Blank
  • 57
  • 8
1
vote
1 answer

OpenGL on iOS. Can glTexImage2D be called on a separate thread?

On iOS I have always assume that it is not possible to do OpenGL texture creation - glTexImage2D - on a separate thread via an NSOperation subclass. Can someone please confirm/deny. Since texture creation potentially hang the GUI - bad! - has anyone…
dugla
  • 12,774
  • 26
  • 88
  • 136
1
vote
1 answer

Getting the 'red' pixel value of the texture drawn using gl.texImage2D

I am sending a Float32array to my fragment shader using texture ( the goal here is to sent a data to the shader using textures, process this data in the shader then send it back to javascript). Since my data is not actually an image, I decided to…
Kivanc Y.
  • 23
  • 3
1
vote
1 answer

Generating and updating 8-bit gray-scale texture in OpenGL ES 2.0

For an OpenGL texture cache I need to initialize a large (≥ 2048x2048) texture and then frequently update little sections of it. The following (pseudo-)code works: // Setup texture int[] buffer = new int[2048*2048 / 4]; // Generate dummy buffer with…
Markus A.
  • 12,349
  • 8
  • 52
  • 116
1
vote
0 answers

OpenGL python glTextImage2D crash by Bus error

In my current python based OpenGL project I need to create a 2d texture by using glTexImage2d. Doing this I run into trouble when the texture width/height is greater than 888x888. # crashes _sometimes_ when self._w * self._h >…
Nicolas Heimann
  • 2,561
  • 16
  • 27
1
vote
0 answers

FreeType 2 with OpenGL

I trying to use FreeType2 with OpenGL and I can only write the spanish interogation mark when I write something. Here is the loop where I load all the glyphs : for(uint i = ' '; i <= '~'; i++) { FT_Glyph glyph; u32 index =…
zonn
  • 115
  • 7
1
vote
0 answers

OpenGL - Rendering texture, color glitch

I'm trying render video as texture using xuggle, but i have some troubles... Here's my code: ByteBuffer last = ent.oneBuffer; if (ent.bufList.get(0) != null){ last =…
Draiget
  • 113
  • 11
1
vote
0 answers

glTexImage2D giving GL_INVALID_VALUE because width or height cannot be represented as 2k + 2

I have a screenshot taken from the first opengl canvas which i need to draw in the second opengl canvas. I have taken the screenshot using glReadPixels: glReadPixels(posx, posy, pageWidth , pageHeight, GL_RGB, GL_UNSIGNED_BYTE, data); The first…
1
vote
1 answer

Does glGenTextures and glBindTexture needs to be called before doing glTexImage2D and glTexSubImage2D

Hi I have 35 images to draw in a display. I am drawing it in 7X5 grid. The images are downloaded from internet. Each time an image is downloaded I try to draw the whole 35 images. But some of them are not downloaded yet. So I draw some default tile…
Tahlil
  • 2,680
  • 6
  • 43
  • 84