-1
votes
1answer
71 views

C++ SDL2 OpenGL Rendering Problems [closed]

I just started with SDL2 and OpenGL in C++ and I am having some trouble rendering a triangle. The triangle I want to draw renders on the screen, but it is black. I tried added some shaders, but they ...
7
votes
3answers
195 views

Terrain & Multi-Texturing

I'm using OpenGL (Version 4.4) (and C++ if that matters). I've created a terrain renderer, the terrain is stored as a 3D scalar field (isosurface/voxels). It uses a slightly modified version of ...
1
vote
1answer
70 views

Why does rendering a gradiented shape leave gaps?

Sometimes when I am drawing objects that aren't 'linear' (e.g. rounded edges, circles, ellipses, diagonal lines, etc) I this weird effect of some pixels at certain points not getting drawn. It's ...
2
votes
3answers
423 views

Visitor-pattern vs inheritance for rendering

I have a game engine that currently uses inheritance to provide a generic interface to do rendering: class renderable { public: void render(); }; Each class calls the gl_* functions itself, ...
2
votes
1answer
250 views

Entity system and rendering types

I would like to implement entity system in my game and I've got some question about entity system and rendering. Currently, my renderer got two types of elements: Current design Mesh : A default ...
17
votes
6answers
1k views

Separating game data/logic from rendering

I'm writing a game using C++ and OpenGL 2.1. I was thinking how could I separate the data/logic from rendering. At the moment I use a base class 'Renderable' that gives a pure virtual method to ...
0
votes
1answer
240 views

Texture Won't Load in OpenGL

I've started trying to make a 2D game in C++ using OpenGL, and I'm using SOIL as the imaging loading library. The problem is, I've been trying to get a simple 64x64 image of a red square to open and ...
2
votes
0answers
77 views

How do I calculate the points of a brush from a Source engine VMF?

I'm trying to render the brushes from a Source engine .vmf file in C++, using OpenGL. The .vmf stores solid brushes as a series of planes which I would like to use to calculate the points for each ...
-3
votes
1answer
275 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 ...
2
votes
1answer
101 views

Any possibility to render XNA scene via POV-Ray

We are creating special purpose application. Its not game but its 3d Application that functions like game. We require app to have different places and we want to allow user to roam inside such places ...
0
votes
1answer
573 views

Why won't my vertex buffer render in GLFW3?

I have started to try to learn OpenGL, and I decided to use GLFW to assist in window creation. The problem is, since GLFW3 is so new, there are no tutorials on it or how to use it with modern OpenGL ...
1
vote
0answers
305 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. ...
0
votes
1answer
117 views

Rendering an object more than once

Right now I'm facing the issue of rendering the same objects more than once in Directx 11, as the object has: A diffuse shader A directional lighting shader A texture shader Now the final color ...
1
vote
3answers
198 views

relationship between the model and the renderer

I tried to build a simple graphics engine, and faced with this problems: i have a list of models that i need to draw, and object (renderer) that implements IRenderer interface with method ...
2
votes
1answer
1k views

Does SFML render graphics outside the window?

While working on a tile-based map I figured it would be a good idea if I would only render what the player sees on the game window, but then it occurred to me that SFML could already be optimized ...
-1
votes
1answer
156 views

Rendering projectiles [closed]

I'm working on a simple game that has the user control a space ship that shoots small circular projectiles. However, I'm not sure how to render these. Right now I know how to make a LPDIREC3DSURFACE ...
2
votes
1answer
303 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 ...
4
votes
1answer
407 views

How to use caching to increase render performance?

First of all I am going to cover the basic design of my 2d tile-based engine written with SDL in C++, then I will point out what I am up to and where I need some hints. Concept of my engine My ...
3
votes
1answer
272 views

What's the name of the rendering problem I describe here?

I don't remember how is it called that rendering problem that you have when you get fast movements (a sprite moves fast for example from right to left) and you have half of the image in a position and ...
0
votes
2answers
386 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(); ...
3
votes
2answers
322 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 { ... } ...
0
votes
2answers
414 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
110 views

Calculating other objects based on the transform of another

What I want to do is create my graphics to be independent of the game framework. So basically the graphics won't know anything until it is told where things are. so the thought was that every ...
0
votes
1answer
575 views

SDL and software/hardware rendering. How to go about it?

I know that SDL 1.2 does software rendering (CPU) and not hardware rendering (GPU). My question is, how do I use SDL but with hardware rendering? How do I not use its rendering API (software) and ...
3
votes
1answer
640 views

Write depth buffer to texture

I need to read depth buffer from GPU and write it to texture. How this can be done? Here is how texture for depth buffer is created: depthBufferDesc.Width = screenWidth; depthBufferDesc.Height = ...
2
votes
1answer
162 views

Multiple passes in direct3d10

I begin to learning direct3d10 and stuck with multiple passes. As input I have a triangle(that stored in vb/ib) and effect file: //some vertex shader and globals goes there. skip them to preserve ...
7
votes
1answer
905 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
3answers
945 views

How to handle many sprites and update?

I am making a game, and I just started to think about how I am going to update and render all the sprites on the screen. Should I store all sprites in some type of list (vector or something?) and then ...
4
votes
1answer
608 views

Best way to separate display and game logic (threads)

What is the best way to separate render and game logic threads? I'd like to make logic-heavy game (ai, machine learning, and network) in which world updates 50-60 times per second. I want to ...
0
votes
2answers
446 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
1answer
162 views

rendering issue: depth buffering + blending: how do they work together?

This image describes the problem I'm having: http://i42.tinypic.com/282kzlf.jpg What you are seeing consists of two images: Image A(with the alien-concept art thingy), depth value .98, the white ...
-1
votes
2answers
966 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 ...
12
votes
6answers
3k views

Should an object in a 2D game render itself?

I'm making a 2D street fighter-like game that is not tile based. Usually people recommend that entities be given to a renderer that render them, not them render themselves, but it seems the inverse is ...
7
votes
2answers
819 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 ...
5
votes
1answer
1k views

Game Code Design for Rendering

I first created a game on the iPhone and I'm now porting it to Android. I wrote most of the code in C++, but when it came to porting it wasn't so easy. The Android's way is to have two threads, one ...
1
vote
1answer
289 views

Materials when rendering geometry

When specifying the material (ambient/diffuse/specular) for use in lighting calculations, what level of detail is the material specified at? Per vertex, mesh, bone?
4
votes
2answers
1k views

Bitmap font rendering, UV generation and vertex placement [closed]

I am generating a bitmap, however, I am not sure on how to render the UV's and placement. I had a thread like this once before, but it was too loosely worded as to what I was looking to do. What I am ...
5
votes
2answers
713 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 ...