nel-all
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nel] linux patch and ati card issues


From: Alban Lecocq
Subject: [Nel] linux patch and ati card issues
Date: Mon, 22 Mar 2004 17:16:35 +0100
User-agent: Mozilla Thunderbird 0.5 (Windows/20040207)

Hi, this Week End  I have re-compile nel on my linux box, and I got some
errors, so I send the patch I've made to ml :

nel/src/3d/vertex_buffer.h :
line 77 : CRefPtr<CVertexBuffer>
CVertexBuffer not fully defined => move the class declaration of
CVertexBuffer above this line

nel/src/3d/driver/opengl/driver_opengl.cpp
DEVMODE    devmode;
windows only stuf : added ifdef NL_OS_WINDOWS as other function does
with a nlwarning under linux

This one is not a compile error , but a warning valgrind saif to me :
nel/src/misc/file.cpp
line 90 :     _Cache = new uint8[_FileSize];
but line 261 :             delete _Cache;

so i just added the [] to delete

Now, for something completely different, on windows I have recompile the
latest nel version to get the d3d driver.
It works just fine with my gf2mx but with an ati 9700, if I use the
opengl driver I got a lot of crazy/random triangles filling my screen
and with d3d driver the water reflection is no more, so I'm wondering if
you know those probs with ati card (with an older nel version (opengl
only driver) I don't have any prob) or does anyone else got this kind of
probleme on mailing list.

Thanks

Skeet







Index: nel/src/3d/vertex_buffer.h
===================================================================
RCS file: /home/cvsroot/code/nel/src/3d/vertex_buffer.h,v
retrieving revision 1.12
diff -u -r1.12 vertex_buffer.h
--- nel/src/3d/vertex_buffer.h  19 Mar 2004 10:11:36 -0000      1.12
+++ nel/src/3d/vertex_buffer.h  22 Mar 2004 15:02:28 -0000
@@ -66,36 +66,6 @@
 typedef        TVBDrvInfoPtrList::iterator             ItVBDrvInfoPtrList;
 
 
-// *** IMPORTANT ********************
-// *** IF YOU MODIFY THE STRUCTURE OF THIS CLASS, PLEASE INCREMENT 
IDriver::InterfaceVersion TO INVALIDATE OLD DRIVER DLL
-// **********************************
-class IVBDrvInfos : public CRefCount
-{
-private:
-       IDriver                         *_Driver;
-       ItVBDrvInfoPtrList      _DriverIterator;
-       CRefPtr<CVertexBuffer>  _VertexBuffer;
-
-public:
-       IVBDrvInfos(IDriver     *drv, ItVBDrvInfoPtrList it, CVertexBuffer *vb) 
{_Driver= drv; _DriverIterator= it; _VertexBuffer = vb;}
-
-       /** Lock method.
-         * \param first is the first vertex to be accessed. Put 0 to select 
all the vertices. What ever is this index, 
-         * the indexices in the vertex buffer remain the same.
-         * \param last is the last vertex to be accessed + 1. Put 0 to select 
all the vertices.
-         */
-       virtual uint8   *lock (uint first, uint last, bool readOnly) =0;
-
-       /** Unlock method.
-         * \param first is the index of the first vertices to update. 0 to 
update all the vertices.
-         * \param last is the index of the last vertices to update + 1. 0 to 
update all the vertices.
-         */
-       virtual void    unlock (uint first, uint last) =0;
-
-       // The virtual dtor is important.
-       virtual ~IVBDrvInfos();
-};
-
 
 // ***************************************************************************
 /** Describe index for palette skinning.
@@ -677,6 +647,37 @@
        // Debug string
        std::string                             _Name;
 };
+
+// *** IMPORTANT ********************
+// *** IF YOU MODIFY THE STRUCTURE OF THIS CLASS, PLEASE INCREMENT 
IDriver::InterfaceVersion TO INVALIDATE OLD DRIVER DLL
+// **********************************
+class IVBDrvInfos : public CRefCount
+{
+private:
+       IDriver                         *_Driver;
+       ItVBDrvInfoPtrList      _DriverIterator;
+       CRefPtr<CVertexBuffer>  _VertexBuffer;
+
+public:
+       IVBDrvInfos(IDriver     *drv, ItVBDrvInfoPtrList it, CVertexBuffer *vb) 
{_Driver= drv; _DriverIterator= it; _VertexBuffer = vb;}
+
+       /** Lock method.
+         * \param first is the first vertex to be accessed. Put 0 to select 
all the vertices. What ever is this index, 
+         * the indexices in the vertex buffer remain the same.
+         * \param last is the last vertex to be accessed + 1. Put 0 to select 
all the vertices.
+         */
+       virtual uint8   *lock (uint first, uint last, bool readOnly) =0;
+
+       /** Unlock method.
+         * \param first is the index of the first vertices to update. 0 to 
update all the vertices.
+         * \param last is the index of the last vertices to update + 1. 0 to 
update all the vertices.
+         */
+       virtual void    unlock (uint first, uint last) =0;
+
+       // The virtual dtor is important.
+       virtual ~IVBDrvInfos();
+};
+
 
 /**
  * The vertex buffer accessor read / write

Index: nel/src/misc/file.cpp
===================================================================
RCS file: /home/cvsroot/code/nel/src/misc/file.cpp,v
retrieving revision 1.37
diff -u -r1.37 file.cpp
--- nel/src/misc/file.cpp       28 Jan 2004 18:09:02 -0000      1.37
+++ nel/src/misc/file.cpp       22 Mar 2004 15:10:37 -0000
@@ -258,7 +258,7 @@
        {
                if (_Cache)
                {
-                       delete _Cache;
+                       delete[] _Cache;
                        _Cache = NULL;
                }
        }

Index: nel/src/3d/driver/opengl/driver_opengl.cpp
===================================================================
RCS file: /home/cvsroot/code/nel/src/3d/driver/opengl/driver_opengl.cpp,v
retrieving revision 1.205
diff -u -r1.205 driver_opengl.cpp
--- nel/src/3d/driver/opengl/driver_opengl.cpp  19 Mar 2004 17:50:32 -0000      
1.205
+++ nel/src/3d/driver/opengl/driver_opengl.cpp  22 Mar 2004 15:06:11 -0000
@@ -1419,6 +1419,7 @@
 // --------------------------------------------------
 bool CDriverGL::getCurrentScreenMode(GfxMode &mode)
 {
+#ifdef NL_OS_WINDOWS
        DEVMODE devmode;
        devmode.dmSize= sizeof(DEVMODE);
        devmode.dmDriverExtra= 0;
@@ -1431,6 +1432,9 @@
        mode.Width= (uint16)devmode.dmPelsWidth;
        mode.Height= (uint16)devmode.dmPelsHeight;
 
+#else
+       nlwarning("LINUXTODO: enumerate all available modes. now returns empty 
array");
+#endif
        return true;
 }
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]