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

5
votes
3answers
5k views

Open Source Engine for RTS [closed]

I must write a cross-platform real-time-strategy game within 2-3 months. I want use C++ and OpenGL and am looking for an engine. The engine must be open source and work under both Linux and Windows. ...
4
votes
2answers
4k views

Texture antialiasing?

In my Minecraft-clone style game, blocks are textured with a border that is lighter then the block color. See picture below: To achieve this effect without the textures being blurry I use this ...
4
votes
2answers
2k views

How does one write to another process's OpenGL/DirectX context?

I want to write a short of chat client that display the messages in-game (OpenGL/DirectX), but I really don't know how to handle this. It is easy to write my client in my graphic context... but what ...
4
votes
1answer
701 views

In an artillery game how do I mask out the part of the terrain that was hit

Let's say I want to make a really simple artillery game, something like Gorillas. I don't have any experience in games, just some basic understanding of OpenGL. I want to do this for fun and to learn ...
4
votes
2answers
6k views

View matrix in opengl

Sorry for my clumsy question. But I don't know where I am wrong at creating view matrix. I have the following code: createMatrix(vec4f(xAxis.x, xAxis.y, xAxis.z, dot(xAxis,eye)), vec4f( ...
3
votes
3answers
2k views

Question About An Implementation Of Parallax Scrolling In C++/SDL/OpenGL

I been working in a project with a team for a Software Engineering class and we think that using the parallax scrolling will help our game to look really nice but we are not really sure if our idea ...
2
votes
2answers
642 views

Checking if an object is inside bounds of an isometric chunk

How would I check if an object is inside the bounds of an isometric chunk? for example I have a player and I want to check if its inside the bounds of this isometric chunk. I draw the isometric ...
1
vote
5answers
1k views

OpenGL Performance Questions

This subject, as with any optimisation problem, gets hit on a lot, but I just couldn't find what I (think) I want. A lot of tutorials, and even SO questions have similar tips; generally covering: ...
-2
votes
1answer
418 views

What are some good resources for learning OpenGL on Android? [closed]

Mainly I learned how to develop Android applications, but now I want to know how to make high resolution games, so does someone have a good book or a video that teaches OpenGL?
11
votes
3answers
3k views

What is the difference between OpenGL 1.x and 2.x?

Is there a good tutorial that shows the difference between OpenGL 1.* and 2.*? It would be very helpful to know which functions I should not be calling (like glBegin(), I assume).
8
votes
12answers
9k views

Is it a waste to learn OpenGL?

What I've gathered around the internet and various sources is that DirectX has pretty much taken a stronghold grip onto the graphics API domain. And to be honest, I gave learning DirectX10 a chance, ...
7
votes
1answer
3k views

Interleaving Arrays in OpenGL

In my pursuit to write code that matches todays OpenGL standards I have found that I am completely clueless about interleaving arrays. I've tried and debugged just about everywhere I can think of but ...
7
votes
2answers
218 views

Can applications using old versions of Opengl still run on newer cards?

OpenGl 3.0 and up has a quite big difference from the older versions like OpenGl 2.x and opengl 1.x in terms of implementation, does that mean applications which are written with the old versions of ...
7
votes
2answers
2k views

How do I apply skeletal animation from a .x (Direct X) file?

Using the .x format to export a model from Blender, I can load a mesh, armature and animation. I have no problems generating the mesh and viewing models in game. Additionally, I have animations and ...
6
votes
2answers
1k views

Getting the number of fragments which passed the depth test

In "modern" environments, the "NV Occlusion Query" extension provides a method to get the number of fragments which passed the depth test. However, on the iPad / iPhone using OpenGL ES, the extension ...
4
votes
1answer
353 views

OpenGL FBO not being drawn to

In my project I'm trying to implement a deferred rendering system, problem is, I can't seem to get a second FBO to work. UPDATE 1 Here is the FBO initialization code: /// G-Buffer FBO GLuint ...
4
votes
3answers
705 views

Voxel engine artifacts

