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
2 views

OpenGL strange rendering problem when buffers have different sizes

I have encountered a very odd error in my program, "odd" in the sense that everything the API says suggests that the error should not occur. I have a bunch of 2D un-indexed vertex data, and I want to ...
1
vote
0answers
17 views

OpenGL seems to be getting its colour from the wrong array on some machines

I have a OpenSceneGraph application which displays a 2D mesh and allows the user to make selections on triangles and vertices and colour them. If you aren't familiar with OpenSceneGraph, it's basiclly ...
0
votes
0answers
33 views

Which OpenGL Version shall I target? [on hold]

Okay, I've learned OGL 1 for some days now. glBegin() etc I've now realized that this stuff is absolutely deprecated and 'everyone' says "use OpenGL 3.0 and higher / you have to unlearn the most of ...
1
vote
1answer
36 views

FBO result not drawing to screen

I recently added framebuffer rendering to my game and rendering to the FBO works (verified with glGetTexImage), but when I go to render a quad to show the result nothing is drawn to the screen. I'm ...
0
votes
1answer
78 views

3D picking for mouse move event

I implemented color picking recently and I would like to use it as kind of highlight when mouse is over an object but I am concerned about performance. Color picking requires whole frame to be drawn, ...
1
vote
1answer
44 views

Additive blending problems

I'm trying to get the blend of two images to work without luck. I have a render target on which I have an object, then I want to render again the same object in same position but with different ...
0
votes
0answers
25 views

Barycentric vertex coordinates in GLES 2.0

I have a certain set of polygons, which are stored in a vertex buffer and an index buffer. The polygons are textureless and normalless. The polygons are dynamic, their buffers get constantly emptied ...
0
votes
0answers
94 views

What is “ping pong” in the context of graphics rendering?

I have to render a scene, once per light, and blend the result of the various passes. I heard and read that one way to increase performances and render targets to use would be ping pong. I'm new to ...
0
votes
1answer
59 views

Planet terrain not connecting properly

I'm trying to generate some simple planets in OpenGL using libnoise (including noiseutils), but the terrain is not correctly connecting where the sphere "completes itself" and I was wondering if ...
2
votes
1answer
90 views

What types of matrices are needed for game and graphics programming?

I am writing a 3D math library for general game development and want to know what type of Matrix classes I should include. Is just a 4x4 matrix enough, or must I provide 3x4 and dedicated rotational ...
2
votes
1answer
50 views

Indexed Drawing in OpenGL not working

I am trying to render 2 types of primitives- - points ( a Point Cloud ) - triangles ( a Mesh ) I am rendering points simply without any index arrays and they are getting rendered fine. To render ...
-4
votes
0answers
65 views

i want to be a game developres please help [closed]

bare with my English ok so we have done this semester C language but i didn't like much of C so i just prepared as much as a needed for my exam and i learned C++ coz its much better and advance than ...
4
votes
1answer
109 views

cost of texture change vs color change

How would I go about determining the difference in cost between changing the render color of an object every frame vice changing the texture (same sheet, just changing the source rectangle) every ...
0
votes
1answer
40 views

Can I directly pass a Boost ptr_vector list to glBufferData?

I have a data structure like this: typedef struct vertex_ { float x; float y; float z; float s; float t; }vertex; Then I add to a list called: boost::ptr_vector<vector> vertices; Is there a ...
0
votes
1answer
70 views

OpenGL render to texture causing edge artifacts

This is my first post here so any help would be massively appreciated :) I'm using C++ with SDL and OpenGL 3.3 When rendering directly to screen I get the following result And when I render to ...
0
votes
1answer
51 views

Sources to learn OpenGL [closed]

I really wish to learn OpenGL, but all I have is a very old laptop. It supports OpenGL 1.2 version only. I tried learning through books but trying out the programs are next to impossible, since none ...
2
votes
2answers
104 views

Render with multiple lights (one pass per light)

I have already a system that at the moment handle multiple lights just passing an array of light struct and loop through it. I had been told to switch to a multipass rendering approach. How should I ...
0
votes
1answer
40 views

