<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>gautam's Feed - Programmer's Heaven</title>
    <link>http://www.programmersheaven.com/feed/User/8843/RSS.aspx</link>
    <description>Events at Programmer's Heaven related to the user gautam.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Sat, 25 May 2013 21:40:28 -0700</pubDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <item>
      <title>Re: Cross-thread error in datagridview to collection binding</title>
      <link>http://www.programmersheaven.com/mb/csharp/413368/413974/ReadMessage.aspx#413974</link>
      <description>&lt;p&gt;Posted a '&lt;a href="http://www.programmersheaven.com/mb/csharp/413368/413974/ReadMessage.aspx#413974"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/csharp/Board.aspx"&gt;C#&lt;/a&gt; forum.&lt;/p&gt;I am bit newbie to C# but anything you do on a form has to happen on the GUI thread. That includes operations like adding data. The simplest way you could do it is to use a delegate and use the invoke method.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/csharp/413368/413974/ReadMessage.aspx#413974</guid>
      <pubDate>Sat, 27 Feb 2010 04:52:01 -0700</pubDate>
    </item>
    <item>
      <title>Re: Cameras - Real and Virtual - Need Advice</title>
      <link>http://www.programmersheaven.com/mb/DirectX/381978/383832/ReadMessage.aspx#383832</link>
      <description>&lt;p&gt;Posted a '&lt;a href="http://www.programmersheaven.com/mb/DirectX/381978/383832/ReadMessage.aspx#383832"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/DirectX/Board.aspx"&gt;DirectX&lt;/a&gt; forum.&lt;/p&gt;Field of view and focal length are very interrelated. Here is a calculation for getting the right Field of view based on focal length and diagonal of camera &lt;a href="http://www.bdimitrov.de/kmp/technology/fov.html."&gt;http://www.bdimitrov.de/kmp/technology/fov.html.&lt;/a&gt; In your case you need a proper calculation. Although this may not get you the desired results it may get you results close to it. &lt;br /&gt;
&lt;br /&gt;
: I am working on a project to align real world cameras with their &lt;br /&gt;
: virtual counterparts rendered in Direct X.  This has gone fairly well &lt;br /&gt;
: and we currently have a test application with a real video camera &lt;br /&gt;
: looking at a flat wall and the same environment in a virtual &lt;br /&gt;
: environment.  The real world environment was measured (height of &lt;br /&gt;
: camera, distance to wall, height of wall, width of wall, FOV of &lt;br /&gt;
: camera) and these measurements were applied to the virtual (DirectX) &lt;br /&gt;
: environment.  It lines up nicely and putting tape on the wall to &lt;br /&gt;
: mark certain measurements lines up almost perfectly within virtual &lt;br /&gt;
: counterpart.&lt;br /&gt;
: &lt;br /&gt;
: This was our intial test, as we actually need to use the floor as &lt;br /&gt;
: our "mapped space".  We have a 16 foot square area of the floor &lt;br /&gt;
: taped out into 8x8 cells that are 2 feet square each.  At each &lt;br /&gt;
: corner of this grid will be one real camera.  These real cameras &lt;br /&gt;
: need to have virtual counterparts so that we can map clicks in the &lt;br /&gt;
: virtual "floor grid" to actual locations in the real world "floor &lt;br /&gt;
: grid".  The locations don't have to be exact, but at least able to &lt;br /&gt;
: know which cell was clicked on.  Translating our test from the flat &lt;br /&gt;
: wall to the floor, we measured everything again but realized that &lt;br /&gt;
: there is a problem when looking at the floor in the real camera &lt;br /&gt;
: view.  Mainly, the view of the floor is distorted compared to that &lt;br /&gt;
: of the wall.  (By "looking at the floor" I am not referring to &lt;br /&gt;
: tilting the camera down, merely having the camera look straight &lt;br /&gt;
: ahead and observing the floor in the image the camera is displaying) &lt;br /&gt;
: This, I believe, is due to the focal length of the camera.  I have a &lt;br /&gt;
: very limited understanding of photography and lenses so I am seeking &lt;br /&gt;
: any advice on how to compensate or correct this distortion so that &lt;br /&gt;
: our virtual and real environments can line up.  I imagine that this &lt;br /&gt;
: correction would be done by adjusting the DirectX code, but perhaps &lt;br /&gt;
: it is a fundamental issue that I am not aware of with my limited &lt;br /&gt;
: understanding of cameras and lenses.&lt;br /&gt;
: &lt;br /&gt;
: Any help and guidance with this issue would be most appreciated.&lt;br /&gt;
: &lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/DirectX/381978/383832/ReadMessage.aspx#383832</guid>
      <pubDate>Sat, 03 Jan 2009 20:00:32 -0700</pubDate>
    </item>
    <item>
      <title>Re: Desperately need help - OpenGl</title>
      <link>http://www.programmersheaven.com/mb/game/381777/381912/ReadMessage.aspx#381912</link>
      <description>&lt;p&gt;Posted the message '&lt;a href="http://www.programmersheaven.com/mb/game/381777/381912/ReadMessage.aspx#381912"&gt;Re: Desperately need help - OpenGl&lt;/a&gt;' on the &lt;a href="http://www.programmersheaven.com/mb/game/Board.aspx"&gt;Game programming&lt;/a&gt; forum.&lt;/p&gt;Hi,&lt;br /&gt;
&lt;br /&gt;
Its very simple. There are two types of projecttion - Perspective Projection and othograpics projection.&lt;br /&gt;
&lt;br /&gt;
Perspective Projection gives you a view like in the real world - further you go smaller it will look while Orthographics projection keeps the size in tact. However far in the world it goes - the size is the same.&lt;br /&gt;
&lt;br /&gt;
Now to do perspective projection you need to use gluPerspective in Opengl.&lt;br /&gt;
&lt;br /&gt;
Consider this diagram of the two types of viewing frustum. The cuboid/rectangular type is the Orthographics projection frustum while the other one is the perspective viewing frsutum.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.microsoft.com/msj/archive/opengl8.gif"&gt;http://www.microsoft.com/msj/archive/opengl8.gif&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Now lets get to the specific of gluPerspective - &lt;br /&gt;
gluPerspective( GLdouble	fovy,&lt;br /&gt;
			       GLdouble	aspect,&lt;br /&gt;
			       GLdouble	zNear,&lt;br /&gt;
			       GLdouble	zFar )&lt;br /&gt;
