Tagged Questions
0
votes
0answers
44 views
Fixing/avoiding Z-fighting with decals OpenGL
I'm trying to draw animated flames as a decal in OpenGL (just a simple quad with an animated texture as a decal on another quad). Problem is as the camera moves away I get terrible Z-fighting in the ...
5
votes
1answer
191 views
How can glass breaking effect from Smash Hit be achieved? [duplicate]
I saw Smash Hit the other day and was amazed by the physics of the game, specially the shattered glass effect:
I've read other posts about this subject but I still feel that they don't share enough ...
1
vote
3answers
104 views
Technique suggestion to render corroded pipes in 3D
We currently have a lot of data relating to cracks/corrosion/deformations in metal pipes which at present, can be viewed in a crude flat/2D application which makes the metal anomalies hard to spot.
...
1
vote
2answers
218 views
How are red dot/reflex/holographic sights implemented?
In first-person-shooters like Call of Duty, the hologram only appears when it is behind the glass portion of the sight.
In OpenGL, would it be implemented by rendering the glass to the stencil buffer ...
2
votes
1answer
185 views
OpenGL - have object follow mouse
I want to have an object follow around my mouse on the screen in OpenGL. (I am also using GLEW, GLFW, and GLM). The best idea I've come up with is:
Get the coordinates within the window with ...
2
votes
4answers
238 views
OpenGL setup on Windows
I have been trying to use OpenGL for two days now. First on Mac, then on Windows. The problem with Mac is that it doesn't support the newer versions of OpenGL. I ran a tutorial that actually did get ...
0
votes
1answer
75 views
OpenGL ES 1 Pixel Error?
I am developing a game on android using OpenGL ES 1.0 for Android OS. It is a 2d game using a simple Orthographic projection and textures for the sprites. One of these textures has a small line (it ...
0
votes
1answer
163 views
Create 2D sprites with libGdx using a shape and a texture separately
I am creating a 2D game with LibGdx that will have creatures that are generated from dozens of characteristics with potentially millions of unique combinations. For each segment of each creature, I ...
1
vote
1answer
129 views
Why is the light following my camera around?
I have implemented a simple Phong shader without specular highlights for now (just ambient + diffuse components)
The problem however, is that the calculations seem to be done in camera space; as I ...
1
vote
2answers
219 views
How to reduce/remove graphical artifacts?
Question
I'm working on a side-scrolling game that has a 2D grid for rendering to the screen. I'm using OpenGL, and I've optimized my game so that nothing invisible is attempted to be drawn.
As of ...
1
vote
1answer
109 views
How to draw or translate into world space?
I've been hacking around with OpenGL, but there's a few concepts which I can not find the answer on.
I want to draw three GL_QUADS next to eachoter like so:
1[2][3]
I know GL_QUADS are deprecated, ...
0
votes
1answer
95 views
Is it possible to display no white images/sprites when using the latest Android OS?
Was it okay to use Texture.setEnforcePotImages(false) in order to disable conditional width and height pixel size that requires power of 2? I'm planning to sell the game app at Google Play. I want to ...
6
votes
2answers
723 views
atmospheric scattering and sky geometry
I'm trying to implement an atmospheric scattering in my graphics (game) engine based on the gpu gems article: link. An example implementation from that article uses a skydome. My scene is different - ...
2
votes
1answer
272 views
How does the fragment shader get data from the vertex shader?
How can any interactions between these two shaders work? I mean the vertex shader sends a vertex's color to the fragment shader, but that's only one fragment, what about all the other ones between the ...
1
vote
1answer
270 views
What is the difference between shader uniforms and attributes in OpenGL?
I don't fully understand the differences between uniforms and attributes. To be honest, I probably haven't even used attributes.
Can uniforms change for each vertex? I mean to calculate the vertex's ...
1
vote
2answers
891 views
In GLSL is it possible to offset vertices based on height map colour?
I am attempting to generate some terrain based upon a heightmap.
I have generated a 32 x 32 grid and a corresponding height map ->
In my vertex shader I am trying to offset the position of the Y ...
4
votes
2answers
457 views
What Shading/Rendering techniques are being used in this image?
My previous question wasn't clear enough. From a rendering point of view what kind of techniques are used in this image as I would like to apply a similar style (I'm using OpenGL if that matters):
...
-3
votes
1answer
371 views
OS X OpenGL 3.2 Core (Black Screen)
I want to render a Quad via VAO, IBO and VBO but nothing is drawn. I'm using glDrawRangeElements in OS X OpenGL 3.2 Core context. The screen is completely black without any error. GLFW3 is used to ...
7
votes
1answer
2k views
Most efficient way to draw vertex with OpenGL
I am writing an OpenGL 3D game. There will be tons of triangles for terrain and objects in use.
I am studying from the OpenGL official guide and the first presented method is to call a function ...
-1
votes
1answer
56 views
Reverting the view SDL
So in my SDL application, which I setup for OpenGL, if I were to do the following code:
glBegin(GL_QUADS);
glVertex2i(0, 0);
glVertex2i(50, 0);
glVertex2i(50, 50);
glVertex2i(0, 50);
glEnd();
The ...
-2
votes
1answer
329 views
How to start graphics programming? [closed]
I'm trying to find a complete guide for OpenGL programming but all i can found is some blogs with non-finished lessons and old books.
I don't want to just make a game, i want to develop my own game ...
1
vote
1answer
453 views
Selecting and moving object in OpenGL Gameplay3D Engine
I'm using Gameplay3d as a game engine to develop a simple board game. PEG Solitaire
I've come to the part where I've created a 2D grid for all the movable object, empty locations and also where it's ...
2
votes
2answers
632 views
Does my 2D OpenGL renderer need optimized?
I've started a game engine for learning purposes. I have successfully gotten an opengl renderer working and I can draw textures of varying sizes to the screen. The way I have done this is by creating ...
0
votes
2answers
142 views
Can I use multiple OpenGL version together
I want to use GLSL but keep my current OpenGL 1.1 setup. The thing is that can I use OpenGL 2.0 shaders on OpenGL 1.1 renders?
0
votes
1answer
196 views
Opengl binding shaders vs binding buffers performance
Quick question for an opengl guru, I'm in the process of building a render queue and can either reduce the number of shader binding or the number of vertex buffer binding. I just want to know which ...
0
votes
1answer
450 views
OpenGLES GLSL Shader attributes always bound to 0
So I have a very simple vertex shader as follows
#version 120
attribute vec3 position;
attribute vec3 inColor;
uniform mat4 mvp;
varying vec3 fragColor;
void main(void){
fragColor = inColor;
...
0
votes
1answer
273 views
Objects won't render when Texture Compression + Mipmapping is Enabled
[EDIT: FIXED - Calling setting texture max level fixed that]
I'm optimizing my game and I've just implemented compressed (DXTn) texture loading in OpenGL. I've worked my way removing bugs but I can't ...
0
votes
1answer
306 views
Engine and level of detail for maze / labyrinth / dungeon scene?
My question is similar to these:
Algorithm for generating a 2d maze
To scene graph or not to scene graph?
I.e. in this case should I use jme3 or some other engine (I heard unreal offers a free ...
11
votes
4answers
3k views
Fixed-Function vs Shaders: Which for beginner?
I'm currently going to college for computer science. Although I do plan on utilizing an existing engine at some point to create a small game, my aim right now is towards learning the fundamentals: ...
6
votes
2answers
7k views
How many textures can usually I bind at once?
I'm developing a game engine, and it's only going to work on modern (Shader model 4+) hardware. I figure that, by the time I'm done with it, that won't be such an unreasonable requirement.
My ...
9
votes
2answers
2k views
Sorting objects before rendering
I'm trying to implement a scene graph and in all the articles i've come across there is talk about object sorting. So you'd sort your objects by "material" for example. Now untill i sat down and ...
5
votes
1answer
2k views
GLSL default shaders
I've been arming my engine with error checking code. I'll try to describe this situation to my best abilities. Whenever i load a shader and there's an error (file doesn't exist, compilation error, ...
0
votes
2answers
802 views
GLSL shader compilation
When i'm compiling a shader does it have to be complete? Can i use glCompileShader on a shader without a main() function? The OpenGL reference documentation has a nice writeup on program linking ...
0
votes
1answer
180 views
handling buffers in OpenGL
I'm reading through the OpenGL docummentation for version 3.3 core. I'm having issues understanding proper buffer deletion.
ATM i have an object that loads itself into OpenGL memory in the ...
-3
votes
1answer
341 views
Getting the normals of a hemisphere?
I'm trying to calculate the normal for a hemisphere.
I draw the hemi-sphere by this code:
for(float phi = 0.0; phi < 1.567; phi += factor) {
glBegin(GL_QUAD_STRIP);
for(float ...
5
votes
1answer
718 views
Difference between the terms Material & Effect
I'm making an effect system right now (I think, because it may be a material system... or both!). The effects system follows the common (e.g. COLLADA, DirectX) effect framework abstraction of Effects ...
5
votes
3answers
5k views
Should I use Game Engines to learn to make 3D games? [closed]
HI i am a software engineering student in his second-last year.
I am proficient with C,C++,C# and java programming languages, and being a student of engineering I have studied calculus, vectors etc ...
4
votes
1answer
1k views
How can I create an orthographic display that handles different screen dimensions?
I'm trying to create an iPad/iPhone game using GLES2.0 that contains a 3D scene with a heads-up-display/GUI overlaid on the top. However, this problem would also apply if I were to port my game to a ...
7
votes
3answers
3k views
Draw contour around object in Opengl
I need to draw contour around 2d objects in 3d space. I tried drawing lines around object(+points to fill the gap), but due to line width, some part of it(~50%) was covering object. I tried to use ...
-2
votes
3answers
309 views
Having a hard time finding a graphic engine programmer [closed]
I'm looking for a graphic engine programmer that knows both OpenGL and software rendering code to hire for a very short period (2 days). It's urgent and I'm willing to pay a very high amount of money. ...
6
votes
2answers
965 views
OpenGL 2 and back vs 3 and forward: What are the key differences for 2D graphics?
OpenGL contexts before and after OpenGL 3.0 are rather different. So far I've really only worked with buffers on either side anyway, I do know the most notable difference is lack of Immediate Mode.
...
3
votes
3answers
517 views
How to find the bottleneck of the graphical pipeline
I've been wondering about this issue for a while. How to find the bottleneck of the graphical pipeline. Recently I've been using a program to draw massive amount of polygons in a simple scene with ...
1
vote
1answer
3k views
OpenGL 3D Camera
And here I am again, looking for help with my OpenGL camera once again. This is starting to get embarrassing. Anyway, here's the deal: I think my OpenGL First Person free roaming camera is starting ...
14
votes
4answers
4k views
Real time shadow casting in a 2D isometric game
I'm writing a small 2d isometric engine in C++ and I'm trying to implement real time shadow casting. I followed a simple approach described on this page and here is the result (light is located at the ...
6
votes
1answer
1k views
Rendering 2D grass
My current project, using Java and OpenGL, has a fairly standard overhead tilemap in the style of the Zelda games.
I'd really like to add "real" grass to the grass tiles so that there are actually ...
3
votes
3answers
7k views
OpenGL ES 2.0: Vertex and Fragment Shader for 2D with Transparency
Could I knindly ask for correct examples of OpenGL ES 2.0 Vertex and Fragment shader for displaying 2D textured sprites with transparency?
I have fairly simple shaders that display textured polygon ...
2
votes
2answers
983 views
OpenGL ES 2.0: Picking Individual Polygon Sprites from within VBO
Say, I send 10 polygon pairs (one polygon pair == one 2d sprite == one rectangle == two triangles) into OpenGL ES 2.0 VBO. The 10 polygon pairs represent one animated 2D object consisting of 10 ...
6
votes
2answers
3k views
OpenGL ES 2.0: Using VBOs?
OpenGL VBOs (vertex buffer objects) have been developed to improve performance of OpenGL (OpenGL ES 2.0 in my case). The logic is that with the help of VBOs, the data does not need to be copied from ...
25
votes
4answers
15k views
Vertex Array Object (OpenGL)
I've just started out with OpenGL I still haven't really understood what Vertex Array Objects are and how they can be employed.
If Vertex Buffer Object are used to store vertex data (such as their ...
6
votes
2answers
621 views
OpenGL or OpenGL ES
What should I learn? OpenGL 4.1 or OpenGL ES 2.0?
I will be developing desktop applications using Qt but I may start developing mobile applications in a few months, too. I don't know anything about ...