OpenGL is a graphics standard and API which targets the desktop and workstation markets. It is designed to be easy to accelerate with dedicated computer hardware, and hence most implementations give greatly improved performance over traditional software rendering. Currently, OpenGL is used for ...

learn more… | top users | synonyms

0
votes
1answer
47 views

Geometry Struct and glDrawElements

currently I re-write my codes and change them to make they are better. I have vertex struct like this: struct SVertex { float X, Y, Z; }; struct STexCoord { float U, V; }; And I re-wrote ...
0
votes
1answer
46 views

How can I render text using the new(ish) JOGL GPU curve rendering classes?

I'm fairly new to OpenGL/JOGL, working through various tutorials and books and making steady progress. Text, however, is an area where I'm stuck. I figured out one way using BufferedImage and ...
2
votes
0answers
41 views

Opengl Skybox Texturing Error

I'm using cubemaps to render a skybox in my game. Thinking this would be a simple task I threw some stuff together using the tutorials I found online, particularly this. Taking all of this together, ...
2
votes
1answer
68 views

Looking for specific “textured quad” openGL tutorial in c++ [closed]

I'm new to openGL and I've been googling around for the old and simple textured quad tutorial in openGL but I haven't been able to find one that suits my needs. OpenGL3.X compatible OpenGL|ES 2.0 ...
1
vote
3answers
200 views

How to implement Index Buffer Object (IBOs) with texture coordinates in OpenGL?

I was using IBOs to render meshes (for example a cube) from wave-front files (.obj), without texture coordinates or normals, in OpenGL. Following this, I attempted to implemented texturing. The mesh ...
0
votes
0answers
45 views

AttachThreadInput and PeekMessage Threading

I have a problem with AttachThreadInput and PeekMessage from User32.dll while multithreading. PeekMessage is not returning true in any case. I am designing a Windows Form that uses OpenGL rendering ...
3
votes
1answer
85 views

Texturing in OpenGL, Should texture coordinates be assigned to vertices in the shader?

I attempting to texture 3D models (a cube for example) using ibo’s, with OpenGL in Java. Currently, my textures are distorted. I believe this is because only a single texture coordinate is being ...
0
votes
1answer
34 views

Cannot Get The Texture Showed Up Correctly glDrawElements

I still have this problem almost 1 month. Tried to search on Google but did not find any solution to this. I have loaded all the data correctly but don't know why the texture came up like this. Here ...
1
vote
1answer
74 views

Deferred rendering: camera inside point light's sphere of effect

I'm trying out deferred rendering and I'm using the tutorials at http://ogldev.atspace.co.uk. I've got the basics working and I'm currently trying to implement the final step from tutorial 37 ...
0
votes
0answers
45 views

Vertex Skinning OpenGex Incorrect Transformations

I'm following the formula here, I'm using LJWGL, OpenGl, OpenGex, and Blender: I implemented the code and it works but there is a few things. First, there is a gap between the two bones, or on each ...
1
vote
0answers
84 views

Implementing a Render queue [closed]

I am currently in the process of re-writing my 3d engine, and I am looking at improving the renderer. I have read that organizing objects into a "render queue" and sorting is the best method. The ...
0
votes
1answer
65 views

Error drawing two VAO, each one using different shader programs (vertex + fragment shader) in OpenGL Core 4.3 / GLSL 430 (SOLVED)

I am trying to draw over a GL_TRIANGLE_FAN one texture to render video frames, using shaderProgram1, and render above it some points (GL_POINTS) using shaderProgram2. By this way: (OpenGL Core 4.3) ...
5
votes
2answers
174 views

Low quality bilinear sampling in WebGL/OpenGL/DirectX

I'm seeing low quality bilinear texture sampling in WebGL, OpenGL and Directx, and was wondering if anyone knew how to make it higher quality? The picture below should help show what I mean. The ...
0
votes
0answers
69 views

Taking a 2D slice of a 3D volume

I have a regular 3D polygon and I'd like to display 2D slices of it. What is the best way to achieve this? (Preferrably in OpenGL, but a general algorithm/tecnique would be good as well). I've ...
0
votes
0answers
38 views

LWJGL OpenGL Spotlight half-showing

Problem: Only half of the light is showing. Lighting Inilization code: glEnable(GL_LIGHTING); glEnable(GL_LIGHT0); glEnable(GL_DEPTH_TEST); glEnable(GL_NORMALIZE); ...
36
votes
1answer
6k views

