-1
votes
0answers
53 views

C++ Game Development [closed]

I want to make games.For now simple 2D games, but I don't know from where TO START. I "know" C++, but i havent worked with classes.I want to begin with GAME development and I searched in the internet ...
1
vote
2answers
152 views

How to detect graphics API at runtime with SDL2?

Using SDL2, is there a way to determine at runtime whether the application is using OpenGL, OpenGLES, or DirectX? EDIT: If there is a way to figure it out without using the SDL2 API, I'm willing to ...
0
votes
0answers
19 views

Shader | Special Effect - Unit selection [duplicate]

I would like to know how the shaders used to show which unit is selected are made. Here is an image to illustrate. How the merge effect of the blue circles can be achieved ? I didn't found any ...
0
votes
2answers
86 views

Was there any equivalent of glVertex3f in Direct3D?

I know that OpenGL's Vertex3f is a bit old but I can't find any information about suitable equivalent for that function that was used in DirectX. Was there any equivalent in DX?
10
votes
1answer
287 views

Rendering only a part of the screen in high detail

If graphics are rendered for a large viewing angle (e.g. a very large TV or a VR headset), the viewer can't actually focus on the entire image, just a part of it. (Actually, this is the case for ...
1
vote
1answer
84 views

Gamma Space and Linear Space with Shader

I am using Unity and I can choose between two color space mode in the settings: Gamma or Linear Space. I am trying to build a Custom Lighting Surface shader but I am facing some problems with those ...
2
votes
4answers
378 views

Why would you use software rendering over hardware rendering, today?

As opposed to CPU or software rendering I assume? Wouldn't generally all current rendering be GPU based, seeing as you would be using OpenGL or Direct X? Could someone give me some info here, can't ...
0
votes
1answer
169 views

OpenGL: How to improve the performance of rendering context [closed]

I have written a benchmark program that compares the performance of OpenGL and DirectX libraries. The problem is that OpenGL gets much lower performance than Direct3D. At the end the program generates ...
0
votes
1answer
93 views

Why do I have to switch T(v) texture coordinates while importing OpenGL to Direct3D?

I am importing my code from OpenGL to Direct3D. My D3DTS_PROJECTION uses D3DXMatrixPerspectiveFovRH, and my D3DTS_VIEW uses D3DXMatrixLookAtRH to set a view equal to OpenGL's view. My question is why ...
1
vote
1answer
92 views

DirectX Bullet Tracer Effect

I'm wondering if anyone knows some common and efficient ways to do a fast tracer for an instant bullet. I've seen people speak on forums of using primitive lines with DirectX, but I doubt this ...
3
votes
2answers
226 views

Is there any reason why there isn't a cross-platform implementation of DirectX?

Similar to how Mono can compile C# to various platforms, why isn't there an API that conforms to DirectX's specifications but can produce binaries for all platforms? I understand that there is OpenGL ...
2
votes
1answer
111 views

Does Direct3D have hardware-dependant extensions like OpenGL?

I am not familiar with Direct3D and I want to know if it has hardware and vendor dependant functions like the extensions in OpenGL? A program written by a friend fails on certain computers while it ...
4
votes
2answers
280 views

Is Batching Geometry Every Frame Always Slower Than Individual Draw Calls

I'm currently have an application that has ~10k draw calls. I implemented a batching scheme where I group all objects that share material, vertex format, etc and pre-transform them by their world ...
0
votes
2answers
176 views

How to mix pixel colors in Shader?

I have a pixel that have a colour RGB. This color is calculated by the shader and can be anything. How can I override this color by a colour I choose. If my pixel is white it's simple, I can do this: ...
0
votes
1answer
149 views

When should rendering be performed during a frame?

When working with OpenGL or DirectX, should draw calls be done all at once, at the end of the update loop, or is it better to have draw calls occur during the update loop rather than just at the end?
9
votes
3answers
683 views

How can I create a glitter effect?

