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
0answers
13 views

NullPointer calling scrollpane draw from a libgdx application

Solved: Using Stage to display rather than calling the ScrollPane draw method. I get this error when opening the GameScreen and calling the render method. Exception in thread "LWJGL Application" ...
0
votes
0answers
11 views

Monogame - how to switch backend on Windows (VS2013 Express)

I'm using MonoGame with Visual Studio 2013 Express. I'd like to switch from SharpDX backend to OpenGL/OpenAL. How do I achieve that? People on the Internet usually say that they can switch backends ...
-2
votes
1answer
62 views

Flat Terrain Generation OpenGL (so close)

I am very close to rendering a flat terrain using LWJGL/OpenGL and filling up vertex/index buffers. The only issue I am having seems to be from the very first square rendered. I tried hard coding a ...
1
vote
1answer
151 views

Why does my depth test fail on Nvidia cards?

I sent a test version of my in-development game to some friends, and they found out that the Depth Test in OpenGL does not work on Nvidia cards. I'm using LWJGL. I use my own matrices and send them ...
1
vote
1answer
64 views

How to improve Batch Rendering to work with 3D skeletal animation data

I've implemented a batch rendering technique that is described in detail here: http://www.gamedev.net/page/resources/_/technical/opengl/opengl-batch-rendering-r3900 I'd like to extend it now to ...
0
votes
0answers
13 views

How to draw image with other small icon on it using opengl? [on hold]

I'm new here ... and also new on the opengl world. I don't find any example of drawing image ( bitmap / jpg ) on the screen. What i need is to draw simple image and on this image draw some icon on ...
4
votes
2answers
364 views

2D games and modern OpenGL

Preconcepts Ok, so what I've gathered so far is this: don't use fixed pipeline (deprecated or going to be deprecated) vbos store "object models" (n vertex data, mostly) vaos describe how data is ...
0
votes
1answer
55 views

Fragment Shader output type error

StackExchange! I've been working with opengl for a bit and I'm trying to finally load the shaders instead of having them inline. I'm having a ton of issues, though. As soon as I solve one, another ...
5
votes
1answer
166 views

physically based shading, how to combine specular & diffuse parts?

After writing 'standard' phong & blinn shaders for a while, I recently started to dabble in physically based shading. A resource that helped me a lot are these course notes, especially this paper ...
1
vote
1answer
77 views

Problems with texture orientation in space

I am currently drawing texture in 3D space and have some problems with it's orientation. I'd like me textures always to be oriented with front face to user. My desirable result looks like ...
0
votes
0answers
22 views

Display black on loading texture

While developing a game with LWJGL I hit a sudden stop with the following issue: Anytime I load a texture using Slick Util, the display stays black until i restart the application. Even when i load ...
1
vote
1answer
66 views

How to Load Raw Bayer Images using OpenGL?

I know how to load a Raw RGB888 Buffer as a Texture using opengl. But i want to Load a Raw Bayer (Lets say BG) format Image & Interpolate it to RGB using openGL! . So far i have played around with ...
-5
votes
0answers
60 views

What is it Game Engine of Game like Simpsons Tapped out,Family Guy: The Quest for Stuff,…? [on hold]

i have a question what is it Simpsons Tapped out , Family Guy: The Quest for Stuff , SpongeBob Moves In , Clash of Clans , Boom beach , ... game engine? i believe someone say they have own engine but ...
10
votes
3answers
1k views

Missing features from WebGL and OpenGL ES

I've started using WebGL and am pleased with how easy it is to leverage my OpenGL (and by extension OpenGL ES) experience. However, my understanding is as follows: OpenGL ES is a subset of OpenGL ...
0
votes
1answer
29 views

invoking callback events only in the main loop

The problem is that the mouse and keyboard events can be triggered before the main loop(in which the program starts to render and update content) takes place. In the program if the moues button is ...
0
votes
0answers
29 views

Is there some general tips on optimizing openGL applications? [on hold]

I'm working on my very first OpenGL game, and since it's mostly ment as an educational exercise for myself I have until now not spent much time worrying abouyt performance. However, I've reached a ...
1
vote
1answer
85 views

It possible to render a true quad (without triangles) using OpenGL?

