Questions tagged [glteximage2d]

72 questions
1
vote
1 answer

OpenGL repeated calls to glTexImage2D and alpha blending

This is more out of curiosity than for any practical purpose: is there anything in the OpenGL specification that suggests that calling glTexImage2D many times (e.g., once per frame) is illegal? I mean illegal as in 'it could produce wrong results',…
Legendre17
  • 621
  • 5
  • 13
1
vote
1 answer

How to properly use GL_HALF_FLOAT_OES for textures?

I'm using OpenGL ES 2.0 on an iPad 2 / 3. I'd like to use GL_FLOAT when creating textures: glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, texWidth, texHeight, 0, GL_RGBA, GL_FLOAT, rawData); but the problem is that GL_LINEAR is not supported as a…
Vern Jensen
  • 3,449
  • 6
  • 42
  • 59
1
vote
1 answer

glTexImage2D with GL_DEPTH_COMPONENT works on iOS4 , and fails with GL_INVALID_ENUM in iOS 5

Following code works without errors on iOS 4 and prints in CHECK_GL_ERROR macro 0x500 after glTexImage2D on iOS5. I searched for info on this, but did not find anything useful. GLuint depthTexId = 0; glGenTextures(1,…
Petr
  • 836
  • 1
  • 14
  • 37
1
vote
0 answers

On iOS4.0 play yuv420 fails, but on iOS5.0 success

On iOS5.0 video captured from camera with the codes as following can play well, glActiveTexture(GL_TEXTURE0); CVReturn err = CVOpenGLESTextureCacheCreateTextureFromImage(kCFAllocatorDefault, …
zhzhy
  • 461
  • 3
  • 17
0
votes
2 answers

C++ OpenGL glTexImage2D Access Violation

I'm writing an application using OpenGL (freeglut and glew). I also wanted textures so I did some research on the Bitmap file format and wrote a struct for the main header and another for the DIB header (info header). Then I started writing the…
zeluisping
  • 213
  • 7
  • 17
0
votes
0 answers

SurfaceTexture::updateTexImage() fails when I allocate EGL texture with AhardwareBuffer and write to it

This is what I'm doing: In native code, I'm creating an EGL texture from AHardwareBuffer and pass ID of the EGL texture back to Java In java I create SurfaceTexture from that texture ID and Surface from that SurfaceTexture Pass Surface to native…
0
votes
1 answer

write_imagef seems to not change any values

I'm trying to write texture data using opencl and displaying it with opengl. The goal is to compare the performance with and without interoperability. But right now I am failing to generate the texture itself. I first wanted to try to do it without…
Apahdos
  • 97
  • 7
0
votes
2 answers

Custom Texture Mapping for OpenGl through Glut

What I am trying to do is create custom model and texture files that are simple to load and use. Basically the files are lists of floats representing the XYZ and RGB values. So like: 0.5 0.234 0.1 ... ... Problem is I can't get my array of floats to…
Tdiddy
  • 31
  • 6
0
votes
1 answer

glTexImage2D() parameters and generating framebuffers

According to the opengl's reference page, glTexImage2D's structure looks like this: void glTexImage2D( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum…
Peter
  • 460
  • 6
  • 23
0
votes
1 answer

A-Frame - Path for Importing Images Issue - Change from Web Origin to Local Project

I have a working A-Frame site deployed here: https://clevrar.co.za/robben-island-demo This was created with the IdeaSpace CMS. I have downloaded the site in order to try and add a service-worker script to it (I'm fine with that part and don't need…
Jay
  • 13
  • 4
0
votes
0 answers

glTexSubImage2D is slow uploading YUV data

I am writing a video player, I decoded the video frames and use 3 sampler2Ds for receiving the YUV format frame data, it renders perfectly fine. But it has serious performance issue with glTexSubImage2D. I observed strange behaviors: Uploading YUV…
neevek
  • 11,760
  • 8
  • 55
  • 73
0
votes
1 answer

Can OpenGL convert integer pixel data to floating point or UNORM?

glTexImage2D takes internalFormat (which specifies number of bits and data type/encoding), format (without number of bits and encoding) and type. Is it possible, for example, to let OpenGL convert passed pixel data containing 32 bit integers from…
mskr
  • 375
  • 5
  • 14
0
votes
1 answer

OpenGL ES 2 using GL_LUMINANCE with GL_FLOAT on Android devices

Using Android Studio, my code renders an array of floats as a texture passed to GLSL with one float per texel in the range of 0 to 1, like a grayscale texture. For that i use GL_LUMINANCE as the internalFormat and format for glTexImage2D and…
0
votes
1 answer

WebGL texImage2D Issues: How to get texture onto unit/object?

So I'm looking for some help on WebGL textures/3D rendering. The point of my code (what I have done of it so far) is to create a 3D maze of textured blocks/cubes that the user can navigate through via arrow keys or WASD. The issue I'm having is just…
0
votes
2 answers

byte array image show to glsurafceview using GLES20.GlTexImage2D() android xamarin

I have to draw byte array image to glsurfaceview which is continuously comes from server in xamarin android project. code is not working for direct buffer draw but its working for bitmap draw. my code is working if I convert byte array to bitmap and…