&lt;br /&gt;
fovy is field of view for the y direction. This is the amount that you would want to see. So it goes like this in terms of a diagram&lt;br /&gt;
&lt;br /&gt;
             &lt;br /&gt;
                            .&lt;br /&gt;
                         .   |   &lt;br /&gt;
                      .      |&lt;br /&gt;
                  .          |y direction&lt;br /&gt;
            eye.    ) angle  |       &lt;br /&gt;
                  .          |&lt;br /&gt;
                       .     |&lt;br /&gt;
                           . |&lt;br /&gt;
                             &lt;br /&gt;
The aspect ratio determines the angle or how much is visible to eye on the x direction. However in an application it needs to use something to determine thus so it uses the width/height as the factor to calculate this. Thus your aspect ratio becomes the application width divided by the application height. &lt;br /&gt;
&lt;br /&gt;
              |                     |&lt;br /&gt;
              |                     |&lt;br /&gt;
near clipping |                     | far clipping plane&lt;br /&gt;
plane         |                     |&lt;br /&gt;
zNear         |                     | zFar&lt;br /&gt;
              |                     |&lt;br /&gt;
           &lt;br /&gt;
zFar - Think of this as the horizon after which you cannot see anything. Anything outside of this value will be clipped meaning not rendered.&lt;br /&gt;
&lt;br /&gt;
zNear - This is the nearest point to the view/eye before which nothing will be visible.  &lt;br /&gt;
&lt;br /&gt;
So what you would do is do the following in opengl for gluPerspective for what you want&lt;br /&gt;
&lt;br /&gt;
gluPerspective(45.0f, width/height, 0.1f, 100.0f);&lt;br /&gt;
&lt;br /&gt;
And also set yourself at  (should be done after you call glClear(..) and before rendering anything.)&lt;br /&gt;
gluLookAt(0, 0, 5, 0, 0, 0, 0, 1, 0);&lt;br /&gt;
&lt;br /&gt;
Basically saying set the eye point at 0, 0, 5 pixels behind origin with center being 0, 0, 0 and Up vector being 0, 1, 0.&lt;br /&gt;
&lt;br /&gt;
Hope this helps&lt;br /&gt;
&lt;br /&gt;
: Hello!&lt;br /&gt;
: i'm a very-very beginning OpenGl programmer. &lt;br /&gt;
: And for making up first serious ( even somehow) programmes, i'd like &lt;br /&gt;
: to understand the basics.&lt;br /&gt;
: &lt;br /&gt;
: I competely do NOT understand how function &lt;strong&gt;GluPerspective&lt;/strong&gt; &lt;br /&gt;
: works. I mean, i know its usage in theory but i still can't use it &lt;br /&gt;
: the way it works as i need to.&lt;br /&gt;
: &lt;br /&gt;
: For instance, i have a cobe centered in (0,0,0), its heigth is 0.6. &lt;br /&gt;
: (so it crosses all the axes in points 0.3,-0.3).&lt;br /&gt;
: &lt;br /&gt;
: How should I call &lt;strong&gt;GluPerspective&lt;/strong&gt; to see the edges of the cube &lt;br /&gt;
: ( some of them in fron of the viewer)???&lt;br /&gt;
: &lt;br /&gt;
: And i do NOT understand the location of the viewer, i mean, the &lt;br /&gt;
: place i stand to see the scene ???&lt;br /&gt;
: &lt;br /&gt;
: Can anybody explane me , please?&lt;br /&gt;
: &lt;br /&gt;
: it's really urgent&lt;br /&gt;
: &lt;br /&gt;
: HUGE thanks&lt;br /&gt;
: &lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/game/381777/381912/ReadMessage.aspx#381912</guid>
      <pubDate>Sat, 15 Nov 2008 12:25:24 -0700</pubDate>
    </item>
    <item>
      <title>Re: Sun Shadow projection in openGL</title>
      <link>http://www.programmersheaven.com/mb/openGL/376267/376737/ReadMessage.aspx#376737</link>
      <description>&lt;p&gt;Posted the message '&lt;a href="http://www.programmersheaven.com/mb/openGL/376267/376737/ReadMessage.aspx#376737"&gt;Re: Sun Shadow projection in openGL&lt;/a&gt;' on the &lt;a href="http://www.programmersheaven.com/mb/openGL/Board.aspx"&gt;OpenGL&lt;/a&gt; forum.&lt;/p&gt;: hi all,&lt;br /&gt;
: &lt;br /&gt;
: I'm using openGL with VC++ 2008.I need to produce the sun shadow &lt;br /&gt;
: varying with time.i'm struggling to start..could anyone guide me...&lt;br /&gt;
: &lt;br /&gt;
&lt;br /&gt;
Try looking at HDR code samples in DirectX SDK, they could give you an idea on how to do it. You would have to use different sample data which needs to be varied with time probably</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/openGL/376267/376737/ReadMessage.aspx#376737</guid>
      <pubDate>Thu, 02 Oct 2008 05:04:17 -0700</pubDate>
    </item>
    <item>
      <title>Re: GDI+ to DirectX</title>
      <link>http://www.programmersheaven.com/mb/graphics/376463/376736/ReadMessage.aspx#376736</link>
      <description>&lt;p&gt;Posted the message '&lt;a href="http://www.programmersheaven.com/mb/graphics/376463/376736/ReadMessage.aspx#376736"&gt;Re: GDI+ to DirectX&lt;/a&gt;' on the &lt;a href="http://www.programmersheaven.com/mb/graphics/Board.aspx"&gt;Computer Graphics&lt;/a&gt; forum.&lt;/p&gt;It is possible. If you are using perspective projection and not orthographics projects then yeah the pixel position will be way different than the regular 2D screen that GDI will probably give you. If you can show the projection setup you are using then probably we can help more.&lt;br /&gt;
 &lt;br /&gt;
