Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 27 Oct 2005
Offline Last Active Dec 28 2013 10:01 PM

Topics I've Started

Tips on abstracting rendering interfaces for multiple renderers?

29 July 2012 - 04:58 AM


I've long used D3D9 directly in my coding for years, and thought I'd like to undertake learning D3D11, and what better way to do this than to work out a small game idea I've been toying with. But even though XP is on it's way out, I still want my friends and others on XP to be able to run my projects, so I thought I'd like to abstract away the actual rendering calls so I could more or less use either one in my code without specifically targeting one or the other. I've been programming for years now, but to be honest, I'm still a bit green when it comes to situations like this. D3D9 and 11 seem largely different enough that I'm not sure how I could efficiently do this. I'd also be interesting in taking what I've learned and applying it to OpenGL so that some day in the (far) future I could consider cross-platform releases.

I stumbled across this page http://troylawlor.co...enderer-part-1/ -- It seemed to be everything I was hoping for but to my dismay it seems they either haven't finished the next installment or have abandoned it, given that several months has passed since part 1.

Does anyone have any tips, resources, articles, or anything they can share on doing this sort of thing, abstracting away rendering API? I do a lot of work through SlimDX but I'm not afraid of C/C++ (used that for years before I got in bed with C#) so I'm not really afraid of the language used in the articles or what have you. Anything would help. Thanks!

Voxel mesh optimization

10 November 2011 - 12:56 AM

Hey everyone.

I've been battling with a problem and I haven't been able to make much headway. I'm about at my wits end, so I thought I would ask the community what they think or if they have any resources/ideas that might be beneficial to me.

I'm working on a program right now which lets me create voxel-based graphics. These graphics will then be used for a small adventure game that I've had in the back of my head for a while, but I've been unsure of the graphical style I wanted to use until now. If I had to make a direct comparison in style, the game would be somewhat similar in appearance to 3D Dot Heroes. It's still not the best comparison to make but it'll have to do.

However, I don't want to make my system requirements very high and I want to be able to put a lot of action on the screen without crippling my framerate, so I need to come up with a way to reduce the complexity of my voxel based graphics. The obvious first step is to purge any voxels that are obscured completely and only render faces which are visible which is a trivial matter. The next step is to group up large faces from the voxel grid and create a simplified mesh.

I've created an image here to illustrate my point:

My problem is I can't seem to wrap my head around doing the grouping of large faces part. I've tried a bit of searching on the net but the terms I'm choosing are not bearing much fruit. I was wondering if anyone has any experience doing something like this or knows of any papers which describe something similar?

Any help would be greatly appreciated!

Question for SlimDX devs

09 November 2011 - 01:04 AM

Hey guys, I know some of the slimdx crew hangs out here and I was just wondering if you guys are still having problems with gathering up tutorials for SlimDX? I noticed on the website, you only have 3 of them and they're only for DX11.

I've been pretty bored lately and was wondering if you guys have any interest in some basic to moderate level tutorials utilizing SlimDX? I'm thinking basic stuff from initialization to drawing to containment inside controls, etc. Haven't written any of them yet but if there's any interest, I could probably get some done and send them your way.

[DX9] Confusion over triple buffering

26 April 2011 - 08:44 PM

Greetings DX/XNA board, I bring questions from beyond!

I'm a bit confused as of late over triple buffering in DirectX 9. I've heard a lot of conflicting information and honestly, I just don't know what to make of it.

I want to allow for triple buffering for my projects, but I'm not sure how to go about setting it up?

I've heard that you set the BackBufferCount to 2 (I'm not sure if it needs a specific SwapEffect, or if VSync needs to be on?), and DirectX is supposed to handle it, but I've also heard that the drivers largely ignore these values? I believe Shawn Hargreaves said this when he was explaining why the parameters were removed from XNA4.

Searching the internet has actually led me rather dry. Anything I've found points me to BackBufferCount.

Does anyone have any info they can share regarding this topic? I'm using SlimDX for the record, so any info regarding triple buffering in DX9 will be useful.

Getting started with OpenGL

11 April 2011 - 08:18 PM

Greetings, OpenGL forum!

I've decided to use OpenGL for the graphical back end in a multipurpose editor I need for my various projects. I'm using OpenGL here because I think it's a great way to get into it and create something of use to myself without having to worry about performance being perfect.

I'm using C# and OpenTK to access OpenGL. I've got a few questions I'd like to throw at you. I won't lie; they are newbie questions because honestly I'm sort of overwhelmed by the options available to me in OpenGL compared to Direct3D which I've been using for years. I'm also targeting GL 2.0/2.1, not he more recent versions as I want them to run on DX9 class hardware.

First things first. There is a dozen ways to render geometry in OpenGL compared to Direct3D. In OpenGL, there's the original deprecated glVertex3f(...), display lists, vertex lists, VBOs, etc. I'm not really sure if there's a preferred solution for general rendering (static and dynamic). I'm leaning towards VBOs since that seems most in line with what I'm familiar with in Direct3D. I do like what I've read about Display Lists though, and it seems like an interesting and downright neat way to render geometry. But since display lists seem to use the generally deprecated glVertex3f like commands, are they too considered deprecated? I realize they're not exactly deprecated in the version of GL I'm targeting, but I would like to be somewhat current.

The second question I have is rendering quads vs. triangles. Is there actually any determent or benefit to rendering quads compared to triangles? I know the driver has to convert quads into triangles since that's what hardware expects. There's a number of situations where I will want to render quads. I'm not sure if I should just render them as quads or bite the bullet and create two triangles instead. I've always loved the idea that you have access to more primitives in GL than just triangles...

The last question I have is regarding shaders. Does anyone have any good tutorials they have found helpful that might help put me in the right direction regarding shaders in GL?

Thanks in advance for any and all help I receive regarding these questions! I've been using Direct3D for so long that I thought it was time to take a look at the other side of the fence for a change.