Why are all OpenGL function calls prefixed with “q” in the Doom 3 source code?

Why is every OpenGL call prefixed with a "q" in the Doom 3 source code? Are they custom functions or a different library, and if so, why use that over OpenGL? Any Google search comes up with the Qt ...
0
votes
0answers
32 views

How can I render several rectangles efficiently? (LWJGL)

I'm working with OpenGL3+ rendering and I am coming from OpenGL1.5. In GL1.5 I had rendered things like this: public class GraphicsDead { int vboVertexHandle; int vboColorHandle; public ...
1
vote
1answer
61 views

How can I manipulate a single pixel with LWJGL?

This is a very simple question. Is there a way to manipulate a single pixel? Here's an example of what I want in pseudo-code: while(gameIsOn) { renderAllObjects(); setPixel(x,y,r,g,b); } ...
0
votes
1answer
42 views

Using of opengl buffers

Newbie question, and sorry for my English. Suppose that we create a lot of GL_ARRAY_BUFFER buffers, fill them with some data. But only few of them we link with shader variables. During glDraw..., what ...
0
votes
1answer
34 views

LWJGL Lighting advice / fix

Problem: The spotlight I've set up with OpenGL won't light up anything behind it, no matter what values I set for GL_SPOT_DIRECTION float[] LightDir = new float[]{0,0,-1,0}; float[] ...
2
votes
1answer
317 views

Do I need to install any libraries or SDKs to use OpenGL?

I am wondering if I have to install libraries for openGL programming or if I can already use header files from the core library. I am asking this because I went to the SDK and there is no Core library ...
0
votes
2answers
66 views

Move towards view direction opengl?

I'm trying to get the basics of 3d with opengl 2.0(I know, I know, it's deprecated etc, etc. It's just for the sake of prototyping). I'm trying to get a cube on the screen which you can move around. I ...
0
votes
2answers
66 views

Is Global location using OpenGL bound by the shader?

I have recently started writing a game engine in C++ with OpenGL and using some tutorials online. So far from what I have seen, shaders are the way to manipulate an object's position in worldspace. Is ...
0
votes
1answer
77 views

glDrawElements and Texture Coordinate

I just move on from Immediate Mode and try Vertex Array method using glDrawElements and I got the texture is mess. How to draw the texture correctly? This is a piece of my render code ...
1
vote
0answers
69 views

Normal Mapping a Cubemap

I posted a question on Stackoverflow and it was suggested that it would be better asked here. I have a sphere. It was created via the icosphere method outlined here: ...
3
votes
2answers
532 views

How do I use graphics APIs to select the proper display device among multiple attached to a PC?

I have an LCD monitor display and Oculus Rift attached to my PC. I have an Nvidia 820M dedicated GPU. How does the GPU know to which display device it has to render (or to send rendered information)? ...
0
votes
1answer
82 views

Deferred Rendering with SFML

I've been looking to implement a deferred rendering system in SFML. I've read the tutorials on OGLdev for it, and I was wondering how to draw a scene built in SFML (sprites, text, etc) to the ...
0
votes
2answers
92 views

convert deprecated opengl function to modern opengl (3.3) [closed]

i need help to convert the render function of IQM model (void renderiqm()) to modern OpenGL (without the deprecated functions like enableClientState(), etc). The code of renderiqm() function is here: ...
1
vote
2answers
85 views

Is it possible to run GLFW eventhough my graphic card(Nvidia) supports Direct3d API? [closed]

I have Nvidia 820M GPU installed in my windows 7 machine. In nvidia control panel it is showing it supports Direct3d API version 11. Am I able to run OpenGL applications(using GLUT,GLFW) on my machine ...
4
votes
2answers
140 views

Best way of writing pixel manipuliting-intensive applications with OpenGL/Direct3D

Recently I have been making little experiments with engines similar to old Wolfenstein 3D, Doom and Build, engines where the 3D rendering is entirely done in software and therefore you need full ...
1
vote
0answers
92 views

OpenGL Texture Loading

I've been using OpenGL for a bit so I have a general idea of what I'm doing. Recently, I've been working on a framework to let me test stuff more easily. As part of the framework, I split up loading ...
0
votes
0answers
65 views

Camera rotation destroy scene objects orientation

I fight with that for some time and searching internet but I don't have any answer for my problem. In few words i want to have orbiting camera on screen and objects which I want also rotate ...
0
votes
0answers
57 views