I am trying to create a glittering effect for my realtime shader but I don't know how. Here is one example, and another example. What technique can I use to implement this?
6
votes
2answers
452 views

Fixed Function vs Programmable Pipeline performance with many batches

In OpenGL 2.0 I can easily make 10,000 draw calls per frame (with state changes in between each call). However, if i try to do this in either OpenGL ES 2.0 or DirectX9 with shaders, my peformance is ...
2
votes
3answers
152 views

Can I store D3D9 textures so that they don't consume process memory and also don't require “lost device” handling?

I have an OpenGL application that uses a lot of texture memory. While the texture is stored in the system memory, that texture memory is not part of my application process memory. When this ...
1
vote
3answers
191 views

Is it possible to gain performance by omitting vertex normals in the GPU pipe?

I am working on a rendering problem where I want to render as many raw triangles to the screen as I can with either OpenGL or DirectX with the absolute fastest performance possible. I wondered about ...
1
vote
1answer
206 views

How does HLSL handle clip(vector)?

My goal is to convert clip() to GLSL, version 1.5. I'm currently doing a basic: if (x < 0) discard; But if x is not a scalar, obviously I can't use the "<" operator. So I'm wanting to ...
0
votes
2answers
128 views

Accesing depth buffer from shader

I read this presentation and on 6th slide I found that is not need to use multiple render targets and depth can be taken directly from depth buffer. From which version of DirectX or OpenGL can be ...
0
votes
1answer
198 views

An API independent way of managing video memory?

I'm developing a game. The game architecture is very modular. I have a "Graphics Engine", which uses either a Direct3D or OpenGL renderer. However the user does not have access to the renderers ...
3
votes
2answers
69 views

Local shape color blending

I am trying to implement this in Unity 4 Pro. But I am stuck in the blending part. I don't understand how you could blend multiples textures/colors using multiples volumes on an object. How could you ...
-1
votes
1answer
805 views

Is SDL a game engine? [closed]

I would like to ask if SDL is considered a game engine, or just a library like Open and Direct3D?
2
votes
1answer
148 views

Shader Variable Types

I have a simple question. what are the meaning of : half4 myHalf; myHalf.yyyy; myHalf.xxzz; // or myHalf.yw Thanks a lot !
1
vote
1answer
197 views

How can I use OpenGL and D3D to render to the same window at the same time?

I have main render loop in which initial drawing is done via OpenGL to an SDL window, and after that the same window handle is passed to a Direct3D device, which does subsequent rendering. Once I ...
2
votes
1answer
347 views

Fog shader camera problem

I have some difficulties with my vertex-fragment fog shader in Unity. I have a good visual result but the problem is that the gradient is based on the camera's position, it moves as the camera moves. ...
1
vote
1answer
217 views

Why does my blur shader implementation produce this strange result?

I tried to implement the blur shader shown here. Instead of having a simple 2D texture I use Unity's GrabPass function to capture what's behind the plane to have a transparent effect. Then I apply ...
2
votes
1answer
578 views

Simple Optimized Blur Shader

I have a vertex-fragment shader that use the Unity3D GrabPass functionality (it grabs the screen). And I apply my GrabPass to have a transparent effect. GrabPass { "_GrabTex" } sampler2D ...
8
votes
1answer
538 views

2D Water top surface profile

I am trying to create the effect of the water surface thickness with a vertex-fragment shader. I am in a 3D game environment but It's a scroll view so a "2D" view. Here is a good tutorial of creating ...
5
votes
2answers
835 views

Is the “impossible object” possible in computer graphics?

This may be a silly question but I want to know the answer to it. I saw this thing called the "impossible object", while they're many different images of this online, it's suppost to be impossible ...
-2
votes
2answers
181 views

Rendering structure [closed]

my question is "What is the best way to structure rendering code". Is it better to make a class with a render function that iterates through all game objects based on there name or type and have no ...
3
votes
2answers
205 views

Extract smaller frustum from camera frustum?