: I use GDI+ in my application, with visual basic .net 2005 , but now &lt;br /&gt;
: that im trying to create new functionalities, i'm using DirectX and &lt;br /&gt;
: Visual C#. I've encountered a big problem. The application is a &lt;br /&gt;
: medical application where the doctor has to click, with the mouse, &lt;br /&gt;
: in certain parts of an image. Those clicks will create points that &lt;br /&gt;
: the program will save in a database in order to later display them &lt;br /&gt;
: on screen. When i use directx and visual c#, the points aren't shown &lt;br /&gt;
: in their correct location. The points are a lot close together and &lt;br /&gt;
: in different locations. In GDI i was drawing on a picturebox and now &lt;br /&gt;
: i'm just drawing in a black screen. I've already summed (+) then &lt;br /&gt;
: picturebox.left and picturebox.top, but even that didn't work.  the &lt;br /&gt;
: picturebox  was drawing in pixels. Could directx be drawing in &lt;br /&gt;
: another measure?&lt;br /&gt;
: &lt;br /&gt;
: Can you please help?&lt;br /&gt;
: &lt;br /&gt;
: My thanks in advanced&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/graphics/376463/376736/ReadMessage.aspx#376736</guid>
      <pubDate>Thu, 02 Oct 2008 05:01:27 -0700</pubDate>
    </item>
    <item>
      <title>Re: Need help</title>
      <link>http://www.programmersheaven.com/mb/graphics/375528/375924/ReadMessage.aspx#375924</link>
      <description>&lt;p&gt;Posted the message '&lt;a href="http://www.programmersheaven.com/mb/graphics/375528/375924/ReadMessage.aspx#375924"&gt;Re: Need help &lt;/a&gt;' on the &lt;a href="http://www.programmersheaven.com/mb/graphics/Board.aspx"&gt;Computer Graphics&lt;/a&gt; forum.&lt;/p&gt;The biggest problem you will have is if you are trying to optimize. This http://en.wikipedia.org/wiki/Bresenham's_line_algorithm is a fairly simple and straightforward implementation or pseudocode. If you know a programming language its quite easy to implement it.&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
: I'm studying Computer Graphics at school. I've just got to know it, &lt;br /&gt;
: so plz help me solve this problem.&lt;br /&gt;
: I used the algorithm Bresenham to draw line -&amp;gt; drew a star when we &lt;br /&gt;
: know its diameter. The request is that count the number of square &lt;br /&gt;
: bricks (c x c) to hem the star (use Bresenham algorithm). Could you &lt;br /&gt;
: help me plz ?&lt;br /&gt;
: &lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/graphics/375528/375924/ReadMessage.aspx#375924</guid>
      <pubDate>Tue, 23 Sep 2008 11:09:57 -0700</pubDate>
    </item>
    <item>
      <title>Re: 'int&amp; const' can change from referee?</title>
      <link>http://www.programmersheaven.com/mb/CandCPP/373665/374164/ReadMessage.aspx#374164</link>
      <description>&lt;p&gt;Posted the message '&lt;a href="http://www.programmersheaven.com/mb/CandCPP/373665/374164/ReadMessage.aspx#374164"&gt;Re: 'int&amp; const' can change from referee?&lt;/a&gt;' on the &lt;a href="http://www.programmersheaven.com/mb/CandCPP/Board.aspx"&gt;C and C++&lt;/a&gt; forum.&lt;/p&gt;You might want to debug and see what its doing in assembly to get an idea of what boroland is doing. &lt;br /&gt;
