Questions tagged [glteximage2d]
72 questions
0
votes
1 answer
OpenGL ES 3.1 - Unable to create IMMUTABLE Textures with glTexImage2D
I'm trying to create an immutable texture with glTexImage2D() that I can then bind using glBindImageTexture()
Here's my C++ code :
GLuint id;
glGenTextures(1, &id);
glBindTexture(GL_TEXTURE_2D, id);
glTexParameteri(GL_TEXTURE_2D,…

Elouarn Laine
- 1,665
- 15
- 27
0
votes
1 answer
globalcompositeoperation equivalent in webgl
Canvas 2D provides an option of overlapping images in different ways with the globalcompositeoperation property as shown here http://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_canvas_globalcompop
Is there an option similar to this in webgl…

Karthik Sasidharan
- 45
- 1
- 7
0
votes
1 answer
OpenGL uploading pixel data from 4*float format (C++)
I have a std::container of image data in the format of:
struct C
{
float r;
float g;
float b;
float a;
}
so it looks like:
std::vector colours(width*height);
where width and height are the size of my image.
Now, I want to push…

NeomerArcana
- 1,978
- 3
- 23
- 50
0
votes
1 answer
Cube map don't work with optirun on Ubuntu
I can't understand why this code work until I don't use the Optirun
//Initialize GLUT and OpenGL
void ViewPort::startVideo(int argc, char** argv) {
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE |…

Zefiro
- 3
- 1
0
votes
2 answers
TexSubImage2D produces a garbled texture for specific images only
I'm trying to get a texture to be rendered on top of another one, like in the image below:
However, only that image gets rendered properly. My other images get garbled and "twisted". If you look carefully, it's as if the rows were shifted:
In…

Daniel
- 678
- 1
- 5
- 20
0
votes
1 answer
GPUImage replace colors with colors from textures
Looking at GPUImagePosterizeFilter it seems like an easy adaptation to replace colors with pixels from textures. Say I have an image that is made from 10 greyscale colors. I would like to replace each of the pixel ranges from the 10 colors with…

Joe Andolina
- 648
- 1
- 11
- 23
0
votes
1 answer
glTexImage2D() function access violation errors
I keep having issues with glTexImage2D and it is stopping me from rendering to the screen.
Here is my code:
#include
#include
#include
#include
#include
#include
#include…

WillKindricks
- 21
- 5
0
votes
1 answer
How to pass YUV data into a fragment shader without GL_LUMINANCE
In Android, in order to pass YUV420sp into a fragment shader I pass the information spliting the data into Y-U-V, and passing each sugin glTexImage2D with GL_LUMINANCE format
But now I need to do Offscren-Rendering for which I require FBOs, the…

PerracoLabs
- 16,449
- 15
- 74
- 127
0
votes
1 answer
Improper colors displayed when loading 32-bit png using stb_image and using GL_UNSIGNED_INT_8_8_8_8 as glTexImage2D type parameter
I'm just learning how to texture in OpenGL and am a bit confused by some of the results I'm getting.
I'm using stb_image to load the following checkerboard png image:
When I saved the png image I explicitly chose to save it as 32 bit. That would…

Peter Clark
- 2,863
- 3
- 23
- 37
0
votes
1 answer
WebGL texImage2d: SECURITY_ERR using rasterizeHTML.js
I'm using rasterizeHTML.js to create a canvas representing DOM elements of the webpage (such as a screenshot of the page), and then I'm passing it to texImage2d, in order to use this canvas as a texture. Althought it works fine in Firefox 21.0, in…

Jennifer Vandoni
- 687
- 1
- 6
- 8
0
votes
2 answers
corrupt data loaded by GLES20.glTexImage2D using GL_LUMINANCE_ALPHA
I am using opengl ES2.0 to render 16bit greyscale data on Android. (I'm handling 16bit to 8bit dynamic range scaling in the shader, the 16bit input is mandatory because it is incoming format of the data.) The resolution is 640x512.
At the moment I…

Luke AP
- 95
- 2
- 11
-1
votes
1 answer
ffmpeg to opengl texture with glTexImage2D
I'm trying to make a player in OpenGL. I use ffmpeg to decode the video.
I searched several tutorial (StackOverflow, ....) how to convert my pFrameRGB-> data [0] texture in OpenGL, but it still shows me a white square. I converted my video to…

2kPi
- 1
- 2