Is it possible to render a "true" quad in OpenGL? By that I mean a square which is not made out of two triangles.
9
votes
1answer
6k views

How do I generate a 3D race track from a spline?

I want to generate a 3-dimensional race track around a spline that describes its shape. Here's an illustrative video. The track should be an endless tunnel that sweeps along a 3D spline, with some ...
-1
votes
1answer
42 views

How would I go about merging two models together in-game to create a new model? [on hold]

Let's say I have two models: model 1 is hilt and model 2 is blade. How would I merge these to models together to create a sword?
2
votes
0answers
55 views

OpenGL light appears to move with camera and changes with object rotation

I have a working open gl es 2.0 3d engine (my own) that I've used in several iOS apps. I recently noticed that on a mutli-symmetrical object the lighting didn't look the same at each rotation. For ...
0
votes
2answers
51 views

How to draw a textured 2D square using OpenGL

I am attempting to get started using OpenGL, and have learned how to open a window and draw basic shapes. However, I do not know how to texture them and have been unable to find any tutorials on how ...
10
votes
2answers
11k views

How can I convert a mouse click to a ray?

I have a perspective projection. When the user clicks on the screen, I want to compute the ray between the near and far planes that projects from the mouse point, so I can do some ray intersection ...
1
vote
1answer
46 views

model view projection multiplication order

I'm debugging a lighting problem where the camera position is effecting the diffused lighting component on my 3d model. In researching my problem I went back and am reading over all the how to ...
6
votes
2answers
3k views

How do I load textures with SFML for OpenGL?

I'm looking at NeHe's texture mapping tutorial. It looks overly complicated for just loading a texture. Is there a way to load a texture in SFML and then use it in Open GL? I use SFML for my ...
1
vote
1answer
58 views

How do I convert from rectangular to spherical coordinates?

This seems like a fairly basic and common problem. Is there a builtin way to achieve it or do I have to write the algorithm on my own? If I do, how should it work?
4
votes
2answers
355 views

Is there an alternative to VBOs or deprecated functions to draw many small quads?

I was thinking about how to program a user interface in a 3D game. The problem is, immediate mode (glBegin and glEnd) is deprecated for a long time but I don't think vertex buffer objects (or arrays) ...
1
vote
2answers
215 views

How do I ensure my skybox is always in the background, with OpenGL?

I created a skybox in OpenGL (through LWJGL), but the only way I found to render it behind all objects was to make it very big. This leads to ugly edges between the 6 skybox planes. Optimally, I ...
0
votes
0answers
26 views

Any OpenGL tutorials? [closed]

I am pretty interested in coding (I am still a beginner) and I was wondering if any of you guys know a website where I can learn OpenGL? I would prefer websites that are kind of like CodeCademy where ...
1
vote
1answer
118 views

Correct multiplication order for a 2D Matrix

I'm currently trying to create a camera and entity/model matrix for my 2D game similar to that of Unity3D. I've already tried to find answers to this question on stackoverflow/gamedev but i couldn't ...
1
vote
1answer
70 views

Why would OpenGL ignore GL_DEPTH_TEST setting?

I cannot figure out why some of my objects are being rendered on top of each other. I have Depth testing on. glEnable(GL_DEPTH_TEST); glDepthFunc(GL_LEQUAL); Do I need to draw by order of what is ...
0
votes
1answer
54 views

can I project a ray in world space?

It's not clear what the question is so I rewrote the question. sorry. My question is how to construct a ray from the camera position to where it looks at in world space. My previous method is draw a ...
0
votes
0answers
111 views

Slick2D shader crashes, but only after a while

I'm using Slick2D's ShaderProgram for shader-based drawing in my game. Some players report that after 3-10 minutes, the game inevitably crashes hard during what appears to be a setUniform4f operation ...
1
vote
1answer
267 views

Calculating shadowmap coordinates for cubemap in shading pass?

I'm trying to implement shadow mapping with cube maps. I believe I've done the first stage by filling the cube map, but for the final shading pass I am unsure how to exactly calculate the cubemap ...
-1
votes
0answers
34 views

A program in OpenGl [closed]