&lt;br /&gt;
: : gcc spots the problem, and returns:&lt;br /&gt;
: : error: 'const' qualifiers cannot be applied to 'int&amp;amp;'.&lt;br /&gt;
: : &lt;br /&gt;
: : Also check out:&lt;br /&gt;
: : &lt;a href="http://www.parashift.com/c++-faq-lite/const-correctness.html#faq-18.7"&gt;http://www.parashift.com/c++-faq-lite/const-correctness.html#faq-18.7&lt;/a&gt;&lt;br /&gt;
: : Happy coding wishes&lt;br /&gt;
: : the one and only&lt;br /&gt;
: : &lt;strong&gt;Niklas Ulvinge&lt;/strong&gt; &lt;span style="color: White;"&gt;aka &lt;strong&gt;IDK&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
: &lt;br /&gt;
: Thank IDK for your excellent advice!&lt;br /&gt;
: &lt;br /&gt;
: Perhaps my compiler IS bad, as GCC and the FAQ Lite state that an &lt;br /&gt;
: 'int&amp;amp; const' is not possible/needed. The FAQ Lite, however, states &lt;br /&gt;
: that you cannot 'reseat a reference to make it refer to a different &lt;br /&gt;
: object' &lt;br /&gt;
: (http://www.parashift.com/c++-faq-lite/references.html#faq-8.5). If &lt;br /&gt;
: that is so, why can I?&lt;br /&gt;
: &lt;br /&gt;
: Why can I write the code below without warnings and errors?&lt;br /&gt;
: &lt;br /&gt;
: &lt;pre class="sourcecode"&gt;: 
: int x = 123;
: int&amp;amp; r = x; //Make r a reference to x
: 
: int y = 234; 
: r = y; //Reseat reference
: &lt;/pre&gt;: &lt;br /&gt;
: &lt;br /&gt;
: My guess is that my compiler (Borland BCC32) allows to write a &lt;br /&gt;
: reseat of a reference, but does not really do this. The code below &lt;br /&gt;
: shows my check.&lt;br /&gt;
: &lt;br /&gt;
: &lt;pre class="sourcecode"&gt;: 
: int x = 1; int&amp;amp; r = x;
: 
: assert(r==1);        //x == 1, so r == 1
: r = 2; assert(x==2); //r == 2, so x == 2
: x = 3; assert(r==3); //x == 3, so r == 3
: 
: int y = 4;
: r = y; //Reseat reference, but does it really?
: assert(r==4);        //y == 4, so r == 4
: y = 5; assert(r==5); //y == 5, so r == 5 //FAILS!
: r = 6; assert(y==6); //r == 6, so y == 6 //FAILS!
: &lt;/pre&gt;: &lt;br /&gt;
: &lt;br /&gt;
: Unless I overlook something, it might be time to switch to a &lt;br /&gt;
: different compiler &lt;img src="http://www.programmersheaven.com/images/Community/smile.gif" width="15" height="15" alt="" /&gt;.&lt;br /&gt;
: &lt;br /&gt;
: Thanks for your wisdom, &lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
: bilderbikkel&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/CandCPP/373665/374164/ReadMessage.aspx#374164</guid>
      <pubDate>Thu, 14 Aug 2008 12:58:57 -0700</pubDate>
    </item>
    <item>
      <title>Re: 3d icon colors overwrite each other</title>
      <link>http://www.programmersheaven.com/mb/DirectX/374105/374131/ReadMessage.aspx#374131</link>
      <description>&lt;p&gt;Posted the message '&lt;a href="http://www.programmersheaven.com/mb/DirectX/374105/374131/ReadMessage.aspx#374131"&gt;Re: 3d icon colors overwrite each other&lt;/a&gt;' on the &lt;a href="http://www.programmersheaven.com/mb/DirectX/Board.aspx"&gt;DirectX&lt;/a&gt; forum.&lt;/p&gt;: All,&lt;br /&gt;
: &lt;br /&gt;
: I have been importing 3d icons into NASA's World Wind application, &lt;br /&gt;
: but have run into a couple of issues.&lt;br /&gt;
: &lt;br /&gt;
: 1.  If I import a 3d box that is blue and then show a 3d box that is &lt;br /&gt;
: green, both boxes turn green.  In general, I realize that some &lt;br /&gt;
: attribute of the .x files must not be unique, which is causing the &lt;br /&gt;
: problem, but I am not sure what to change to make the .x files &lt;br /&gt;
: independent of each other when rendered.  I have been trying to &lt;br /&gt;
: dissect the .x file, which appears to be written in C++, but without &lt;br /&gt;
: success.&lt;br /&gt;
&lt;br /&gt;
Wrong - this is an issue of your importer or the software you are importing it into. Secondly .x file isn't written in C++ and you can find the file format on MSDN and also probably with the DirectX SDK documentations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
: 2.  Icons that appear animated in the directx viewer do not appear &lt;br /&gt;
: animated in World Wind.&lt;br /&gt;
&lt;br /&gt;
Again would be an issue with World Wind. Does it support animated icons? Does their example work properly.&lt;br /&gt;
&lt;br /&gt;
: &lt;br /&gt;
: I have already posted to World Wind forums, but no one has a clue &lt;br /&gt;
: about these problems.  I thought you guys might be able to give at &lt;br /&gt;
: least some insight on the color issue.&lt;br /&gt;
:&lt;br /&gt;
&lt;br /&gt;
Not really except that it could be overwriting the material or it expects you to import both boxes as in single scene rather than importing it separately, thus you would effectively have only 1 .x file. &lt;br /&gt;
 &lt;br /&gt;
: Thanks in advance,&lt;br /&gt;
: &lt;br /&gt;
: Lisa&lt;br /&gt;
: &lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/DirectX/374105/374131/ReadMessage.aspx#374131</guid>
      <pubDate>Wed, 13 Aug 2008 11:28:03 -0700</pubDate>
    </item>
    <item>
      <title>Re: Question of indexbuffer with matrix</title>
      <link>http://www.programmersheaven.com/mb/DirectX/373148/373152/ReadMessage.aspx#373152</link>
      <description>&lt;p&gt;Posted the message '&lt;a href="http://www.programmersheaven.com/mb/DirectX/373148/373152/ReadMessage.aspx#373152"&gt;Re: Question of indexbuffer with matrix&lt;/a&gt;' on the &lt;a href="http://www.programmersheaven.com/mb/DirectX/Board.aspx"&gt;DirectX&lt;/a&gt; forum.&lt;/p&gt;Whether its Index buffers or vertex buffers it works the same. So if you can show me the code how you are doing it I can tell you what you are doing wrong. &lt;br /&gt;
&lt;br /&gt;
It could be weird if your index buffer is wrong.&lt;br /&gt;
&lt;br /&gt;
: Hi everyone,&lt;br /&gt;
: this question make me so depressed. I want to draw a cube with &lt;br /&gt;
: vertexbuffer and indexbuffer. Its ok, but now I want to use Matrix &lt;br /&gt;
: to make cube transformation. The matrix dont work now. I cant use &lt;br /&gt;
: Worldmatrix make transformation, also use View- and ProjMatrix to &lt;br /&gt;
: change Viewport.&lt;br /&gt;
: ( use function &lt;br /&gt;
: DrawIndexedPrimitive(&lt;span style="color: Red;"&gt;D3DPT_TRIANGLELIST&lt;/span&gt;, .......) &lt;br /&gt;
: )No matter how set this three matrix, I can only see one face of &lt;br /&gt;
: cube and this cube is forever in the left-up corner.&lt;br /&gt;
: &lt;br /&gt;
: But if I render other primitives without indexbuffer, its ok. &lt;br /&gt;
: ( use function DrawPrimitive(&lt;span style="color: Red;"&gt;D3DPT_TRIANGLESTRIP&lt;/span&gt;, &lt;br /&gt;
: .......) )&lt;br /&gt;
: Why?&lt;br /&gt;
: &lt;br /&gt;
: I must work out every vertex position with matrix selbst when I use &lt;br /&gt;
: indexbuffer? Or maybe I forget something to set?&lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/DirectX/373148/373152/ReadMessage.aspx#373152</guid>
      <pubDate>Sat, 05 Jul 2008 01:46:01 -0700</pubDate>
    </item>
    <item>
      <title>Re: Question on PS3, Wii, 360 devkits...</title>
      <link>http://www.programmersheaven.com/mb/Console/373011/373063/ReadMessage.aspx#373063</link>
      <description>&lt;p&gt;Posted the message '&lt;a href="http://www.programmersheaven.com/mb/Console/373011/373063/ReadMessage.aspx#373063"&gt;Re: Question on PS3, Wii, 360 devkits...&lt;/a&gt;' on the &lt;a href="http://www.programmersheaven.com/mb/Console/Board.aspx"&gt;Console programming&lt;/a&gt; forum.&lt;/p&gt;Normally C/C++ is used. Knowing Asm helps a lot as there could be lots of instances when you have to look at Asm code. &lt;br /&gt;
&lt;br /&gt;
: : : What language are these platforms developed under? I heard it was &lt;br /&gt;
: : : the c language, but I'm not 100% positive. Reason I ask is because I &lt;br /&gt;
: : : recently finished a semester in Java to prepare me for C++, but now &lt;br /&gt;
: : : my teacher seems to want to lead me away from that language as if &lt;br /&gt;
: : : its not the right path for me to take. I am not sure if he has a &lt;br /&gt;
: : : gripe with Microsoft considering he's a big fan of Borland whom are &lt;br /&gt;
: : : competitors with them atm, but he has advised me to take Data &lt;br /&gt;
: : : Structures in Java over C++ for next semester. Would this be a good &lt;br /&gt;
: : : idea if my goal is to work as a dev for Nintendo or whoever else in &lt;br /&gt;
: : : less than 2-3 years?&lt;br /&gt;
: : : &lt;br /&gt;
: : Any knowledge of programming is helpful for any developer. The &lt;br /&gt;
: : language itself is not really important, since if you're good at &lt;br /&gt;
: : programming than learning a new language is not that difficult, &lt;br /&gt;
: : especially from Java to C/C++.&lt;br /&gt;
: : You should take as many lessons in Data Structures and algorithms as &lt;br /&gt;
: : possible, while honing your C/C++ skills at home, possibly &lt;br /&gt;
: : developing windows/linux games.&lt;br /&gt;
: &lt;br /&gt;
: Awesome!! Thank you.&lt;br /&gt;
: &lt;br /&gt;
: I actually picked out a programming magazine at Borders not too long &lt;br /&gt;
: ago and had a chance to see some c# renditions of Arkanoid. Needless &lt;br /&gt;
: to say, I found the similarities to Java to be ridiciously similar, &lt;br /&gt;
: so now I'm sure you both are correct. Thanks again.&lt;br /&gt;
: &lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Console/373011/373063/ReadMessage.aspx#373063</guid>
      <pubDate>Tue, 01 Jul 2008 07:31:36 -0700</pubDate>
    </item>
    <item>
      <title>Re: Video Convertor</title>
      <link>http://www.programmersheaven.com/mb/graphics/373024/373037/ReadMessage.aspx#373037</link>
      <description>&lt;p&gt;Posted the message '&lt;a href="http://www.programmersheaven.com/mb/graphics/373024/373037/ReadMessage.aspx#373037"&gt;Re: Video Convertor&lt;/a&gt;' on the &lt;a href="http://www.programmersheaven.com/mb/graphics/Board.aspx"&gt;Computer Graphics&lt;/a&gt; forum.&lt;/p&gt;Basically the details of FLV format and YUV format and some programming language.&lt;br /&gt;
&lt;br /&gt;
: Hi all,&lt;br /&gt;
: If I want to implement a application software that convert FLV &lt;br /&gt;
: format to YUV format, what do I need to learn? what do I need to &lt;br /&gt;
: know?&lt;br /&gt;
: &lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/graphics/373024/373037/ReadMessage.aspx#373037</guid>
      <pubDate>Mon, 30 Jun 2008 12:16:30 -0700</pubDate>
    </item>
    <item>
      <title>Re: DirectX9 and 2D rendering</title>
      <link>http://www.programmersheaven.com/mb/DirectX/372919/373029/ReadMessage.aspx#373029</link>
      <description>&lt;p&gt;Posted the message '&lt;a href="http://www.programmersheaven.com/mb/DirectX/372919/373029/ReadMessage.aspx#373029"&gt;Re: DirectX9 and 2D rendering&lt;/a&gt;' on the &lt;a href="http://www.programmersheaven.com/mb/DirectX/Board.aspx"&gt;DirectX&lt;/a&gt; forum.&lt;/p&gt;There is a function called glDrawPixels in OpenGL which is similar to what you are doing - If you go to "FAQ 22.070 Why are glDrawPixels() and glReadPixels() so slow?" it might answer your question partly. It gives a far better explanation than what I could give. &lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.opengl.org/resources/faq/technical/performance.htm"&gt;http://www.opengl.org/resources/faq/technical/performance.htm&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Also note that drawing triangles are optimized in the driver compared to drawing/updating only pixels. Even writing to texture probably will be optimized because it used to be quite common to write data into a texture from the framebuffer, but I am no sure because it has been quite some time since I did any graphics programming.  &lt;br /&gt;
&lt;br /&gt;
: &lt;br /&gt;
: In my case (emulator application) I NEED to somehow send the virtual &lt;br /&gt;
: screen buffer to the video card every frame, and it looks like the &lt;br /&gt;
: fastest way to do that in DirectX is updating a Surface, and then &lt;br /&gt;
: stretchRect it to the backbuffer. Call it "drawing pixel by pixel" &lt;br /&gt;
: or "sending a bunch of pixel" if you like, I don't have the choice. &lt;br /&gt;
: This is the base of the application: creating a 2D buffer each frame &lt;br /&gt;
: and display it on the monitor.&lt;br /&gt;
: &lt;br /&gt;
: You seem to prefer the quad version. Why do you think it would be &lt;br /&gt;
: faster ?&lt;br /&gt;
: Do you mean that lockcopy/unlock texture is faster than Surface ?&lt;br /&gt;
: If your texture is in system memory (which I agree may be really &lt;br /&gt;
: fast for lock/copy/unlock) it is be sent to the video ram each &lt;br /&gt;
: frame, right ?&lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
: : Use a quad and texture it. Drawing pixel by pixel or sending a bunch &lt;br /&gt;
: : of pixel from system memory is going to be too slow.&lt;br /&gt;
: : &lt;br /&gt;
: : By the way "Draw a texture as a sprite" and "drawing a textured &lt;br /&gt;
: : quad" is the same thing. &lt;br /&gt;
: : &lt;br /&gt;
: : And Use system memory :). I say this because read backs from the &lt;br /&gt;
: : device memory or graphics ram is going to be expensive. &lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/DirectX/372919/373029/ReadMessage.aspx#373029</guid>
      <pubDate>Mon, 30 Jun 2008 06:52:02 -0700</pubDate>
    </item>
    <item>
      <title>Re: DirectX9 and 2D rendering</title>
      <link>http://www.programmersheaven.com/mb/DirectX/372919/372978/ReadMessage.aspx#372978</link>
      <description>&lt;p&gt;Posted the message '&lt;a href="http://www.programmersheaven.com/mb/DirectX/372919/372978/ReadMessage.aspx#372978"&gt;Re: DirectX9 and 2D rendering&lt;/a&gt;' on the &lt;a href="http://www.programmersheaven.com/mb/DirectX/Board.aspx"&gt;DirectX&lt;/a&gt; forum.&lt;/p&gt;Use a quad and texture it. Drawing pixel by pixel or sending a bunch of pixel from system memory is going to be too slow.&lt;br /&gt;
