The Wayback Machine - https://web.archive.org/web/20160505013744/http://stackoverflow.com/questions/tagged/opengl

OpenGL is a graphics standard and API which is platform independent and available for desktop, workstation and mobile devices. It is designed to provide hardware-accelerated rendering, and hence gives greatly improved performance over traditional software rendering. OpenGL is used for applications ...

learn more… | top users | synonyms

1
vote
0answers
9 views

Simple 3D programming to view a model

I have some code that is manipulating some 3D models, for checking properties of the model and doing some calculations. I have the facet information and want to be able to pass this information on to ...
0
votes
0answers
11 views

Does texture mapping in openGL follows the forward texture mapping of the inverse method?

I've recently read that there are 2 types of texture mapping: forward (point-to-point) and inverse (area-to-area) mapping. Which one of them does OpenGL follows in the mapping process ?
0
votes
0answers
10 views

Computer Graphics implementing Viewing Pipeline

This is a continuation to this question. In a nutshell I'm implementing viewing pipeline using Java AWT, imitating the behaviour of OpenGL (without using it of course). Changes from the older ...
3
votes
0answers
22 views

What is wrong with my OpenGL with SDL2 code?

I am unable to draw to a window I have created with the code written below. What I know is correct: sdl2 init glew init window creation context creation What I think might be the problem: glsl ...
-1
votes
0answers
6 views

Cocoa swap custome framebuffer to screen

I am writing a project with Osx/Cocoa/Swift and OpenGL. I am using custom framebuffers to store all the intermediate texture and the whole solver is very fast. The big problem now how to swap ...
-4
votes
0answers
22 views

How to make a horizontal line rotated at certain angle continuously move along the line of inclination of rotated line. Can anyone help me with this? [on hold]

The image shows the straight line I want to move from position A to position D during animation.
1
vote
1answer
23 views

Matrices for Computer Graphics operations

What I'm trying to do I'm implementing my own viewing pipeline with Java AWT only, imitating the behaviour of OpenGL. In the bottom line, I'm able to transform 3d polygons in World Coordinate System ...
2
votes
1answer
24 views

Why do I need to specify image format as GL_RED instead of GL_ALPHA when loading single-byte alpha value texture?

I'm loading a texture that consists just of the alpha channel. When sending the data, I need to use GL_RED for both the image format and internal format when calling glTexImage2D, such as the ...
1
vote
1answer
31 views

Difference between starting the process directly on machine and from remote desktop connection

I want to know the difference between application started directly on the machine and the application started using remote desktop connection. Whether both the application are same or will have ...
0
votes
0answers
26 views

GL_PATCHES and index buffer (GL_ELEMENT_ARRAY_BUFFER)

Are index/element buffer arrays ignored when drawing with GL_PATCHES and VAO? using: glGenBuffers(1, &ibo); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ibo); ...
-1
votes
0answers
23 views

What is corresponding method to Metal's “drawPrimitives” in Open GL

I am following raywenderlich tutorial on LiquidFun. Tutorial uses Metal's "drawPrimitives" to draw droplets of water, but I am using OpenGL ES2, and I am using glDrawElements and pass positions ...
2
votes
1answer
40 views

why cant I draw triangle on the Qt Widget

Well, these days I am trying to use OpenGL libs on Qt 5.1.1. I add a Widget in the mainwindow.ui, and then promote it to class, Here is the class' head file, #ifndef GLWIDGET_H #define GLWIDGET_H ...
0
votes
2answers
11 views

Import and use openGL GLUQuadric?

I'm trying to use some native functions in C# over OpenGL. I need to draw a Sphere and I read about gluSphere and looked at it on GL\glu.h, but receives a struct object as parameter: typedef struct ...
0
votes
0answers
21 views

LWJGL Text being transformed with the 3D scene

I am trying to make a game for a school project using LWJGL and have recently been having a problem with text. My problem is that whenever I try to draw text to the screen, it moves and gets ...
0
votes
0answers
26 views

OpenGL rotation and movement

I've a basic scene with two objects. One of them should always rotate around its y-axis, I will call it object A, and the other one should move forwards in -z direction by clicking the key "W", I will ...
0
votes
0answers
17 views

2D texture from an array in OpenGL [duplicate]

I have an array of RGB values corresponding to each pixel in my image, instead of using glPoints to draw each pixel to screen, how can i make a 2D texture using that array and draw to screen using the ...
-1
votes
0answers
19 views

compiler errors with glew_static_vs2010_d.lib file

