Tagged Questions
-1
votes
1answer
66 views
How do I animate images with OpenGL? [closed]
I've been thinking about using set of PNG images (representing frames) and continuously change between them to look like an animation.
Is there a simpler/better way? (maybe using GIF?)
3
votes
0answers
65 views
OpenGL: Filtering/antialising textures in a 2D game
I'm working on a 2D game using OpenGL 1.5 that uses rather large textures. I'm seeing aliasing effects and am wondering how to tackle those.
I'm finding lots of material about antialiasing in 3D ...
3
votes
0answers
153 views
2D water shader similar to Limbo's effect
I'm wondering how I would go about creating a 2D water shader that is seen in this video http://www.youtube.com/watch?v=phChFfi4GOs
The water effect that limbo uses is pretty awesome. I'm not so ...
0
votes
0answers
158 views
Optimal OpenGL 2D Sprite Batching (Best Practice)
I am working on simple 2D engine using OpenGL (3.3+) for rendering and was wondering what the optimal method of sprite batching would be. I plan to put all sprites into one (or fewer) texture atlases. ...
2
votes
1answer
90 views
Proper way to maintain Vertex Buffer Objects
I've started learning WebGL, currently I'm building a 2D lighting system, but there is some confusion going on inside my head.
How the lighting works is based on this tutorial ...
1
vote
0answers
80 views
How do you display non-cutout transparent 2D textures with a depth buffer? (OpenGL)
I've been able to get my 2D renderer to display transparent cutout textures by testing the alpha of a fragment and discarding if it is less than 1 (or any fraction really). The problem is I want to ...
2
votes
2answers
278 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
316 views
Drawing Sprites in Android OpenGL efficiently?
I want to basically give myself some sprite drawing functions (making use of openGL) such as;
draw(Texture,x,y)
I want to do this using OpenGL-ES 2.0 on Android. Since the textures can be varying ...
0
votes
1answer
90 views
How to scale a texture in OpenGL/LWJGL?
How would I take a texture and render it to a specific size? The texture I'm rendering has a 1:1 ratio so I want to be able to render the whole image like if the window is wide then put black outlines ...
2
votes
1answer
177 views
How to do perspective projection “parallax” but without changing the scale or offset of objects?
Hello everyone I have this problem that I have tried everything I could think of. The problem: I am making a 2D game with parallax effect but I am using 3d space so am not simulating the parallax but ...
3
votes
1answer
238 views
Batching dynamic sprites in OpenGL
I'm trying to wrap my head around how batching is done in a 2D sprite-based game. My understanding is I'd get the vertices that represent each sprite I want to draw and stuff them all into a single ...
8
votes
1answer
433 views
Rendering 8 bit graphics
I have a strong programming background just not from game development. I only made some pong and snake in high school and I did some OpenGL in college.
I want to make my own game engine. Nothing ...
0
votes
1answer
84 views
enemy behavior with boundary to change direction
I'm doing space shooter kind of game, the logic is to reflect the enemy if it hits the boundary. With my logic, sometimes enemy behaves like flickering instead of changing the velocity. It's like ...
1
vote
2answers
427 views
Rotating 2D Object
Well I am trying to learn openGL and want to make a triangle move one unit (0.1) everytime I press one of the keyboard arrows. However i want the triangle to turn first pointing the direction where i ...
2
votes
1answer
210 views
Rendering multiple squares fast?
so I'm doing my first steps with openGL development on android and I'm kinda stuck at some serious performance issues...
What I'm trying to do is render a whole grid of single colored squares on to ...
10
votes
2answers
558 views
What should I worry about when changing OpenGL origin to upper left of screen?
For self education, I'm writing a 2D platformer engine in C++ using SDL / OpenGL. I initially began with pure SDL using the tutorials on sdltutorials.com and lazyfoo.net, but I'm now using SDL to ...
3
votes
2answers
887 views
OpenGL Lighting [duplicate]
I have a simple day and night cycle by at day disabling OpenGL lighting and at night enabling openGL Lighting. When I enable everything appears darker. My question is How would I make it that at a ...
2
votes
1answer
365 views
OpenGL: Move camera regardless of rotation
For a 2D board game I'd like to move and rotate an orthogonal camera in coordinates given in a reference system (window space), but simply can't get it to work.
The idea is that the user can drag the ...
1
vote
2answers
619 views
OpenGL ES high-quality 2D scaling
Let's say I'm making a 2D game and I want to implement a zoom in/out feature. Normally this is as simple as modifying the projection matrix to get more or less of the world to show. However, this ...
0
votes
2answers
618 views
How to draw lines between user draggable points?
I want to create a triangle using three different points on the SurfaceView using OpenGL. Line indications between the points with one color and fill the triangle with different color. I want to pull ...
4
votes
2answers
1k views
Resources for 2D rendering using OpenGL?
I noticed that there is quite some difference between 3D and 2D rendering using OpenGL, the techniques are different - pixel-perfect placing is a lot more desirable, among other things.
Are there any ...
0
votes
0answers
115 views
Is there a standard way to track 2d tile positions both locally and on screen?
I'm building a 2D engine based on 32x32 tiles with OpenGL. OpenGL draws from the top left, so Y coordinates go down the screen as they increase. Obviously this is different than a standard graph ...
0
votes
1answer
1k views
Texture displays on Android emulator but not on device
I have written a simple UI which takes an image (256x256) and maps it to a rectangle. This works perfectly on the emulator however on the phone the texture does not show, I see only a white ...
0
votes
1answer
643 views
How to implement HUD
I'm wondering how one could implement an HUD in LWJGL. I've seen tutorials on this, but they don't seem to work. I know the basic structure goes like this:
init3d();
// 3d code
init2d();
// HUD
To ...
1
vote
1answer
493 views
How can I add a parallax effect into my side-scrolling game?
How can I add a parallax effect into my side-scrolling game? I read a lot about parallax scrolling so I know what the logic is and what parallax is but I can't create a dynamic parallax effect.
I ...
0
votes
1answer
548 views
How to make a 2D Terrain with opengl?
I want to make a simple 2d terrain with just a few bumps and height changes:
I thought about just using random numbers to describe the height of a certain vertex, but I don't see how I can make ...
0
votes
0answers
53 views
OpenGL 2D Depth Perception [duplicate]
Possible Duplicate:
OpenGL 2D Depth Perception
I have a 2D RPG game written in Java using LWJGL. All works fine, but at the moment I'm having trouble deciding what the best way to do depth ...
0
votes
3answers
426 views
OpenGL 2D Depth Perception
I have a 2D RPG game written in Java using LWJGL. All works fine, but at the moment I'm having trouble deciding what the best way to do depth perception is. So , for example, if the player goes in ...
3
votes
2answers
2k views
Basics of drawing in 2d with OpenGL 3 shaders
I am new to OpenGL 3 and graphics programming, and want to create some basic 2d graphics. I have the following scenario of how I might go about drawing a basic (but general) 2d rectangle. I'm not ...
3
votes
3answers
284 views
The ship “shudders” in scrolling Asteroids
In my Asteroids game the user can scroll through space. When scrolling, the ship is drawn in the centre of the window. I use interpolation. I scroll the window uing glOrtho, centering it around the ...