There are white little dots between blocks at random places, mainly at very near blocks. They disappear when I move the mouse and change the view direction. I use Vertex Arrays with ...
4
votes
1answer
2k views

Access vertex data stored in VBO in the shader

If I wanted to store extra data in a VBO for skinning (indices for indexing into an array of matrices of bones and floats for applying weights to those bones) How would I go about accessing that data ...
4
votes
2answers
5k views

FrameBuffer Render to texture not working all the way

I am learning to use Frame Buffer Objects. For this purpose, I chose to render a triangle to a texture and then map that to a quad. When I render the triangle, I clear the color to something blue. ...
3
votes
1answer
710 views

exporting bind and keyframe bone poses from blender to use in OpenGL

EDIT: I decided to reformulate the question in much simpler terms to see if someone can give me a hand with this. Basically, I'm exporting meshes, skeletons and actions from blender into an engine ...
3
votes
2answers
2k views

Creating map files for a 3D game

I've created plenty of 2D games and now that I've gotten my hands dirty working with 3D in opengl I want to start a game. The issue is I don't know how I can store all the map data. Not only the ...
2
votes
1answer
231 views

3D Camera Rotation

Please, forgive me, but I need help and I've been stuck on this for a few weeks now, I'm making no progress and everywhere I go and I see a different answer, everything I try doesn't work. I've had ...
2
votes
1answer
290 views

Camera scrolling and game boundaries

I am making a platformer game in JBox2D and LWJGL that has a scrolling camera, but I have hit a wall with the boundaries of the camera. Essentially what I have right now is a Box2D world that is ...
2
votes
2answers
655 views

Can frequent state changes decrease rendering performance?

Can frequent texture and shader binding decrease rendering performance? "Frequent" binding example: for object for material in object render part of object using that material "Low count" ...
2
votes
1answer
2k views

How to detect GLSL warnings?

After compiling a shader with glCompileShader, I can call glGetShaderiv with GL_COMPILE_STATUS to check if the shader compiled successfully. I can also call glGetShaderInfoLog to get information about ...
2
votes
1answer
1k views

Pygame water ripple effect

I have Googled for it but there are no ready scripts - as opposed to the same effect on Flash. I have checked the algorithm on The Water Effect Explained and also tested an implementation of the ...
1
vote
1answer
437 views

does glBindAttribLocation silently ignore names not found in a shader?

Does glBindAttribLocation silently ignore names that are not found? For example, in a shader: // Some vertex shader in vec3 position; in vec3 normal; // ... And in some set up code: // While ...
1
vote
2answers
4k views

How to draw a smooth circle in Android using OpenGL?