&lt;br /&gt;
By the way "Draw a texture as a sprite" and "drawing a textured quad" is the same thing. &lt;br /&gt;
&lt;br /&gt;
And Use system memory :). I say this because read backs from the device memory or graphics ram is going to be expensive. &lt;br /&gt;
&lt;br /&gt;
: Thanks for the reply.&lt;br /&gt;
: &lt;br /&gt;
: And no, I'm not using a quad. In fact, I've seen so far 3 solutions &lt;br /&gt;
: to "render" a 2D buffer to the screen (with DirectX).&lt;br /&gt;
: - StretchRect a Surface to the backbuffer&lt;br /&gt;
: - Draw a texture as a sprite&lt;br /&gt;
: - Draw a textured quad (as you suggested)&lt;br /&gt;
: if someone as other alternatives....?&lt;br /&gt;
: &lt;br /&gt;
: Anyway, in all cases you have to lockRect/copy/Unlock a Texture or a &lt;br /&gt;
: Surface at one point. And i guess this is the critical point.&lt;br /&gt;
: So my question stays: should one has a Surface(or Texture) in the &lt;br /&gt;
: device memory and works with it, or else has one Surface(or texture) &lt;br /&gt;
: in system memory, works with it, and then "copies" it to a &lt;br /&gt;
: Surface(or texture) in device memory ?&lt;br /&gt;
: &lt;br /&gt;
: As for your question, no I don't lock a vertex buffer, I lock a &lt;br /&gt;
: Surface.&lt;br /&gt;
: My 2D array contains the color pixel information of the current &lt;br /&gt;
: frame of emulated device.&lt;br /&gt;
: &lt;br /&gt;
: Thanx&lt;br /&gt;
: &lt;br /&gt;
: : Q. Are you drawing pixels to the surface or creating a texture and &lt;br /&gt;
: : texture mapping a quad.&lt;br /&gt;
: : &lt;br /&gt;
: : Option 1. If you are doing this then you should really do a dirty &lt;br /&gt;
: : rectangle update and update only areas that have been modified. &lt;br /&gt;
: : Option 2. Instead of updating this way create a texture at runtime &lt;br /&gt;
: : and texture map a quad. I suppose this would be much much faster &lt;br /&gt;
: : than sending pixels to the screen. In my opinion you should probably &lt;br /&gt;
: : already be doing this.&lt;br /&gt;
: : &lt;br /&gt;
: : Regarding your second question - yeah you can do that using texture &lt;br /&gt;
: : mapping of triangles/quads. Its pretty common to do so. &lt;br /&gt;
: : &lt;br /&gt;
: : What is this 2D array - what does it contain and are you locking for &lt;br /&gt;
: : vertex buffers ? &lt;br /&gt;
: : &lt;br /&gt;
: : Sorry I am more of an OpenGL expert so its a little difficult to &lt;br /&gt;
: : answer DirectX questions without enough information. &lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/DirectX/372919/372978/ReadMessage.aspx#372978</guid>
      <pubDate>Sat, 28 Jun 2008 04:12:53 -0700</pubDate>
    </item>
    <item>
      <title>Re: DirectX9 and 2D rendering</title>
      <link>http://www.programmersheaven.com/mb/DirectX/372919/372936/ReadMessage.aspx#372936</link>
      <description>&lt;p&gt;Posted the message '&lt;a href="http://www.programmersheaven.com/mb/DirectX/372919/372936/ReadMessage.aspx#372936"&gt;Re: DirectX9 and 2D rendering&lt;/a&gt;' on the &lt;a href="http://www.programmersheaven.com/mb/DirectX/Board.aspx"&gt;DirectX&lt;/a&gt; forum.&lt;/p&gt;Q. Are you drawing pixels to the surface or creating a texture and texture mapping a quad.&lt;br /&gt;