OpenGL camera scrolling too fast

I'm using the code from this tutorial but in Java and LWJGL. The problem is I want the player to click and drag around the world with the mouse. I tried adding the mouse dx (velocity) to the camera ...
0
votes
0answers
54 views

Compiling a CUDA and OpenGL interop code in linux

I am trying to compile a CUDA code in which I am using interoperability with OpenGL to display a simple triangle. I am using a VBO for OpenGL rendering and I am registering this object with CUDA using ...
0
votes
2answers
79 views

Fragment shader compiling in webGL but not in OpenGL

I am programming in Haxe (language compiling to multiple platforms) and I have written some shaders. My fragment shader runs fine in html5, but when I try to compile for native (OS X and/or Neko, a ...
0
votes
1answer
46 views

glRotatef not rotating simple 2D triangle

I am new to OpenGL and am learning it for the purpose of some simulation that I am doing as part of my research work. I have been following the tutorials given at ...
1
vote
1answer
65 views

Can you trilinear sample a non volume texture?

Let's say that i have a regular 2d texture (not a volume texture). Is it possible to do trilinear texture sampling of that texture even though it isn't a volume texture in opengl or directx? ...
1
vote
1answer
116 views

Shadow mapping bone animated model

I am trying to get shadowmapping right for my animated models. It works perfectly for static meshes but the animated models are just wiggeling a bit here's the vertex shader for rendering to the ...
2
votes
2answers
172 views

Lasers in 3D space game

I am creating this little 3d space shooter and am somewhat unsure on how to implement the laser beams. I'm thinking about something along Star Wars and the like where mostly you shoot rather short ...
0
votes
1answer
45 views

useful way for coloring 3ds object in opengl

I have been working in making plane in blender and it has many materials over than 90 , and now I need it in an opengl project with c++ , but as you know if I but the 3ds file the plane color is ...
0
votes
0answers
30 views

Adding a 2D transformation matrix to GLSL

I'm having trouble understanding the matrices I need to render an object in OpenGL. I've been using a matrix to make up for the translation and scaling from the camera in my game but I didn't have a ...
8
votes
3answers
280 views

Using full resolution of depth buffer for 2D rendering

I'm working on a front-to-back renderer for a 2D engine using an orthographic projection. I want to use the depth buffer to avoid overdraw. I have a 16-bit depth buffer, a camera at Z=100 looking at ...
1
vote
0answers
37 views

Find camera coordinate of vanishing point

Given a vector and a camera (position, angle, up vector, field of view, etc), how would I find the vanishing point of the vector in camera space?
0
votes
1answer
61 views

Free camera rotation in 3D space

I'm using a view matrix to do camera movement and rotation. viewMatrix = new Matrix4f(); viewMatrix.setIdentity(); Matrix4f.rotate((float) Math.toRadians(rx), new Vector3f(1,0,0), viewMatrix, ...
1
vote
2answers
110 views

GLFW / OpenGL location and size in pixels

I'm using GLFW to create a little game. (and by little, I mean: small, nonprofit) After a while of puzzling, I found out that this draws a texture (from an image, for instance) to the screen: (the ...
2
votes
0answers
70 views

Cannot convert bitmap to texture [closed]

I'm doing a little C# / OpenGL project and I can't manage to load textures properly. So here is my texture class : public class Texture { public String Filepath; private int TextureID; ...
2
votes
2answers
83 views

How to set black borders in rubik cube using opengl GLSurfaceView android java

I am new in android game development.I have a problems to set the cube face color with black border. public void setupSides() { int i, j, k; // Paint back blue i=0; for(j=0; j<dim; j+=1) { ...
-1
votes
1answer
47 views

Java libgdx get clicked square without iter

I would like to detect which square is clicked without iterating over all elements! i don't want to do this anymore for all elements. if( x >= this.getAnchorX()-HalfWidth && x <= ...
4
votes
0answers
341 views

Skeletal animation in OpenGL

I'm using Assimp to do skeletal animation in my OpenGL application. I used Blender to export this one-boned model to a COLLADA file: The model has only one bone, called arm bone, that controls the ...
2
votes
1answer
122 views

Drawing fonts with LWJGL3 with OpenGL

I'm very sorry if this question has already been answered, but since I've been struggling with this for many days I thought I'd give it a shot here. My goal is to somehow render some text on the ...