I am trying Example 1.1 in the OpenGL Programming Guide v8, using VS2015. When I run the program I get a list of compiler errors with the file glew_static_vs2010_d.lib. I am accessing it using the ...
1
vote
0answers
59 views

Shader only rendering 1/4th of the screen

I'm currently trying to create a gaussian blur shader, and while I've successfully created the blur effect my shader only renders the lower right quarter of my screen like the image shows: And just to ...
-4
votes
0answers
43 views

nv-pro samples compiling failure, the global scope has no “int_least8_t”

Trying to get this sample from the nvidia repository working, I followed the instructions they give: cloned gl_commandlist_basic, shared_external, shared_sources and build_all, all of them at the ...
0
votes
1answer
24 views

Xamarin crashes editing shader code

Writing if statements in my GLSL shader code crashes Xamarin Studio. Also declaring a vec3, vec4 or other miscellaneous data types will initiate the eternal hang also. It seems Xamarin can't parse ...
0
votes
1answer
21 views

Segfault generated by glEnableVertexArrayAttrib

I'm writing a simple OpenGL program using go-gl. While the program runs fine on most machines, it fails with a segfault when running under Windows on my laptop (it works on Linux though - this is ...
0
votes
1answer
20 views

Unable to compile vertex shader in Maya Plugin

I am writing a plugin on Maya/MacOS which is compiling a vertex shader for OpenGL: const char* vscode = { "#version 150\n" ... } However executing the code in Maya gives ...
0
votes
0answers
27 views

Quaternion angle - Opengl rendering

I have been using a 6dof LSM6DS0 IMU unit (with accelerometer and gyroscope). I am trying to calculate the angle of rotation around all the three axes and Render a 3D cube using opengl to imitate the ...
0
votes
2answers
64 views

What is a source of model distortion of this kind

i'm proting the code from old project to the new one. The old was based on GLFW, new is based on the GLFW3. There were some modification to objects used to store the data, and on a first glance the ...
-1
votes
0answers
25 views

How to quantize floating point to unsigned byte in GLSL