&lt;br /&gt;
Option 1. If you are doing this then you should really do a dirty rectangle update and update only areas that have been modified. &lt;br /&gt;
Option 2. Instead of updating this way create a texture at runtime and texture map a quad. I suppose this would be much much faster than sending pixels to the screen. In my opinion you should probably already be doing this.&lt;br /&gt;
&lt;br /&gt;
Regarding your second question - yeah you can do that using texture mapping of triangles/quads. Its pretty common to do so. &lt;br /&gt;
&lt;br /&gt;
What is this 2D array - what does it contain and are you locking for vertex buffers ? &lt;br /&gt;
&lt;br /&gt;
Sorry I am more of an OpenGL expert so its a little difficult to answer DirectX questions without enough information. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
: Hi there,&lt;br /&gt;
: &lt;br /&gt;
: Let me try to explain my problem.&lt;br /&gt;
: My current application does the following.&lt;br /&gt;
: &lt;br /&gt;
: * Filling a 2D buffer (a C array)&lt;br /&gt;
: * Locking - copying the buffer - unlocking . of a Direct3D Surface &lt;br /&gt;
: in the default pool&lt;br /&gt;
: * Stretching of the Surface to the backbuffer&lt;br /&gt;
: &lt;br /&gt;
: And it works ... but with some problems on slower computers so I &lt;br /&gt;
: have to put a D3DLOCK_DONOTWAIT flag during the lock and just skip &lt;br /&gt;
: to the next frame if I get D3DERR_WASSTILLDRAWING error.&lt;br /&gt;
: &lt;br /&gt;
: Then I read on a documentation that locking Surfaces in the default &lt;br /&gt;
: pool may be resource consumming. So here is the new process:&lt;br /&gt;
: &lt;br /&gt;
: * Filling a 2D buffer&lt;br /&gt;
: * Locking - copying the buffer - unlocking . of a Direct3D Surface &lt;br /&gt;
: in the SYSTEMMEM pool&lt;br /&gt;
: * UpdateSurface from the SYSTEMMEM Surface to a DEFAULT_POOL surface&lt;br /&gt;
: * Stretching of the Surface to the backbuffer&lt;br /&gt;
: &lt;br /&gt;
: Well that's one more operation.&lt;br /&gt;
: In fact I would like to know if there is really a TOP efficient way &lt;br /&gt;
: to present 2D buffers at a fixed frame rate ?&lt;br /&gt;
: You got it, I'm working on an emulator program.&lt;br /&gt;
: &lt;br /&gt;
: Another issue is that whichever of the two solutions, I need to have &lt;br /&gt;
: a DEFAULTPOOL Surface of 1024x1024. That's pretty big for one &lt;br /&gt;
: surface I guess. 4Mb for 16bits colors, or 8Mb for 32bits colors. Is &lt;br /&gt;
: this more efficient to split in say 4 512x512 surfaces, or 16 &lt;br /&gt;
: 256x256 Surfaces, and repeat the Lock/Unlock(/Update)/Stretch &lt;br /&gt;
: operation as much time ?&lt;br /&gt;
: &lt;br /&gt;
: Sorry to rely on you guys but any help is ok.&lt;br /&gt;
: &lt;br /&gt;
: Joe&lt;br /&gt;
: Fo-su to tomo ni aran koto wo&lt;br /&gt;
: &lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/DirectX/372919/372936/ReadMessage.aspx#372936</guid>
      <pubDate>Thu, 26 Jun 2008 13:49:58 -0700</pubDate>
    </item>
    <item>
      <title>Re: Why doesn't the following work?</title>
      <link>http://www.programmersheaven.com/mb/DirectX/372279/372512/ReadMessage.aspx#372512</link>
      <description>&lt;p&gt;Posted the message '&lt;a href="http://www.programmersheaven.com/mb/DirectX/372279/372512/ReadMessage.aspx#372512"&gt;Re: Why doesn't the following work?&lt;/a&gt;' on the &lt;a href="http://www.programmersheaven.com/mb/DirectX/Board.aspx"&gt;DirectX&lt;/a&gt; forum.&lt;/p&gt;It looks fine - try modifying at and eye vectors of the following.  &lt;br /&gt;
