gldrawarrays

How to bind texture just to one object in OpenGLES?

白昼怎懂夜的黑 提交于 2020-01-24 19:49:29
问题 I am activating the texture just before the object to draw. But the texture is showing on both objects. Why is that so? Should I unbind the texture before the first object to draw? - I tried with glDisable and glBindTexture but it did not help. Here my code: @Override public void onDrawFrame(GL10 gl) { GLES20.glClear(GL10.GL_COLOR_BUFFER_BIT); synchronized (camerObject) { surfaceTextureCamera.updateTexImage(); cameraUpdate = false; } vertexBuffer.position(0); GLES20.glVertexAttribPointer

Java OpenGL EXCEPTION_ACCESS_VIOLATION on glDrawArrays only on NVIDIA

我只是一个虾纸丫 提交于 2019-12-25 03:45:51
问题 I'm working on a game in java using lwjgl and it's OpenGL implementation. Never had any problems until I exchanged it with a colleague who uses NVIDIA instead of AMD, and suddenly it crashes on a line that works on AMD but it only crashes at that point in the code. That is the weardest part because I use the same method to create the VBOs from .obj-files. I even tried it with the same file but still at that point it crashes on all other occasion not. Could it be maybe a wrong set flag or

glDrawArrays Access Violation

吃可爱长大的小学妹 提交于 2019-12-13 02:25:21
问题 I am trying to follow [this][1] simple tutorial, but I am getting the following error upon reaching 'glDrawArrays': Unhandled exception at 0x03D7598E (nvoglv32.dll) in openGLTest.exe: 0xC0000005: Access violation reading location 0x00000000. void createMesh(void) { float* vertices = new float[18];// Amount of vertices vertices[0] = -0.5; vertices[1] = -0.5; vertices[2] = 0.0; // Bottom left corner vertices[3] = -0.5; vertices[4] = 0.5; vertices[5] = 0.0; // Top left corner vertices[6] = 0.5;

Triangle not drawing in OpenGL 2.1 on OSX

∥☆過路亽.° 提交于 2019-12-01 12:07:28
问题 I'm following a tutorial on creating a Game Engine in Java using OpenGL. I'm trying to render a triangle on the screen. Everything is running fine and I can change the background color but the triangle won't show. I've also tried running the code provided as part of the tutorial series and it still doesn't work. Link to the tutorial: http://bit.ly/1EUnvz4 Link to the code used in the video: http://bit.ly/1z7XUlE Setup I've tried checking for OpenGL version and belive I have 2.1. Mac OSX Java