Topics
-
- 0 replies
- 4.2k views
I have some large project written in directdraw. But I want to port it to Direct9. Everythying is OK, except the colors on the screen. I don't know how to use palette in D3D (SetPaletteEntries and SetCurrentTexturePalette function). Here is my code of creating d3d and device if( NULL == ( g_pD3D = Direct3DCreate9( D3D_SDK_VERSION ) ) ) return E_FAIL; D3DPRESENT_PARAMETERS d3dpp; ZeroMemory( &d3dpp, sizeof( d3dpp ) ); d3dpp.Windowed = TRUE; d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD; d3dpp.Flags=D3DPRESENTFLAG_LOCKABLE_BACKBUFFER; d3dpp.BackBufferFormat = D3DFMT_UNKNOWN; d3dpp.BackBufferCount=1; d3dpp.hDeviceWindow=hWnd; if( FAILED( g_pD3…
Last reply by cossack5, -
-
- Leaders
- 4 replies
- 2.6k views
AnyOne who can help me or give an example for drawing a pipeline using direct3D with vb.net?
Last reply by dotnetguy37, -
-
-
- Leaders
- 2 replies
- 2.8k views
Velocity[a] is a Vector3 type (all doubles), Proximity is a double as is Influence. The highlighted code produces a cannot convert double to float error... I have tried (double)0 and that did not solve the problem. Any ideas? Velocity[a] = (new Vector3( [color="Red"]Proximity.X != 0[/color] ? Velocity[a].X + (1/(Influence * Proximity.X)) : Velocity[a].X, [color="Red"]Proximity.Y != 0[/color] ? Velocity[a].Y + (1/(Influence * Proximity.Y)) : Velocity[a].Y, [color="Red"]Proximity.Z != 0[/color] ? Velocity[a].Z + (1/(Influence * Proximity.Z)) : Velocity[a].Z ));
Last reply by SleepingTroll, -
-
-
- Leaders
- 2 replies
- 2.1k views
Does DX not have the intelligence to render an object while masking by proximity to the camera?
Last reply by SleepingTroll, -
-
- 0 replies
- 2.3k views
I have managed to fumble my way to some degree of success with DirectX... only real problem I have now is that my render meshes take on the aspect ratio of the windows form object... ? using System; using System.Windows.Forms; using System.Collections.Generic; using System.Timers; using System.Drawing; using Microsoft.DirectX; using Microsoft.DirectX.Direct3D; namespace Model { /// <summary> /// Description of MainForm. /// </summary> public partial class MainForm : Form { private Device device = null; private Mesh NeutronMesh; private Material NMaterial; private float NMass = (float)1.67495438; private float NRad = (float)1.11328405736; private Me…
Last reply by SleepingTroll, -
-
- Leaders
- 3 replies
- 2k views
(sorry about the repost, just realized the original was in the wrong place) I create a form and it displays fine, however as soon as I create my directX device the form stops displaying! Here is my code, please note that I can eliminate all of the DirectX code and the form displays, however just the line 'private Device device = null;' will prevent my form from displaying. using System; using System.Drawing; using System.Windows.Forms; using Microsoft.DirectX; using Microsoft.DirectX.Direct3D; namespace Model { public partial class MainForm : Form { private Device device = null; public MainForm() { InitializeComponent(); InitializeDevice(); } private…
Last reply by SleepingTroll, -
-
- 0 replies
- 1.8k views
When I add a reference, how can I be sure I am referencing the correct version of DirectX? I first installed DirectX 11 SDK... I did a system restore, however when I ran my IDE and added references, DirectX was still there when I should have had no SDK installed.
Last reply by SleepingTroll, -
- 0 replies
- 3.3k views
Hi, I need to play multiple wave files using directsound or any other method. My application is similar to this: http://msdn.microsoft.com/en-us/library/ms973091.aspx, where i need to create beats. The problem is that when I play two or more sounds, there will be some delay between both files. The program provided in that link does not have any delays present when more than 1 file is played but I couldn't understand the coding since it is extremely difficult and im just a beginner. Is there a way to remove the delay completely? I am using the following method: var dev = new Device(); dev.SetCooperativeLevel(this, CooperativeLevel.Priority); …
Last reply by Jakpot, -
- 0 replies
- 2.2k views
Hello! First of all, I never had written any DirectX program. I have the following problem: I have am amount of points in 3d with their color, which can differ from point to point. The points describe a surface of a unknown object. I know the neighbourhood, because I get a matrix of points, so I know to each point the 4 neigbour points. We can say, I have a surface given with quadrangles where I know the color at each edge. I wnat now to draw this in two ways: first of all on the display, second in a file, png most liklely. Can someone help me out an give me an example how to do it? I am a really greenhorn. I use C++, perheps C# or Delphi would be also helpful. …
Last reply by terminat, -
- 0 replies
- 3.9k views
Hello, at first excused my bad englisch :D I am in search of a example how to use DirectInput to send keys and Text to a DirectX application. I need it to confer fast new tactics in the Team. I and my friends play a game against strong NPC's in LAN (Hamachi) multiplayer. And i want wo make a Vb.net programm where we can define sentences. Who we can sent with Global Hotkeys. I have try the SendKeys method but the ingame chat doesn't react. Google say some DirectX applications block SendKeys :-\ I have read the MSDN DirectInput artikel but it does not help me further. I hope you had some Tipps, Links or Code Snippets for me. Greeting Gerrie :)
Last reply by Gerrie, -
- 1 reply
- 2.5k views
This may be my first post, but I'm not a noob, been programming for some time, gonna have a crack at skinned meshes after sucessfully cracking animation with keyframes. took me a month but i'll get there. From what i gathered, its not about frames, but assigning matrices to vertecies and a hell of alot of matrix multiplying :D The aim is to get it in one class again. I'll let you know how i get on. .....Leade
Last reply by Leade, -
-
- Leaders
- 3 replies
- 4.9k views
Re: C# - Drawing an image (sprite) with Direct3D Split from http://www.xtremedotnettalk.com/showthread.php?t=92593 Note: Please do not reply in old threads. You may create a new thread with a link to the old thread if necessary. hi everybody 1) i try to code game 2D program using c# and directx i creat a sprite and it move on screet it is fine (frame rate about 60 fps) but i try to add more sprite it getting slower (frame rate about 2,3 fps up to sprite count) i load sprite image with texture object and draw it sprite.Draw(texture ... 2) which file format is faster i use png in project thaks a lot
Last reply by Leade, -
-
- 3 replies
- 5.6k views
I am trying to get my video to render to texture. The SDK example seems to only draw the scene when the video "creates" a new texture. However, I'm going to be using this texture in scenes where other objects are using regular textures, and everything will be running at higher framerates. When I tried to do that, my entire scene started flashing. I reduced the code to see if I could find the piece of code causing the problem, and got down to two lines: Video video = Video.FromFile("test.avi"); video.RenderToTexture(D3DDevice); If I comment out the 2nd line, everything works just fine. Adding it in seems to cause a problem. Like I said, the entire scene star…
Last reply by Leade, -
- 1 reply
- 3.2k views
I have a car model and i want to rotate it's wheels when car is moving but i don't know how can i do this. I found some examples about skinned mesh but is it the only way animating meshes in directx? Can't i easily rotate a part of mesh without bone system? And is there a any good tutorial about animating meshes in c#? Thanks.
Last reply by Leade, -
-
- Leaders
- 2 replies
- 3.8k views
Hi, I am wondering how do I minimize a windowed DirectX application without getting an application error. Like in various tutorials, I captured the OnDeviceLost event, but what do I have to put inside it? The application displays a simple cube without textures and it uses 1 light. There is no rendering loop running. The rendering block is called only if needed (i.e. setting viewer position, setting light color etc.).
Last reply by bufer24, -
-
- 1 reply
- 2.4k views
Im am trying to solve a simple problem: in my DirectX9 application (VB.Net) I draw a simple lit cube using trianglestrip and a grid (just like every 3D editing software) using linelist. But when move the camera in the opposite position to look at the cube from behind, the grid is drawn in front of the cube, even it should be behind it. In code, the grid is drawn first and the cube is drawn afterwards. When i change the order, it doesn´t help, except that the grid visibility is inverted against the first case. Seems like lines are not depth-tested. How do I properly combine solid geometry with lines?
Last reply by bufer24, -
- 1 reply
- 4.3k views
Hello, for three days now, I have been working with DirectSound, and have ran into a pretty big issue. I cannot figure out how to return a byte array from the SecondaryBuffer, I understand how to create the secondary buffer from a memory stream but not vice-versa, I need to either: A: Read the SecondaryBuffer to a Memory stream. B: Read the SecondaryBuffer to a Byte array. Here is what I have so far (please let me know if there is anything I can improve): ------------------------------------------------------------------------- Public Class DSound2 Public DSDevice As DirectSound.Device Public DSBuffers As New List(Of DirectSound.Secondary…
Last reply by Fabian_Russ, -
-
- Moderators
- *Experts*
- Administrators
- 20 replies
- 8.4k views
Hello, I've created a Tetris game using DirectX and VB.NET. At first, it was intented for our chat channel. Finally, I converted it in English and here it is. Most comments are in French and most of the code is in English (don't ask me why). I know that some things could have been done differently and others could have been added. This is my first real VB.NET application and my first DirectX game. Please read ReadMe.txt before doing anything. Enjoy! :) Download below
Last reply by Fabian_Russ, -
-
- 0 replies
- 3.1k views
Hi, I am new to the Directx, Trying to get ending event while audio is ending. I came across a very strange problem, When I create the audio object on the main thread I get the event but If I try to make the object of Audio on a thread or from a callback I did not get the ending event. I have to play an audio on a getting a request from another application on TCP/IP. Since I try to create audio form the TCP callback function. Please suggest what I need to do to get the ending event to send a response back once it is completed.
Last reply by ambujbansal, -
- 0 replies
- 3.1k views
I'm trying to change the color of direct3d mesh at the point that I click. I'm using a pick function to find where I clicked how do I change the color of that mesh at that point ?
Last reply by anthonyselby,
-
Who's Online 0 Members, 0 Anonymous, 13 Guests (See full list)
- There are no registered users currently online