&lt;br /&gt;
D3DXMatrixLookAtLH(&amp;amp;ViewM, &amp;amp;D3DXVECTOR3(0.0f, 0.0f, 10.0f), &amp;amp;D3DXVECTOR3(0.0f, 0.0f, 0.0f), &amp;amp;D3DXVECTOR3(0.0f, 1.0f, 0.0f));&lt;br /&gt;
&lt;br /&gt;
Also check if you get a triangle without rotating it and using triangles and not a strip.&lt;br /&gt;
&lt;br /&gt;
: Hiya guys,&lt;br /&gt;
: &lt;br /&gt;
: For some reason in the following code, the square doesn't show up no &lt;br /&gt;
: matter what I do! So could someone please point out my problem?&lt;br /&gt;
: &lt;br /&gt;
: &lt;pre class="sourcecode"&gt;: 
: #include &amp;lt;windows.h&amp;gt;
: #include &amp;lt;d3d9.h&amp;gt;
: #include &amp;lt;d3dx9.h&amp;gt;
: #pragma comment (lib, "d3d9.lib")
: #pragma comment (lib, "d3dx9.lib")
: #define ScreenW 640
: #define ScreenH 480
: #define CustomFVF (D3DFVF_XYZ | D3DFVF_TEX1)
: 
: const char *ClsName = "BasicApp";
: const char *WndName = "DirectX";
: 
: LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
: VOID InitD3D();
: VOID InitGraphics();
: VOID Display();
: VOID CleanProgram();
: 
: struct CustomV
: {
: 
:  FLOAT x, y, z;
:  FLOAT u, v;
: 
: };
: 
: LPDIRECT3D9 D3D;
: LPDIRECT3DDEVICE9 D3DDev;
: LPDIRECT3DVERTEXBUFFER9 SquareB;
: LPDIRECT3DTEXTURE9 TileT;
: D3DXMATRIX ViewM, ProjectionM;
: D3DPRESENT_PARAMETERS D3DPP;
: HINSTANCE hInstance;
: HWND hWnd;
: DWORD StartingCount;
: VOID* VertMemLoc;
: CustomV Square[] =
: {
: 
:  {3.0f, 3.0f, 1.0f, 0, 0, },
:  {-3.0f, 3.0f, 1.0f, 1, 0, },
:  {3.0f, -3.0f, 1.0f, 0, 1, },
:  {-3.0f, -3.0f, 1.0f, 1, 1, },
: 
: };
: 
: int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
: {
: 
:  MSG Msg;
:  WNDCLASSEX WndClsEx;
: 
:  // Create the application window
:  WndClsEx.cbSize = sizeof(WNDCLASSEX);
:  WndClsEx.style = CS_HREDRAW | CS_VREDRAW;
:  WndClsEx.lpfnWndProc = WndProc;
:  WndClsEx.cbClsExtra = 0;
:  WndClsEx.cbWndExtra = 0;
:  WndClsEx.hIcon = LoadIcon(NULL, IDI_APPLICATION);
:  WndClsEx.hCursor = LoadCursor(NULL, IDC_ARROW);
:  WndClsEx.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
:  WndClsEx.lpszMenuName = NULL;
:  WndClsEx.lpszClassName = ClsName;
:  WndClsEx.hInstance = hInstance;
:  WndClsEx.hIconSm = LoadIcon(NULL, IDI_APPLICATION);
: 
:  // Register the application
:  RegisterClassEx(&amp;amp;WndClsEx);
: 
:  // Create the window object
:  hWnd = CreateWindowEx(WS_EX_TOPMOST,
:  ClsName,
:  WndName,
:  WS_POPUP,
:  0,
:  0,
:  ScreenW,
:  ScreenH,
:  NULL,
:  NULL,
:  hInstance,
:  NULL); 
: 
:  // Find out if the window was created
:  if( !hWnd ) // If the window was not created,
:  return 0; // stop the application 
: 
:  // Display the window to the user
:  ShowWindow(hWnd, SW_SHOWNORMAL);
:  UpdateWindow(hWnd); 
:  InitD3D();
: 
:  // Decode and treat the messages
:  // as long as the application is running
:  while(true)
:  {
: 
:   StartingCount = GetTickCount();
: 
:   if (PeekMessage(&amp;amp;Msg, NULL, 0, 0, PM_REMOVE))
:   {
: 
:    if (Msg.message == WM_QUIT) break;
: 
:    TranslateMessage(&amp;amp;Msg);
:    DispatchMessage(&amp;amp;Msg);
: 
:   }
: 
:   Display();
: 
:   while((GetTickCount() - StartingCount) &amp;lt; 25);
: 
:  }
: 
:  CleanProgram();
: 
:  return Msg.wParam;
: 
: }
: 
: LRESULT CALLBACK WndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
: {
: 
:  switch (Msg) 
:  {
: 
:   case WM_DESTROY :
:   
:    PostQuitMessage(WM_QUIT);
:   
:   break;
: 
:   case WM_CLOSE :
: 
:    DestroyWindow(hWnd);
:  
:   break;
: 
:   case WM_KEYUP :
: 
:    switch(wParam)
:    {
: 
:     case VK_ESCAPE :
: 
:      DestroyWindow(hWnd);
:  
:     break;
: 
:    }  
: 
:   break;
: 
:  }
: 
:  return DefWindowProc(hWnd, Msg, wParam, lParam);
: 
: }
: 
: VOID InitD3D()
: {
: 
:  D3D = Direct3DCreate9(D3D_SDK_VERSION);
: 
:  ZeroMemory(&amp;amp;D3DPP, sizeof(D3DPP));
: 
:  D3DPP.Windowed = false;
:  D3DPP.SwapEffect = D3DSWAPEFFECT_DISCARD;
:  D3DPP.hDeviceWindow = hWnd;
:  D3DPP.BackBufferWidth = ScreenW;
:  D3DPP.BackBufferHeight = ScreenH;
:  D3DPP.BackBufferFormat = D3DFMT_X8R8G8B8;
:  D3DPP.EnableAutoDepthStencil = true;
:  D3DPP.AutoDepthStencilFormat = D3DFMT_D16;
: 
:  D3D-&amp;gt;CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &amp;amp;D3DPP, &amp;amp;D3DDev);
: 
:  InitGraphics();
: 
: }
: 
: VOID InitGraphics()
: {
: 
:  D3DDev-&amp;gt;CreateVertexBuffer(4 * sizeof(CustomV), NULL, CustomFVF, D3DPOOL_MANAGED, &amp;amp;SquareB, NULL);
:  SquareB-&amp;gt;Lock(NULL, NULL, &amp;amp;VertMemLoc, NULL);
: 
:  memcpy(VertMemLoc, Square, sizeof(Square));
: 
:  SquareB-&amp;gt;Unlock();
:  D3DDev-&amp;gt;SetRenderState(D3DRS_LIGHTING, false);
:  D3DDev-&amp;gt;SetRenderState(D3DRS_ZENABLE, true);
:    
:  D3DXCreateTextureFromFile(D3DDev, "C:\\Tile.bmp", &amp;amp;TileT);
: 
: }
: 
: VOID Display()
: {
: 
:  D3DXMatrixLookAtLH(&amp;amp;ViewM, &amp;amp;D3DXVECTOR3(0.0f, 0.0f, 10.0f), &amp;amp;D3DXVECTOR3(0.0f, 0.0f, 0.0f), &amp;amp;D3DXVECTOR3(0.0f, 1.0f, 0.0f));
:  D3DXMatrixPerspectiveFovLH(&amp;amp;ProjectionM, D3DXToRadian(45), (FLOAT)ScreenW / (FLOAT)ScreenH, 1.0f, 100.0f);
: 
:  D3DDev-&amp;gt;Clear(NULL, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, D3DCOLOR_XRGB(0, 0, 0), 1.0f, NULL);
:  D3DDev-&amp;gt;BeginScene();
:  D3DDev-&amp;gt;SetTransform(D3DTS_VIEW, &amp;amp;ViewM);
:  D3DDev-&amp;gt;SetTransform(D3DTS_PROJECTION, &amp;amp;ProjectionM);
:  D3DDev-&amp;gt;SetFVF(CustomFVF);
:  D3DDev-&amp;gt;SetStreamSource(NULL, SquareB, NULL, sizeof(Square));
:  D3DDev-&amp;gt;SetTexture(NULL, TileT);
:  D3DDev-&amp;gt;DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2);
:  D3DDev-&amp;gt;EndScene();
:  D3DDev-&amp;gt;Present(NULL, NULL, NULL, NULL);
: 
: }
: 
: VOID CleanProgram()
: {
:  
:  D3D-&amp;gt;Release();
:  D3DDev-&amp;gt;Release();
:  SquareB-&amp;gt;Release();
:  TileT-&amp;gt;Release();
: 
: }
: &lt;/pre&gt;: &lt;br /&gt;
: &lt;br /&gt;
: Any ideas?&lt;br /&gt;
: &lt;br /&gt;
: Thanks.&lt;br /&gt;
: &lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/DirectX/372279/372512/ReadMessage.aspx#372512</guid>
      <pubDate>Sun, 08 Jun 2008 11:48:42 -0700</pubDate>
    </item>
    <item>
      <title>Re: Reversed Axis Direction???</title>
      <link>http://www.programmersheaven.com/mb/openGL/371819/372120/ReadMessage.aspx#372120</link>
      <description>&lt;p&gt;Posted the message '&lt;a href="http://www.programmersheaven.com/mb/openGL/371819/372120/ReadMessage.aspx#372120"&gt;Re: Reversed Axis Direction???&lt;/a&gt;' on the &lt;a href="http://www.programmersheaven.com/mb/openGL/Board.aspx"&gt;OpenGL&lt;/a&gt; forum.&lt;/p&gt;Not necessarily true. Any axes can be x, y, z in 3D Computer graphics. I have worked with almost all system and each have their own crazy notion. Many prefer to have y and z swapped. &lt;br /&gt;