I wrote a program in C++ OpenGl which to insert a special character to the display window display for entering characters ... for example by enter 'A' character the open windows shows A . but i don't ...
2
votes
4answers
1k views

Multiplatform GLSL shader validator?

Im working on a multiplatform (Pc,Mac,Linux) game that uses shaders quite extensively. Since we do not have any funding, it is pretty hard to test our game on all possible hardware configurations. ...
2
votes
1answer
183 views

Use different values for Depth Test and Depth Write in OpenGL

Is there a way to use something similar to PolygonOffset to make a depth test more permissive (move fragment depth towards eye) but still write the original depth value to the depth buffer? The only ...
0
votes
1answer
81 views

GLSL: Vertex attribute to int

I'm trying to write a shader which renders a multitextured geometry wihout rerendering the geometry with each texture. In my test I'm not using textures, I just convert the texture index to a color ...
3
votes
2answers
63 views

How can I draw curves above a mesh surface?

I am making an animation of a deformed sphere that represents some aspects of the wave function in a hydrogen atom. I am starting with an octahedron that i push through a tessellation shader. The ...
2
votes
2answers
95 views

Render-to-texture doesn't work on nvidia cards. OpenGL 3.3

I've implemented some postprocessing effects (DOF, HDR, Bloom) into my engine. I've tested it on AMD card which supports OpenGL 4.2. Yesterday I've made a test on NVidia card which supports only ...
0
votes
2answers
217 views

translate-scroll repeated 2d texture using opengl shader

I managed to implement an infinite 2d texture scrolling using the following shader. btw I'm using cocos2d-x 2.2.1. The vertex shader: attribute vec4 a_position; attribute vec2 a_texCoord; #ifdef ...
1
vote
1answer
147 views

glOrtho setting view [on hold]

I am duplicating this thread from stackoverflow, please remove it if that is not allowed. I'm completely new in OpenGL. I have this problem: I have quite a complicated scene, and I am looking at it ...
2
votes
1answer
33 views

Failing to move exponential depth term to depth shader in exponential shadow mapping

I'm playing around in my little toy project to see if I can understand how exponential shadow mapping works. To begin, I have the following two fragment shaders: Light depth texture shader ...
3
votes
1answer
440 views

Deferred rendering and gaussian blur - artifacts

I compute Gaussian blur in two passes (horizontally and vertically). Shaders look like this: Horizontal blur - fragment shader: #version 420 layout (location = 0) out vec4 outColor; in vec2 ...
3
votes
1answer
295 views

Blank texture in Frame Buffer Object in Deferred Rendering

I'm running the tutorial 35 from olgdev.atspace.co.uk, and it's so strange that the result is a blank screen. This tutorial is performing the first step of Deferred Shading, which means decoupling of ...
0
votes
1answer
57 views

Rotate OpenGL quad around its center

Sorry, I searched it but couldn't figure how to apply it to my code reading the other answers to similar questions. I what to rotate a quad, my code is the following: glEnable(GL_TEXTURE_2D); ...
4
votes
1answer
259 views

C++ OpenGL ShadowMap Issue/Artifacts

I am currently implementing basic shadow mapping in my C++ Custom Engine using GLSL 4.10. It is currently working with basic PCF anti-aliasing and very minimal reduction for unwanted artifacts. Here ...
0
votes
1answer
71 views

Transformations and basis vectors

I've been reading this very nice tutorial on OpenGL, and I encountered a statement which I can't wrap my head around. In Chapter 6, it states: Transformation from one space to another ultimately ...
2
votes
1answer
81 views

Selection with region (when rendering with shaders and VAO)

I am currently render my geometry using "Modern OpenGL" approach (with shaders and buffers). I have already implemented picking of single primitives using glReadPixels. Now I am faced with problem how ...
1
vote
1answer
62 views

Setting up OpenGL on Mac OS 10.10 while keeping it cross-platform

I have experience with game programming mainly in allegro or drawing everything on native windows (No graphic libraries). Now I am interested in learning OpenGL for game development. I have found ...
0
votes
0answers
39 views

Program not proprerly switching shaders [closed]

currently I'm experiencing a strange problem. I'm not really experienced with opengl, but I will walk through my program and what I want to do with it. The idea is to draw a height map with a 3D ...