I am learning about OpenGL API on Android. I just drew a circle. Below is the code I used. public class MyGLBall { private int points=360; private float vertices[]={0.0f,0.0f,0.0f}; private ...
1
vote
2answers
4k views

How to implement explosion in OpenGL with a particle effect?

I'm relatively new to OpenGL and I'm clueless how to implement explosion. So could anyone give me some ideas how to start? Suppose the explosion occurs at location $(x, y, z)$, then I'm thinking of ...
1
vote
2answers
3k views

Is there any opengl cel shading tutorial out there (without GLAUX)?

I want to implement cel shading into my opengl game. I have only found a nehe tutorial that uses glaux (old as hell). I'm looking into it, but I wanna avoid the pain of learning how to translate those ...
-2
votes
1answer
245 views

Detailed Modern Opengl Tutorial? [duplicate]

I am asking for a specific modern opengl tutorial. I need a tutorial that does not skip to explain any lines of code. It should also include different independent objects moving/rotating (most ...
11
votes
5answers
5k views

Learning OpenGL: Red and Blue book still relevant?

I've recently purchased the Orange book( GLSL ) and am wondering if it is important at all to read through the red and blue books as well? Any thoughts?
8
votes
5answers
2k views

Is GLUT obsolete?

A question was asked about good, up-to date OpenGL resources, one of the answers was a link to a tutorial about modern OpenGL programming. The tutorial in question uses GLUT and GLEW, but I have read ...
8
votes
6answers
5k views

AAA Games and OpenGL?

What modern AAA games on the top of the market used OpenGL? If applicable, what engine did they use?
7
votes
1answer
3k views

SDL2 with OpenGL — weird results, what's wrong?

I'm porting an app to iOS, and therefore need to upgrade it to SDL2 from SDL1.2 (so far I'm testing it as an on OS X desktop app only). However, when running the code with SDL2, I'm getting weird ...
6
votes
1answer
180 views

Get SFML to report the version of OpenGL that is being used

How can I get SFML to report the version of OpenGL that is being used by the render window?
6
votes
1answer
412 views

Display Lists in OpenGL

I heard that there was a faster method of displaying vertices, rather than recreating the GL_TRIANGLES, each time the scene is drawn. I thought I read somewhere that this method was obselete. Why ...
6
votes
2answers
345 views

Changing player color without multiple player bitmaps [duplicate]

Possible Duplicate: How to colorize certain parts of a model - like RTS games have those team colors? Ok, so here is my current situation. I have a player model, fully UV mapped, and ...
6
votes
1answer
2k views

gl_PointCoord always zero

I am trying to draw point sprites in OpenGL with a shader but gl_PointCoord is always zero. Here is my code Setup: //Shader creation..(includes glBindAttribLocation(program, ATTRIB_P, "p");) ...
5
votes
1answer
395 views

Cheap ways to do scaling ops in shader?

I've got an extensive world terrain that uses vec3 for the vertex position attribute. That's good, because the terrain has endless gradations due to the use of floating point. But I'm thinking about ...
5
votes
1answer
275 views

Can I leverage the fact that my scene is often static to improve OpenGL (JOGL) performance?

My scene is drawn based on the location of several (often several million) vertices (kept in VBO's) and a camera. I can easily tell in my code when my scene has changed and when it hasn't. There are ...
5
votes
2answers
8k views

Does Unity for PC use Direct3D or OpenGL?

I am a mac developer using Unity and I hardly use a PC. When you build a Unity game for Windows, does it use Direct3D or OpenGL? P.S. I'm not sure if it's called Direct3D or DirectX
5
votes
1answer
1k views

What's the best way of drawing a glowing 3d line using LWJGL?

Sort of like a strip-light effect; not actually a light source, but just a polygon with glowing edges. Can this be done easily? Right now I'm contemplating drawing a line more than once with varying ...
5
votes
2answers
1k views

Generating geometry when using VBO

Currently I am working on a project in which I generate geometry based on the players movement. A glorified very long trail, composed of quads. I am doing this by storing a STD::Vector, and removing ...
4
votes
3answers
534 views

How long does it take for OpenGL to actually update the screen?

I have a simple OpenGL test app in C which draws different things in response to key input. (Mesa 8.0.4, tried with Mesa-EGL and with GLFW, Ubuntu 12.04LTS on a PC with NVIDIA GTX650). The draws are ...
4
votes
3answers
284 views

How to skip the sky in lighting shaders?

I recently implemented a sky in my deferred rendered game. It is a procedurally calculated sphere with a texture applied to it. Unfortunately all lighting shaders (light sources, ambient occlusion) ...
3
votes
3answers
1k views

What method replaces GL_SELECT for box selection?

Last 2 weeks I started working on a box selection that selects shapes using GL_SELECT and I just got it working finally. When looking up resources online, there is a significant number of posts that ...
3
votes
2answers
201 views

Instead of the specified Texture, black circles on a green background are getting rendered. Why?

I'm trying to render a Texture via OpenGL. But instead of the texture black circles on a green background are rendered. (They scale, depending what the rotation of the texture is) Example: The ...
3
votes
2answers
699 views

OpenGL behaviour depending on the graphics card?

This is something that never happened to me before. I have an OpenGL code that uses GLSL shaders to texture a 3D model. The code involves a lot of GPU texture processing, blending, etc... I wanted to ...
3
votes
1answer
2k views

Can't get LWJGL lighting to work

I'm trying to enable lighting in lwjgl according to the method described by NeHe and this post. However, no matter what I try, all faces of my shapes always receive the same amount of light, or, in ...