&lt;br /&gt;
If you are using 3DS Max to make the landscape then probably your y and z need to swapped and negate the swapped z value. Or you can just build forward, up and right vector on the basis of the axis of the landscape.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
: Hi&lt;br /&gt;
: &lt;br /&gt;
: I'm modelling a landscape in openGL but the X axis appears to have &lt;br /&gt;
: been reversed. As far as I know the axes are supposed to be laid out &lt;br /&gt;
: like so (positive values):&lt;br /&gt;
: &lt;br /&gt;
: Y  Z&lt;br /&gt;
: | /&lt;br /&gt;
: |/&lt;br /&gt;
: '----X&lt;br /&gt;
: &lt;br /&gt;
: however, in my model, the X axis is reversed.&lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
: Any ideas why this has happened and how I can correct it?&lt;br /&gt;
: &lt;br /&gt;
: Thanks!&lt;br /&gt;
: &lt;br /&gt;
: edit: it has occurred to me that possibly it is the z axis that is &lt;br /&gt;
: reversed and my idea of the axes was wrong..?&lt;br /&gt;
: &lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/openGL/371819/372120/ReadMessage.aspx#372120</guid>
      <pubDate>Thu, 22 May 2008 13:34:09 -0700</pubDate>
    </item>
  </channel>
</rss>