🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

OpenVR hellovr_opengl sample cant update texture on cube

Started by
1 comment, last by CommanderLake 3 years, 7 months ago

The hellovr_opengl sample is in the SDK here: https://github.com/ValveSoftware/openvr

I want to try something specific in VR with my Index starting with the OpenVR hellovr_opengl sample, I want to update the texture applied to the cube(s). I can change the initial texture but I can't get it to update in the main loop even using glTexSubImage2D in the RenderStereoTargets method, the image data, resolution and format are not in question, the data is valid, the texture just will not update!

I have this at the top of the RenderStereoTargets method:

glBindTexture(GL_TEXTURE_2D, m_iTexture);
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, image);
glBindTexture(GL_TEXTURE_2D, 0);
Advertisement

Sorry, just solved my own problem, I had the arguments mixed up and wasn't generating the mipmaps.

This topic is closed to new replies.

Advertisement