Background: I was thinking of implementing multiselection by performing a frustum culling on a sub-part of the screen. Problem: Given total screensize, a rectangle on the screen (pos, size), and ...
3
votes
2answers
106 views

using DirectX to generate a sprite sheet

I am building a site in HTML5 for my client and it must run on the iPad/iPhone (i.e. Safari on iOS). They want a 3D effect where they have a simple, yet, specific product they want to show on the ...
0
votes
1answer
206 views

How do I implement my old OpenGL-based gfx_render_triangle_list using DX11?

I am working at a game that has lots of procedural content. I had built a game engine using OpenGL that handles everything needed for creating a basic 2D game, sprites, primitives, blending, polygons ...
3
votes
1answer
549 views

Rotation matrix from OpenGL to DirectX

I have an application which uses openGL and i have to port it to DirectX. To sum up my issue : How can I port rotation matrix based on a right-handed coordinate system to a left-handed coordinate ...
3
votes
1answer
691 views

creating a UI menu in c++

Im currently working on a 2D Game where the users can interact with specific nodes and are able to edit certain bits of information and I also plan for the users to be able to click buttons to set ...
4
votes
4answers
692 views

Why do most game devs prefer OGL for OS X and D3D for Windows? [closed]

Today I decided to check what Diablo 3 developers used to do graphics: OpenGL or Direct3D? My mind was completely blown: For Windows, they've used D3D and for OS X they've used OGL. I did some ...
-1
votes
1answer
886 views

How can I switch between DirectX and OpenGL renderer in my engine?

I am currently developing my engine with DirectX, but I want to make it cross-platform in the future, using OpenGL. How can I check which platform my engine is running on? And can I use an if ...
5
votes
1answer
455 views

What are the rest of the blending functions used for?

In general, I know of five ways to make use of blending functions (these are for OpenGL, but replace glBlendFunc() with SetRenderState(D3DRS_SRCBLEND) and SetRenderState(D3DRS_DESTBLEND) for DirectX): ...
2
votes
2answers
2k views

OpenGL vs DirectX difference from Graphics card perspective?

I want to know the difference in purely hardware level if there is any. For example the most simple question: Is there a chip for DirectX and another chip for OpenGL? What do hardware producers do to ...
3
votes
2answers
2k views

Does Monogame on Windows Desktop use OpenGL or DirectX by default?

if i use monogame 3.0 beta on windows desktop, does it use the directx renderer (sharpdx) or the opengl renderer by default? if it uses directx is there away to make sharpdx call directly? thanks!
1
vote
3answers
528 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 ...
2
votes
1answer
128 views

Do shader program compilers optimise divide-by-PoT-constants to bitshift operations?

So just to restate that, let's say we have this: float f = g / 2; Given the divisor is a constant, will the shader compiler auto-optimise this to a bitshift operation, as some language compilers are ...
17
votes
3answers
2k views

What's the difference between mesh and a model?

Which one is created first? For example if a team worked on a graphical asset of a car, what would be a model and what would be a mesh of the car?
1
vote
0answers
350 views

Managing many draw calls for dynamic objects

We are developing a game (cross-platform) using Irrlicht. The game has many (around 200 - 500) dynamic objects flying around during the game. Most of these objects are static mesh and build from 20 - ...
3
votes
2answers
335 views

How to reconcile depth ordering with minimal shader context changes?

We generally want to minimise shader-program switches (glUseProgram and all associated context changes) for the sake of performance. AFAIK it is not uncommon to render by shader program, i.e. group ...
0
votes
2answers
1k views

OpenGL matrix vs DirectX matrix

I'm working on an animation and model exporter from Maya to use within my game. Currently, models work perfectly, and animations have some issues with the joints. Since Maya works in an OpenGL ...
3
votes
1answer
1k 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 ...
1
vote
0answers
255 views

Framework to implement an in game gui editor [closed]

I need to do an in game gui editor. The game engine has his own widgets elements and I don't want a gui library that substitute it. The most difficult task is the implementation of the functionality ...