I used floating point texture as data buffer in GLSL and need to save the data on a normal texture (each pixel's color has 1 byte). In my situation, floating point is [-2048.0, 2048.0] and so I have ...
0
votes
2answers
40 views

Render perspective projection matrix in LWJGL 3

When adding a perspective projection matrix to my vertex shader the textured quad is not visible. shader.vert #version 400 in vec3 position; in vec2 textureCoordinate; out vec3 colour; out vec2 ...
0
votes
1answer
27 views

Why do most shader use mat4 instead of mat3x4?

It doesn't look like any operation can make the bottom row something else then [0 0 0 1] and vertex position come with vec3 which need to be upgraded to vec4 before transform. Yet I constantly see ...
1
vote
1answer
18 views

Kivent, is it possible to transform a tmx file to glsl or use a tmx file to create a glsl file?

I'm using Kivent to create a 2d game and I'm following this code. However, on the yourappname.kv file, in line 26, the code loads a glsl file. But I only have a tmx file (tiled map editor), so can I ...
1
vote
1answer
33 views

What is the difference between a Matrix4 “World Transform” and “Local Transform”?

For my GameEntity class, I have a single Matrix4 which represents an Entities Location, Rotation, and Scale, while also having individual fields for those variables which update the Matrix4 ...
0
votes
0answers
27 views

Distance from eye to screenplane

Is it somehow possible to calculate the vector from the camera to the screen? Such that I can move my camera direction to some chosen pixel. Let say the viewport is 100x100px. With camera I mean the ...
0
votes
1answer
15 views

GLFW setUserPointer / getUserPointer sending / accessing class crash

When I try to send and access a class with glfwSetUserPointer / glfwGetUserPointer I print random values and the app crashes. I can send a struct in the same way successfully, but I want to send a ...
0
votes
0answers
26 views

glPointSize not working (and it's outside of glBegin/End block)

I've searched and tried things but my glPointSize doesn't seems to work. Here is the code: void draw() { glClearColor(1.0, 1.0, 1.0, 1.0); glClear(GL_COLOR_BUFFER_BIT); glColor3f(0,0,1.0); ...
2
votes
1answer
38 views

OpenGL Game Engine Renderer [on hold]

I'm developing a rendering engine using OpenGL and I'm wanting to know: Should duplicated vertices (for flat shading, we need to duplicate vertices as we have 2+ normals for a single vertex) be ...
0
votes
0answers
26 views

Unable to instance VAOs at multiple positions in OpenGL

I have created a VAO in OpenGL, comprised of a VBO (2 triangles), an array of indices and an array of positions. However instancing it does only show 1 item. Does it mean it sees all positions at ...
0
votes
0answers
34 views

opengl show axis value [duplicate]

Here is my figure result. I want to add value on axis (X-red line, Y-green line, Z-blue line) so that I can show how high my amplitude of the signal. How should I do? This is my code: #define ...
0
votes
1answer
51 views

How to send data to vertex shader with OpenGL?

I've got some problem with sending data to my vertex shader : #version 450 core layout (location = 5) in vec3 in_Vertex; layout (location = 6) in vec3 in_Color; in int gl_InstanceID; layout ...
0
votes
0answers
26 views

OpenGL Use previous frame fragment shader data in the next frame

I have to color a pixel in red if the value of gl_FragCoord.z in the previous frame is smaller than the actual otherwize the color will be blue (the intensity of the red and blue may be proportional ...
0
votes
2answers
18 views

opengl - sub surface scatering - texture space diffustion

I would have a question to http://http.developer.nvidia.com/GPUGems/gpugems_ch16.html Example 16-5. A Vertex Program to Unwrap a Model and Perform Diffuse Lighting struct a2v { float4 pos : ...
-2
votes
1answer
28 views

Drag object based on mouse selection Opengl

What would I need to do in order to select an object with the mouse in OpenGL? I found something like selection buffer but I also read some where that it was depreciated. So I'm stuck and do not ...
-2
votes
0answers
21 views

Mac OSX signature view using OpenGL [on hold]

I am totally new in OpenGL development and want to create custom signature view in OSX app using OpenGL. can anyone explain how i need to start for openGL. I have checked some related code. Can give ...
0
votes
0answers
24 views

Deferred lighting calculation from pixel position

I want to add deferred lighting to an OpenGL (OGL Version 4.4.0 and Glsl Version 4.40) scene. As supporting libraries I'm using glut and glm (for matrix calculations). All lighting calculations ...
1
vote
1answer
41 views

GLSL skips “if” statement

My GLSL fragment shader skips the "if" statement. The shader itself is very short. I send some data via a uniform buffer object and use it further in the shader. However, the thing skips the ...
0
votes
2answers
37 views

OpenGL Camera Strafing doesnt work

I'm currently working on a OpenGL FrameWork/Engine and as far as the OpenGL part goes, I'm quite satisfied with my results. On the other hand I have a serious problem getting a Camera to work. ...
1
vote
1answer
21 views

OpenGL frame buffer + LibGDX

I have one problem with openGL frame buffer. I want to achieve: Bind FBO1. Draw image1 to FBO1. Unbind FBO1. Bind FBO2. Draw FBO1 to FBO2. Unbind FBO2. Bind FBO1. Draw image2 to FBO1. Unbind FBO1. ...
-3
votes
0answers
20 views

reduce draw calls plants in opengl

I am using L-Systems (https://en.wikipedia.org/wiki/L-system) to generate plants with just drawing simple lines. But every branch has its own draw call. I cant really enclose the plant with one ...
0
votes
0answers
36 views

Gimbal Lock and Rotationmatrix questions

I have got some questions related to rotations on 3D objects. I am using a right-handed system with row-major matrix. I've been programming a drawer, which draws lines based on the orientation of the ...
4
votes
0answers
40 views

VAO deleting causes strange memory problems

I have a render cycle looking like this: import model -> draw it (some frames...) -> delete it. To draw the model I'm using vao/vbo/ebo. Now, in a delete stage with this code: ...
-2
votes
1answer
21 views

What is the difference between SDL, FrameBuffer, GTK and OpenGL/ES [on hold]

I am new to Linux and need to understand some basic concepts on graphics frameworks and how they are different from each other. What exactly is the difference between SDL, GTK, OpenGL ES etc. My ...
1
vote
0answers
46 views

Wrong shading of sphere

In my program I'm trying to import .obj files to OpenGL but if I calculate the normals and use them I get this wrong result: (The normals are calculated and to me seams all right but the result is not ...
-3
votes
0answers
24 views

How do I convert azimuth, elevation, and roll into global (gl) world rotation coordinates? [on hold]

I have a motion tracker that returns azimuth in degrees from -180 to 180, elevation from -90 to 90, and roll from -180 to 180. With 0,0,0 being straight and level. I can't apply this directly to x,y,z ...

Stack Overflow works best with JavaScript enabled
Morty Proxy This is a proxified and sanitized view of the page, visit original site.