Tagged Questions
0
votes
0answers
62 views
Android OpenGL ES 2.0 gameloop problems
I implemented a gameloop found here: http://www.koonsolo.com/news/dewitters-gameloop/ into my OpenGL ES 2.0 Android game. The tutorial was written with the canvas API in mind, not OpenGL so I made a ...
-1
votes
0answers
58 views
LWJGL - Switching from 3D to 2D to render text with NO external librarys [closed]
I want to render 2D quads on my screen by switching to a 2D scene then switching back to 3D.
I dont want to use any external librarys besides LWJGL.
This is what I got so far:
private static void ...
0
votes
0answers
162 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. ...
3
votes
1answer
88 views
Rendering a black and white image in OpenGL 1.1
Is there is any way that I can simple disable the color in OpenGL 1.1? Or can I "grey out" textures in LWJGL?
2
votes
1answer
152 views
Not repeating background in platformer [closed]
I need to make not repeating background for platformer. I can't find any description of implementation and I developed algorithm but I'm not sure that it's right.
I can't load one big texture per ...
0
votes
1answer
135 views
Using two FBOs results in the second FBO having nothing drawn to [closed]
I'm writing a deferred renderer, and I use two FBOs: the first one for G-buffer (color, normal, depth) and the second one for lighting (light output), so the first one has three textures bound and the ...
0
votes
1answer
93 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 ...
3
votes
1answer
155 views
How do I render a filled and stroked path using OpenGL?
I want to render a 2-dimensional geometric path consisting of Bézier curves and straight lines. Paths can be concave.
What is the most efficient way to draw this using modern OpenGL? Can I do this ...
0
votes
3answers
241 views
Event Based Render / Update Loop
I'm working on a few game dev tools which use OpenGL or DirectX to render 3D models (viewing).
Consider your favorite 3D modeling software package (Softimage, Maya, 3DS Max, modo, etc.). Note that ...
11
votes
1answer
377 views
OpenGL - white edges on cubes
In a minecraft-like game I'm making, I get white edges on my cubes:
It is much more noticeable in darker textures. The textures are being setup like this:
glTexParameteri(GL_TEXTURE_2D, ...
2
votes
2answers
205 views
Square game map rendered as sphere
For a hobby project of mine I have created a finite voxel world (similar to Minecraft), but as I said, mine is finite. When you reach the edge of it, you are sent to the other side. That is all ...
1
vote
0answers
48 views
Rendering text with stb_font results in glitches
I'm trying to render text with OpenGL and an "inline"-font taken from the stb_fonts
The relevant code for initializing the font & rendering:
LabelFactory::LabelFactory() {
static unsigned ...
4
votes
2answers
509 views
What is the order-less rendering technique that allows partial transparency?
I've seen somewhere rendering technique that allows order-less rendering of partially transparent sprites/objects.
Though I can't remember what the technique is called, so I'm having trouble Googling ...
1
vote
1answer
92 views
Inter Quake Model IQM render Directx9
I'm trying to render an Inter Quake Model(http://lee.fov120.com/iqm/) in DirectX9 that I exported from blender.
I want to display animations which IQM supports and my model format does not.
The ...
0
votes
1answer
244 views
Color Picking Troubles - LWJGL/OpenGL
I'm attempting to check which object the user is hovering over. While everything seems to be just how I'd think it should be, I'm not able to get the correct color due to the second time I draw ...
2
votes
1answer
259 views
OpenGL Fast-Object Instancing Error
I have some code that loops through a set of objects and renders instances of those objects. The list of objects that needs to be rendered is stored as a std::map>, where an object of class ...
2
votes
2answers
277 views
How to draw realtime 3D amoebas in OpenGL?
How would one draw 3D amoebas in real-time in OpenGL? The key components I'm looking for are:
Curved closed surface that changes shape
Generally transparent
Something translucent inside showing the ...
1
vote
1answer
690 views
Correct use of VAO's in OpenGL ES2 for iOS?
I'm migrating to OpenGL ES2 for one of my iOS projects, and I'm having trouble to get any geometry to render successfully. Here's where I'm setting up the VAO rendering:
void bindVAO(int ...
2
votes
1answer
477 views
What does multisampling skip or improve? (so it can be faster than supersampling)
I never really fully understood this, or found an article which explained all the steps in a friendly way.
I'll start with what I do know already (which I hope do not contain misconceptions). I'm ...
0
votes
2answers
299 views
Help with Open GL terrain
I have a terrain class like so:
class Terrian {
public:
Terrian(int width, int height);
virtual ~Terrian();
GLuint get_vertexbuffer();
GLuint get_colorbuffer();
...
2
votes
2answers
260 views
Way to render objects
Is it best to have a renderer class in which you have a seperate function for each object you wish to draw? Or is it best to give each object a render function?
class Renderer {
...
}
...
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 ...
2
votes
2answers
295 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" ...
-1
votes
2answers
185 views
FreeType2 Crash on FT_Init_FreeType
I'm currently trying to learn how to use the FreeType2 library for drawing fonts with OpenGL. However, when I start the program it immediately crashes with the following error: "(Can't correctly start ...
0
votes
2answers
304 views
OpenGL: Drawing to a texture
Well im just a bit stuck wondering how to draw an item to a texture.
Edit:
Well unfortunately my graphics card doesn't support FrameBuffer Objects :/. So i've been trying to get the copy contents ...
0
votes
1answer
476 views
OpenGL : Suggestion on handling collision detection and vertex data?
I was thinking how to do collision detection in my OpenGL application and came to conclusion that I should keep two copies of my geometry data.
1)First copy : Only for OpenGL rendering purposes.This ...
2
votes
0answers
210 views
AlphaToCoverage + Alpha Blending = Artifacts
I'm experiencing a strange problem using OpenGL SampleAlphaToCoverage mode. There are rendering artifacts when using alpha-blending on pixels that have been rendered using alpha-to-coverage - and I ...
1
vote
1answer
311 views
Erasing part of lines in libgdx with ImmediateModeRenderer
Hi i'm using the ImmediateModeRenderer renderer = new ImmediateModeRenderer10(); to render a line with the next block
renderer.begin(matrix, GL10.GL_LINES);
renderer.color(color.r, color.g, ...
6
votes
1answer
615 views
How can I organize render and transformation data in a scalable fashion?
I am writing for OpenGL 2.0 and in the future porting to OpenGL ES 2.0. I only use VBOs and shaders (no immediate mode, no vertex arrays).
I already have working solutions, they just... feel wrong. ...
0
votes
2answers
310 views
Optimize a render call to draw out several semi-transparent sprites
I'm writing a 2D side-scrolling style game in C++ and openGL. In this game I have several cloud sprites which are rendered across the top of the screen. They rotate and scale and such so they're not ...
0
votes
2answers
577 views
SFML Segmentation Fault when using VBOs?
I'm trying to follow along with the gltut tutorials and for some reason when I call GLDrawArrays my program segmentation faults. I've been looking at the state of my application with the Mac OpenGL ...
3
votes
2answers
311 views
Rendering 3D out of layers - optimizing fillrate?
I'm rendering a city of several million cuboids that are all axis-aligned, touching each other and same-sized. They only differ in height.
Rendering them as real geometry is vertex-bound and too ...
0
votes
1answer
494 views
Will using OpenGL for rendering with SDL make my 2D game run smoother?
I've been working on a 2D game using SDL. I've noticed the objects look blurry and glitchy when they're moving, so I was thinking about using OpenGL to render the graphics. Would this help? What ...
9
votes
2answers
880 views
How can I unit test rendering output?
I've been embracing Test-Driven Development (TDD) recently and it's had wonderful impacts on my development output and the resiliency of my codebase. I would like to extend this approach to some of ...
1
vote
2answers
469 views
Rendering (rasterization / ray tracing / others)
I'm completely new to this graphics and game development. I have read about Rendering (drawing a 3D graphic on a display 2D) and there are many ways of rendering, Rasterization, Ray tracing, ...
2
votes
1answer
577 views
How can I render a shiny, metallic surface?
I am creating a game for which I want to render a kind of shiny black metallic surface with some refection property in it. I know that there would be something related to masks involved with it. But ...
-1
votes
2answers
749 views
Tilemap rendering with openGL (why the rendering is extremely messed up)
I'm using SDL & openGL to render a tile-map.
The issue is that the tile-map rendering is extremely messed up, and i'm just a bit unsure what i'm doing wrong exactly.
Here's an image of the ...
3
votes
1answer
1k views
How should I move 2D objects in OpenGL ES 2?
I am a bit confused about what I need to move a basic square. Should I use a translation matrix or just change the object vertices? Which one is better?
I use a simple vertex shader, gl_Position = ...
7
votes
2answers
609 views
How would I setup fog to follow a players coordinates?
I'm wondering if its possible to setup a fog to a player's coordinates (where there is fog around the player to make it more third-person) the main reason I ask this is because I have my player more ...
7
votes
4answers
427 views
What types of effects or shaders would you teach in a rendering class? [closed]
I am looking for a list of topics that would be fun to learn and not too complicated to implement with a prototyping tool like FX Composer or Rendermonkey for an intermediate class of real-time ...
3
votes
2answers
3k 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. ...
5
votes
3answers
2k views
how to add water effect to an image
This is what I am trying to achieve: A given image would occupy say 3/4th height of the screen. The remaining 1/4th area would be a reflection of it with some waves (water effect) on it.
I'm not sure ...
1
vote
1answer
331 views
Mandelbrot set not displaying properly
I am trying to render mandelbrot set using glsl. I'm not sure why its not rendering the correct shape. Does the mandelbrot calculation require values to be within a range for the (x,y) [ or (real, ...
7
votes
4answers
1k views
glsl demo suggestions?
In a lot of places I interviewed recently, I have been asked many a times if I have worked with shaders. Even though, I have read and understand the pipeline, the answer to that question has been no. ...
2
votes
1answer
802 views
Post processing texture sizes
I'm trying to write some code to do post processing in OpenGL ES2 on the iPhone. All is fine an dandy, except I am having trouble working out how to scale the texture rendered in the rendering step, ...
5
votes
2answers
642 views
Atmospheric Scattering
I want to add some nice atmospheric scattering to my 3D game engine but I am very concerned with conserving resources. I am not very familiar with how its done but can someone please give me some ...