Taking fixed direction on hemisphere and project to normal (openGL)

I am trying to perform sampling using hemisphere around a surface normal. I want to experiment with fixed directions (and maybe jitter slightly between frames). So I have those directions: vec3 ...
0
votes
0answers
16 views

Qt OpenGL shader errors [closed]

I get the following error after compiling a Qt-OpenGL project: bool QGLShaderPrivate::create(): Could not create shader of type 1. Vertex shader for simpleShaderProg (MainVertexShader & ...
0
votes
2answers
98 views

c++ OpenGL framerate question

I am writing a simple 3D pacman using c++ and OpenGL. I'm new in OpenGL development, I wanted to make a small project before learning next concepts. For now I can't have more than 55fps when ...
0
votes
3answers
88 views

Is OpenGl still supported in C?

I'm reading the OpenGl superbible 3th edition (well I plan to) and it's all in C. Since this book was written in 2004 and all the other later versions are written in C++, i was wondering whether or ...
1
vote
1answer
81 views

GLSL to Cg: why is the effect different?

With reference to this question, where I was trying to make the shader compile, I am now trying to make an effect appear. The effect can be shown here, through a GLSL shader: But when I use the ...
0
votes
0answers
30 views

how decal projection works in opengl?

I want to draw a quad that fit on another mesh,how to setup projection matrix of this quad?I need an orthoprojection matrix right? At first I thought I only need to do some ray test of each vertex of ...
0
votes
0answers
22 views

Good books on Android OpenGL game development [closed]

I don't know if opinion based questions will get down voted here. But anyways , I wanted to know some good books on Android game development with OpenGL. I have some intermediate knowledge on Java ...
2
votes
2answers
51 views

Palette reduction to pre-defined palette

I'm writing a bunch of GLSL effects for fun, but I can't wrap my head around this. Basically, I want to reduce a texture's palette into a pre-defined set of colors. For example, a post-processing ...
0
votes
0answers
22 views

changing camera's reference point position by a keyboard event

I would like to change the camera's reference point position using gluLookAt. I would like that it changes when I press for exemle 'a'. I tried with: void VueOpenGL::Paint(wxPaintEvent&){ ...
0
votes
0answers
33 views

lodepng “undefined reference” (MinGW)? [closed]

I'm trying to use the library lodepng (lodev.org) in a C++ project. The actual library is a header and a C++ source file so the error I'm getting is confusing me. When I try reference a function or ...
0
votes
2answers
63 views

Passing variables down the pipeline glsl

I am sorry to post a question that may be easily tested, but I don't have an OGL4+ hardware at the moment and I have to make some design decision beforehand so I wanted a clear scenario. Looking at ...
1
vote
1answer
107 views

Assimp skeletal animation matrices

I startded to make an assimp only opengl skeletal animation demo. For that I used this: http://sourceforge.net/p/assimp/discussion/817654/thread/5462cbf5 And something is not correct in bone matrices. ...
0
votes
1answer
32 views

When and how to apply affine translations to vertices of a mesh with LWJGL

So, I have a rigid body class, containing a list of vertices and a 4x4 transformation matrix. At the moment, I'm applying the transformation matrix to each vertex individually, and am unable to revert ...
5
votes
3answers
573 views

How portable are OpenGL versions, really?

If I write a game engine that uses OpenGL 1.5 (not assuming what else I do), is it portable now and is it still portable five years from now or are/will support for OpenGL by hardware and drivers (be) ...
0
votes
0answers
26 views

Get light positions from an environment map

As the title says, I was wondering if there's a way, in a preprocessing step, to infer the position of a some light sources starting from an environment map. I think I saw lights inferred from an ...
-1
votes
3answers
66 views

Most efficient way to do 2d tiles (VBO vs Instancing)

Ok so I am looking at building a game that uses 16*16 tiles, and renders anywhere from 400,000 to 1,000,000 tiles onto the screen at any given time. The tiles will be destroyable . What is the most ...
0
votes
1answer
40 views

GLSL to Cg fragment shader

I have found very useful resource on the Swiftless website on OpenGL. Unfortunately, I cannot manage to adapt a GLSL fragment shader to my project, which uses Cg. Here it is: uniform sampler2D ...
1
vote
1answer
50 views

OpenGL - Buffer Usage

I am currently working on a little OpenGL project. At the moment I am trying to find a good solution for rendering multiple objects. I have set up a terrain with its own buffers, which works just ...
0
votes
1answer
62 views

Skybox: OpenGL texCUBE vs a textured cube

In OpenGL, the typical way that I've seen to set up a skybox using cubemapping is to create a cube in camera space, prepare a cubemap sampler with the appropriate six-sided texture, and then in the ...
0
votes
1answer
71 views

How to efficiently change VBO size?

I have created a menu class and now I'm working on getting it to render using OpenGL's VBO's. The menu is fairly simple, it has a number of buttons, the user can press up and down to highlight the ...
0
votes
0answers
31 views

OpenGL - using gluSphere

I have an OpenGL code that currently draws several spheres at different locations. I generate the vertex buffer data (and normal data) myself. However, to simplify the code and increase efficiency, I ...
3
votes
2answers
99 views

GLM/OpenGL: How Can I Prevent Vector Magnitude From Increasing While Rotating Bones in Skeletal Rig?

ANSWER AT THE BOTTOM OF THIS QUESTION I have been reading tutorials, articles, questions on StackExchange and books all with the subject of skeletal rigging. I have boiled my program down to just the ...
1
vote
0answers
57 views

How to implement translation, scale, rotation gizmos for manipulating 3D object's transforms?

I am in the process of developing a basic 3D editor. It uses OpenGL for rendering a 3D world. Right now my scene is just a few boxes of different sizes and I am at the stage where I want to be able to ...
1
vote
1answer
53 views

LibGDX Box2DLights shadow offset problem on bodies

Hello I just started to use LibGDX, and it's awesome. I looked at the Box2DLights library, and started to learn how the lighting work here. I got something up: As you can see, it works, but the ...
0
votes
0answers
109 views

Problem when using two different shaders

I have created a simple shader for drawing my scene in OpenGL. When another shader was introduced, a problem appeared. I use the first shader and draw few objects in the scene. Then I use the second ...
0
votes
0answers
18 views

Slick2D changing image's color with drawFlash and using alpha

I have an image, where I have a round soft white feathered ball in the center of it. I plan to use it for my lighting in my 2D game. I could not find any proper way to drawing lighting with many ...
0
votes
1answer
105 views

How do you create a 2d world then view it in 3d?

I have been learning OpenGL for a while now and have a pretty good understanding so far. What I would like to know is if I create a 2D game in Orthographic Projection, is it possible to switch to a ...
0
votes
0answers
29 views

Slick2D/LWJGL Drawing coloured lights problem

I am using the Slick2D engine. I've followed this snippet for creating light sources. I have followed step step, added what is actually important for me, and tested it and the lighting effects ...
0
votes
1answer
40 views

OpenGL +SFML + GLFW3

I'am maybe asking a stupid question, but can we mix OpenGl + SMFL and add to it some GLFW in the same SFML window ?
3
votes
1answer
86 views

what happens with missing vertices in geometry shader

I am relatively new to GLSL shader programming, and the documentation I found is unfortunately often inscrutable. I am having trouble understanding a few things with how geometry shaders fit into the ...
3
votes
1answer
156 views

What happen if I try to run OpenGL 4.4 code on an unsupported graphic card?

I'm learning OpenGL because I'd like to build my own engine. I'd like to know what happens if I try to run OpenGL 4.4 code (the latest version at the moment of writing) on an unsupported graphic card ...
1
vote
1answer
72 views

Shadow Map field-of-view

I'm implementing a shadow map algorithm with a spotlight (a spotlight that always "looks" at a given object). My issue is that for some configuration, part of the object the light is "looking at" is ...
1
vote
0answers
62 views

OpenGL/GLM Camera

I want to make a camera that can freely look and walk on X/Z plane and rotate 360 degrees. I'm using OpenGL and the lookAt function from the GLM library to create the view matrix. I've looked through ...