Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Gavin Williams

Member Since 04 Dec 2010
Offline Last Active Jun 08 2015 10:18 PM

Topics I've Started

Convert index<1> idx in parallel_for_each to integer index

07 January 2015 - 01:11 AM

HI,

 

I'm using C++ AMP to generate textures, but I can't work out how to get the array index. I need the index so that i can compute {x,y}, as I have coordinate derived data. The index is of type index<1> which doesn't seem to represent an integer and there is no cast available. The error I get is ..

no suitable conversion function from Concurrency::index<1> to "unsigned int" exists. (nor for any other types)

 

Just to clarify, I am already using (index<1> idx) to access my captured data:

				// update pixelData element
				nativePixelDataView[idx] = pixelAsInt;

Still a little confused about changing structs

29 December 2014 - 06:48 PM

Hi,

 

I'm still a bit confused about structs being copied when they are modified. I have a ray class, with two vectors ...

 

    public class Ray
    {
        public Vector3 Origin { get; set; }
        public Vector3 Direction { get; set; }

        public Ray(Vector3 origin, Vector3 direction)
        {
            Origin = origin;

            direction.Normalize();
            Direction = direction;

            /* this doesn't work*/
            //Direction = direction;
            //Direction.Normalize();
        }

What I don't get is why direction.Normalize() modifies direction, but Direction.Normalize() doesn't modify Direction.

Edit : My running theory, is that after Normalize is called, both direction and Direction are copies local to the constructor, and in the first case, it is actually assigned to the global, but in the second, it is left unused.


How can i establish a wifi-direct connection ?

10 December 2014 - 01:14 PM

Hi,

 

I want to setup a Windows Runtime 8.1 - Windows Runtime 8.1 / Phone 8.1 server and client using Wifi-Direct. But I have had absolutely no success in writing an application that can do even the most simple of tasks, My PC doesn't even see any other wifi-direct devices using the MS samples. In my own code I get one breaking issue after another ... Can someone please talk me through setting up a basic application that can establish a wifi-direct connection between my pc and my laptop (or lumia 520).

My intention is to be able to stream arbitrary data from my pc to a wifi-direct device (phone, pc or custom hardware).


Exporting non-indexed vertex data from 3DSMAx

05 July 2014 - 09:36 AM

Hi,

 

I'm trying to export model data from 3DSMax to be used in my own program, but it seems that any export (eg OBJ) always outputs the vertex data in an unusable format. I am not currently using a model library, I'm loading/using raw vertex data. So I need the vertex data as just that ... vertex data. I'm not using indices, as I want hard edges.

eg:

Vertex 1 : position, normal, texcoord

Vertex 2 : position, normal, texcoord

etc

Take a look at the OBJ file for a cube, below. that vertex data can't be used to reconstruct a cube ! There needs to be 36 vertices for a cube, but only the normals are presented in the correct way. There is face data, but I can't make sense of it, normally such facet data would be referred to as index data, and it would reference the vertices by index. But the face data is indexed upto 36, and there are only 8 vertices in this file description.

Can anyone help me export models in a usable format ?

# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware
# File Created: 06.07.2014 01:05:57

#
# object Box001
#

v  -8.5282 0.0000 16.5679
v  15.5268 0.0000 16.5679
v  -8.5282 0.0000 -13.1042
v  15.5268 0.0000 -13.1042
v  -8.5282 29.3498 16.5679
v  15.5268 29.3498 16.5679
v  -8.5282 29.3498 -13.1042
v  15.5268 29.3498 -13.1042
# 8 vertices

vn 0.0000 -1.0000 -0.0000
vn 0.0000 -1.0000 -0.0000
vn 0.0000 -1.0000 -0.0000
vn 0.0000 -1.0000 -0.0000
vn 0.0000 -1.0000 -0.0000
vn 0.0000 -1.0000 -0.0000
vn 0.0000 1.0000 -0.0000
vn 0.0000 1.0000 -0.0000
vn 0.0000 1.0000 -0.0000
vn 0.0000 1.0000 -0.0000
vn 0.0000 1.0000 -0.0000
vn 0.0000 1.0000 -0.0000
vn 0.0000 0.0000 1.0000
vn 0.0000 0.0000 1.0000
vn 0.0000 0.0000 1.0000
vn 0.0000 0.0000 1.0000
vn 0.0000 0.0000 1.0000
vn 0.0000 0.0000 1.0000
vn 1.0000 0.0000 -0.0000
vn 1.0000 0.0000 -0.0000
vn 1.0000 0.0000 -0.0000
vn 1.0000 0.0000 -0.0000
vn 1.0000 0.0000 -0.0000
vn 1.0000 0.0000 -0.0000
vn 0.0000 0.0000 -1.0000
vn 0.0000 0.0000 -1.0000
vn 0.0000 0.0000 -1.0000
vn 0.0000 0.0000 -1.0000
vn 0.0000 0.0000 -1.0000
vn 0.0000 0.0000 -1.0000
vn -1.0000 0.0000 -0.0000
vn -1.0000 0.0000 -0.0000
vn -1.0000 0.0000 -0.0000
vn -1.0000 0.0000 -0.0000
vn -1.0000 0.0000 -0.0000
vn -1.0000 0.0000 -0.0000
# 36 vertex normals

vt 0.0000 0.0000 0.0000
vt 1.0000 0.0000 0.0000
vt 0.0000 1.0000 0.0000
vt 1.0000 1.0000 0.0000
vt 0.0000 0.0000 0.0000
vt 1.0000 0.0000 0.0000
vt 0.0000 1.0000 0.0000
vt 1.0000 1.0000 0.0000
vt 0.0000 0.0000 0.0000
vt 1.0000 0.0000 0.0000
vt 0.0000 1.0000 0.0000
vt 1.0000 1.0000 0.0000
# 12 texture coords

g Box001
f 1/10/1 3/12/2 4/11/3
f 4/11/4 2/9/5 1/10/6
f 5/9/7 6/10/8 8/12/9
f 8/12/10 7/11/11 5/9/12
f 1/5/13 2/6/14 6/8/15
f 6/8/16 5/7/17 1/5/18
f 2/1/19 4/2/20 8/4/21
f 8/4/22 6/3/23 2/1/24
f 4/5/25 3/6/26 7/8/27
f 7/8/28 8/7/29 4/5/30
f 3/1/31 1/2/32 5/4/33
f 5/4/34 7/3/35 3/1/36
# 12 faces

How to install latest SharpDX from GitRepository.

17 June 2014 - 09:20 PM

Hi,

I have SharpDX 2.6.3 synced in GitHub. But I'm not sure on how to actually install it, other than how I've done it in the past and just copied the bin folder and the documentaions folder over to my main drive. But should I also copy packages and external or not?

Thanks for any help.

 

Gavin

 


PARTNERS