Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

100 Neutral

About asishnr@gmail.com

  • Rank
  1. asishnr@gmail.com

    D3D9 Line object hits performance

    Hi, thanks a lot for the response. Do you have any idea how to implement Pixel Shader. I have seen few example, but no one has given a full set of example. I am bit confused with the writing of '.fx' file. Will this approach do the job better? Thanks for your solution. I will try this and shall update you.
  2. asishnr@gmail.com

    D3D9 Line object hits performance

    Hi, I implemented it with drawing a rectangle using 2 Triangles and by calling Primitive drawing using TriangleList. I achieved thick lines, but it doesn't get me a smooth line. Especially when I draw slightly slanting lines with respect to horizontal / vertical axis.
  3. asishnr@gmail.com

    D3D9 Line object hits performance

    Thanks for your reply. I shall test it out and revert.
  4. asishnr@gmail.com

    D3D9 Line object hits performance

    Hi friends, D3D9 Line object hits performance while drawing huge number of lines. I use Line object because I couldn't fine any help for drawing thick lines for other drawing mechanisms where as Line object does it in a pretty easy way. Some one please tell me any solution for this. Any help would be greatly appreciated. Regards, Ashie.
  5. Hi there, I am drawing a graph application which draws Lines (data for few hours around 100000 lines max) using SlimDX.Direct3D9. My requirement is that I should draw the line with a given color and thickness. I could draw the lines using Primitive drawing approach; but failed in providing thickness. I have seen people saying to use VertexShader,PixelShader, GeometryShader etc. But could not find a complete set of example. Some one Please tell me how to write a '.FX' file and get the shader details from it and apply for my Primitive to increase the line thickness. Thanks in advance.
  6. Well, I got it solved. It , in fact it was not an issue with the Font drawing. I just wrote a code to re- initialize the device with the new Width and Height when i re-size my window. Here I faced one more issue that my code to re initialize the device caused me a hanging effect ( for hours and i had to re start my machine due to this few times). I overcome this issue by setting a timer in my onResized event handler and make sure that I do re-initilize if application is not resized for around 200milli seconds.
  7. Hi, I just wonder whether drawing a line using 'SlimDX.Direct3D9' is such a difficult task? Normally drawing a line would be the first step of learning in any 2D or 3D drawing mechanisms. I have been searching for a solution for more than 10 days and tried to get a solution using google as well. For my surprise I could not find even a single usefult hint so far. Can any one help me please................. My requrement is as follows... I want to draw a line 1. with given Width / Thickness 2. I want drawing mechanism like LineList; not like LineStrip 3.I am interested in 2D drawing in 3D space. So i have to draw a line from a given point P1 to another Point P2 with a given color and thickness. 4. Is it possible using SlimDX? I tried with 1) 'SlimDX.Direct3D9' Line object - but here I could draw only a line Strip. 2) Primitive drawing - But line drawn is in black color despite I mention a color and also I am not able to specify the Width. We have many experts who create so many games using SlimDX , XNA etc. Any one please spend few minutes to give a solution for me. Any suggestion would be hightly appreciated. Thanks in advance.
  8. asishnr@gmail.com

    [D3D9] Resizing sprites

    Hi Would you please share the code - scaling of the sprite? I am also facing the same issue.
  9. Hello there, I have a small query to you guys... In my application I am using 'SlimDX.Direct3D9' to draw 5 lines of data on the screen ( each line contains a simple word). I use the following method to draw the string on the screen.. I am maintaining a gap of 50 pixel in between each line. SlimDX.Direct3D9.[color="#2b91af"][color="#2b91af"]Font _Font; System.Drawing.[color="#2b91af"][color="#2b91af"]Font systemfont = [color="#0000ff"][color="#0000ff"]new System.Drawing.[color="#2b91af"][color="#2b91af"]Font([color="#a31515"][color="#a31515"]"Arial", 8f, System.Drawing.[color="#2b91af"][color="#2b91af"]FontStyle.Regular); _Font = [color="#0000ff"][color="#0000ff"]new SlimDX.Direct3D9.[color="#2b91af"][color="#2b91af"]Font(_Device, systemfont); [color="#0000ff"][color="#0000ff"]public [color="#0000ff"][color="#0000ff"]override [color="#0000ff"][color="#0000ff"]void PrintText([color="#0000ff"][color="#0000ff"]string text, [color="#0000ff"][color="#0000ff"]int x, [color="#0000ff"][color="#0000ff"]int y, [color="#2b91af"][color="#2b91af"]Color4 color) { _Font.DrawString([color="#0000ff"][color="#0000ff"]null, text, x, y, color); } Everything seems to be fine and data is being displayed until i re size the window. When i resize the window , scaling happens (Font size on the screan gets bigger or smaller). I want to disable this feautre. I want the data to be written in Constant size and in have to maintain constistant width. Please advise me what should i do to achieve this. Thansk in advance.
  10. Hi there, I am using SlimDX with C# to develop my 2D chart. Due to our client's recommendation I am using 'SlimDX.Direct3D9'. I have a simple requirement. I am using Primitive drawing to draw the lines. But I found following issues. 1. I have to draw lines with different thickness and different color. I found it difficult to implement it using primitive drawing (using PrimitiveType.LineList). My code looks as follows. [System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential)] public struct PositionColored { public Vector3 Position; public int Color; public Vector3 Normal; public static readonly VertexFormat format = VertexFormat.Diffuse | VertexFormat.Position | VertexFormat.Normal; } In reder method:- _Device.BeginScene(); _Device.VertexFormat = PositionColored.format; _Device.DrawUserPrimitives<PositionColored>(primitiveType, 0, vertices.Length / 2, vertices); _Device.EndScene(); _Device.Present(); I found few examples with rendering using triangle type. But in my case I should be able to provide a color at run time in which i can draw lines. So thickness and color are the problems I am facing here. Now, when i finished drawing, all the lines are rendered in same color (Black -> despite i specify the color as Red) and with unique thickness. Can any one please help? 2. I tried with an alternate approach by using the Line object. I could give a specific color and thickness also. But unfortunately I can only draw cannected lines (just like in 'LineStrip' . But I want the functionality like 'LineList'. Code is given below. SlimDX.Direct3D9.Line _Line = null; _Line.GLLines = true; _Line.Width = 0.5; _Device.BeginScene(); _Line.Draw(_Vertices, this._RenderColor); _Device.EndScene(); _Device.Present(); If some one can help to solve out any of these 2 scenarios, it would be a great help. Please advise, thanks in advance.
  • 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!