Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

122 Neutral

About SubMatrix

  • Rank
  1. thanks, I guess I didn't know the proper term to google for. Trust me I did visit google first before posting here :) I will look into this to see how it works out.
  2. Hi all, I am implementing a job queue using Silverlight/WCF. The idea is that the UI runs on the client, and the queue on the server. All job managing is done on the server via service calls from the UI. Problem is, these are all one-way calls. The UI makes a service call, and the only sort of notification I can latch on to is by hooking the Completed event of the service call. Let's say I have a queue of 3 jobs. The user presses "start queue". How can I know when each of the 3 jobs are finished, so I can update the UI visually (ex. remove that job from the list)? Note that the Completed event isnt useful here because it only gets called once the entire queue has been processed. Thanks in advance.
  3. Hi, Another possibly stupid question related to translating my code to SlimDX. I have a call to Mesh.Validate() in my code, yet I am unable to find an equivalent function in SlimDX. Was it taken out, or was its functionality incorporated into some other function? I searched through the SlimDX source and did not find a call to D3DXValidMesh(), which is the underlying call.
  4. Hi, I've been trying to port my application to SlimDX so that I can compile a 64-bit version. Unless I am missing something, I noticed that in the latest release the constructor for the Device class was changed to take a SlimDX.Direct3D object as a parameter. Later on in my code, I make a call to CheckDeviceMultisampleType(), which now resides in this SlimDX.Direct3D class. The function is no longer static, however (as it previously was in MDX), so I am curious how to get back the Direct3D object that I used to create my Device. The Device class doesn't seem to hold on to it on creation (as far as I can tell). Am I supposed to keep track of the Direct3D object I pass to the Device constructor myself? Or am I missing something simple here? Great work overall on SlimDX btw.
  5. SubMatrix

    Problems with vertex declarations

    yeah im using the debug version... what i meant to say was that im not getting any messages related to that call in particular, but i AM getting other warnings and misc info messages for other parts of the program.
  6. SubMatrix

    Problems with vertex declarations

    I'm new to the D3D debug runtime, but after turning the debug output level to max, it didnt give me any sort of messages...the cgD3D9ValidateVertexDeclaration( cgVertexProgram, CModelDeclFull ); simply returns 0.
  7. SubMatrix

    Problems with vertex declarations

    i assume your variables in your shader look something like this? struct a2vConnector { float3 objCoord : POSITION; float3 objNormal : NORMAL; float2 texCoord : TEXCOORD; float3 objTangent : TANGENT; float3 objBinormal : BINORMAL; }; using your declaration with the above struct still returns 0 when i call cgD3D9ValidateVertexDeclaration( cgVertexProgram, CModelDeclFull ); (forgot to mention i am using Cg)
  8. I am trying to create/use a vertex declaration for use in a vertex shader, but I am having problems getting the declaration validated. My original declaration is as follows: D3DVERTEXELEMENT9 dwDecl[] = { {0, sizeof( float ) * 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, {0, sizeof( float ) * 3, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0}, {0, sizeof( float ) * 6, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TANGENT, 1}, {0, sizeof( float ) * 9, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_BINORMAL, 2}, {0, sizeof( float ) * 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 3}, {0, sizeof( float ) * 15, D3DDECLTYPE_D3DCOLOR, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_COLOR, 0}, D3DDECL_END() }; and here is the corresponding input struct in the vertex shader: struct a2vConnector { float3 objCoord : POSITION; float3 texCoord : TEXCOORD; float3 objTangent : TANGENT0; float3 objBinormal : BINORMAL0; float3 objNormal : NORMAL; float4 color : COLOR; }; To simplify things, I even tried to reduce the struct to just the POSITION variable and the declaration to just the D3DDECLUSAGE_POSITION, but it still is not getting validated, which leads me to believe that the problem lies somewhere else besides the syntax of my struct and declaration. I am also a bit confused about what exactly usage indices (the last parameter in each element of the vertex declaration) are, and the documentation online isnt very descriptive either, so additional help on this would be appreciated. Any ideas?
  9. So does that mean theres no way to do what I intend to do? More specifically, I want to be able to hit a key and cycle through the 6 different textures...
  10. I've seen a few other threads related to this topic, but I'm not sure if this exact problem has been asked. I have an array of sampler2Ds and an integer as the 2 uniform variables in my pixel shader: uniform sampler2D wooltex[6]; uniform int i; //index into sampler2D array As the comment suggests, I want to pass in an index i to the pixel shader, which I will then use as a index into the wooltex array in order to use the appropriate texture. However, I get an error when trying to compile the shader: (0) : fatal error C9999: *** exception during compilation *** The pixel shader itself is simple: void main() { gl_FragColor = texture2D(wooltex, texcoord); } Any ideas why this is an invalid command? If I change wooltex to wooltex[0], it compiles with no problems.
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!