Changeset 1229


Ignore:
Timestamp:
Apr 15, 2012, 1:27:45 AM (8 years ago)
Author:
sam
Message:

build: minor Windows compilation fixes.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/deushax/deushax.cpp

    r1040 r1229  
    4141    new DebugFps(10, 10);
    4242    new DebugSprite(game);
    43     new DebugSphere();
     43    //new DebugSphere();
    4444    //new DebugRecord("lolengine.ogm", FPS);
    4545    new DebugStats("stats.txt");
  • trunk/src/gradient.cpp

    r1228 r1229  
    1515#include <cmath>
    1616
     17#ifdef WIN32
     18#   define WIN32_LEAN_AND_MEAN
     19#   include <windows.h>
     20#   if defined USE_D3D9
     21#       include <algorithm>
     22        using std::min;
     23        using std::max;
     24#       include <d3d9.h>
     25#       include <d3dx9shader.h>
     26#   endif
     27#endif
     28
    1729#include "core.h"
    1830#include "lolgl.h"
    1931
    2032using namespace std;
     33
     34#if defined USE_D3D9
     35extern IDirect3DDevice9 *g_d3ddevice;
     36#elif defined _XBOX
     37extern D3DDevice *g_d3ddevice;
     38#endif
    2139
    2240namespace lol
     
    204222
    205223    /* Draw arrays */
     224#if defined _XBOX || defined USE_D3D9
     225    g_d3ddevice->DrawPrimitive(D3DPT_TRIANGLELIST, 0, 2);
     226#else
    206227    glDrawArrays(GL_TRIANGLES, 0, 6);
     228#endif
    207229}
    208230
  • trunk/test/tutorial/tut03.cpp

    r1228 r1229  
    428428    virtual void TickDraw(float deltams)
    429429    {
    430 Log::Error("Tick Fractal\n");
    431430        WorldEntity::TickDraw(deltams);
    432431
     
    608607                "}"
    609608#else
    610                 "void main(float4 a_Vertex : POSITION,"
     609                "void main(float2 a_Vertex : POSITION,"
    611610                "          float2 a_TexCoord : TEXCOORD0,"
    612611                "          uniform float4x4 u_ZoomSettings,"
     
    619618                "          out float4 v_IndexY : TEXCOORD3)"
    620619                "{"
    621                 "    out_Position = a_Vertex;"
     620                "    out_Position = float4(a_Vertex, 0.0, 1.0);"
    622621                "    float4 offsets = float4(0.5, -0.5, 0.015625, -0.015625);"
    623622                "    float4 zoomscale = float4(u_ZoomSettings[2][0],"
     
    746745#if defined _XBOX || defined USE_D3D9
    747746        g_d3ddevice->SetTexture(0, m_tex);
    748         //g_d3ddevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_CW);
    749         g_d3ddevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE);
     747        g_d3ddevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_CW);
    750748#elif !defined __CELLOS_LV2__ && !defined __ANDROID__
    751749#else
     
    757755
    758756#if defined _XBOX || defined USE_D3D9
    759         /* FIXME: what the fuck? Why does "2" not work here instead of 3? */
    760         g_d3ddevice->DrawPrimitive(D3DPT_TRIANGLELIST, 0, 3);
     757        g_d3ddevice->DrawPrimitive(D3DPT_TRIANGLELIST, 0, 2);
    761758#else
    762759        glDrawArrays(GL_TRIANGLES, 0, 6);
     
    778775        //glDisableClientState(GL_TEXTURE_COORD_ARRAY);
    779776#endif
    780 Log::Error("~Tick Fractal\n");
    781777    }
    782778
Note: See TracChangeset for help on using the changeset viewer.