opengl-2.0

OpenGL - ARB extension

风流意气都作罢 提交于 2019-12-24 17:01:48
问题 I am using MacBook Pro (13-inch, Mid 2010) and I work with OpenGL. I noticed, some of functions miss in library. I found specifications on the internet about my hardware and it says: " support OpenGL 3.3 ". It was strange so I printed my OpenGL version and IT IS 2.1, NO 3.3! . (Then I found, newest MacBooks (2014) have the same OpenGL version 2.1, WTF) Then I almost jumped from window. (JK) I googled something about 2.1 with some extension ARB , but there is no documentation, no usage, nobody

LWJGL VBO content is always drawn to the center of the screen (0,0,0)

廉价感情. 提交于 2019-12-12 00:27:23
问题 I started to follow a tutorial about modern OpenGL rendering and altered the c++ code from a VBO lesson to work with LWJGL. I initialized the VBO with the following code: int vbo = GL15.glGenBuffers(); GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, vbo); GL15.glBufferData(GL15.GL_ARRAY_BUFFER, buffer, GL15.GL_STATIC_DRAW); "buffer" is initialized as FloatBuffer buffer = BufferUtils.createFloatBuffer(9); and then filled with {-0.5f, -0.5f, 0, 0.5f, -0.5f, 0, 0, 0.5f, 0} via buffer.put(val) My game

VBO: Array not drawn

∥☆過路亽.° 提交于 2019-12-11 19:04:08
问题 I'm following this guide and I'm trying to draw a quad to the screen. I also saw the source code, it's the same and it should work, but in my case nothing is displayed on the screen. I'm using OpenGL 2.0 with a vertex shader that just sets the color to be red in a way that the quad should be visible on the screen. Before callig glutMainLoop I generate the vertex buffer object: #include <GL/glut.h> #include <GL/glew.h> vector<GLfloat> quad; GLuint buffer; void init() { // This routine gets

How can I pass multiple textures to a single shader?

巧了我就是萌 提交于 2019-11-28 17:56:10
I am using freeglut, GLEW and DevIL to render a textured teapot using a vertex and fragment shader. This is all working fine in OpenGL 2.0 and GLSL 1.2 on Ubuntu 14.04. Now, I want to apply a bump map to the teapot. My lecturer evidently doesn't brew his own tea, and so doesn't know they're supposed to be smooth . Anyway, I found a nice-looking tutorial on old-school bump mapping that includes a fragment shader that begins: uniform sampler2D DecalTex; //The texture uniform sampler2D BumpTex; //The bump-map What they don't mention is how to pass two textures to the shader in the first place.

How can I pass multiple textures to a single shader?

安稳与你 提交于 2019-11-27 10:54:33
问题 I am using freeglut, GLEW and DevIL to render a textured teapot using a vertex and fragment shader. This is all working fine in OpenGL 2.0 and GLSL 1.2 on Ubuntu 14.04. Now, I want to apply a bump map to the teapot. My lecturer evidently doesn't brew his own tea, and so doesn't know they're supposed to be smooth. Anyway, I found a nice-looking tutorial on old-school bump mapping that includes a fragment shader that begins: uniform sampler2D DecalTex; //The texture uniform sampler2D BumpTex; /