Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
angle
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
angle
Commits
58f76fe0
Commit
58f76fe0
authored
Jun 21, 2011
by
daniel@transgaming.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix 64-bit support.
Bug=55 TRAC #15606 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id:
https://angleproject.googlecode.com/svn/trunk@697
736b8ea6-26fd-11df-bfd4-992fa37f6226
parent
216aa5ed
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
22 deletions
+22
-22
version.h
src/common/version.h
+1
-1
Surface.cpp
src/libEGL/Surface.cpp
+4
-4
VertexDataManager.cpp
src/libGLESv2/VertexDataManager.cpp
+4
-4
VertexDataManager.h
src/libGLESv2/VertexDataManager.h
+13
-13
No files found.
src/common/version.h
View file @
58f76fe0
#define MAJOR_VERSION 0
#define MAJOR_VERSION 0
#define MINOR_VERSION 0
#define MINOR_VERSION 0
#define BUILD_VERSION 0
#define BUILD_VERSION 0
#define BUILD_REVISION 69
6
#define BUILD_REVISION 69
7
#define STRINGIFY(x) #x
#define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x)
#define MACRO_STRINGIFY(x) STRINGIFY(x)
...
...
src/libEGL/Surface.cpp
View file @
58f76fe0
...
@@ -307,7 +307,7 @@ void Surface::subclassWindow()
...
@@ -307,7 +307,7 @@ void Surface::subclassWindow()
}
}
SetLastError
(
0
);
SetLastError
(
0
);
LONG
oldWndProc
=
SetWindowLong
(
mWindow
,
GWL_WNDPROC
,
reinterpret_cast
<
LONG
>
(
SurfaceWindowProc
));
LONG
_PTR
oldWndProc
=
SetWindowLongPtr
(
mWindow
,
GWLP_WNDPROC
,
reinterpret_cast
<
LONG_PTR
>
(
SurfaceWindowProc
));
if
(
oldWndProc
==
0
&&
GetLastError
()
!=
ERROR_SUCCESS
)
if
(
oldWndProc
==
0
&&
GetLastError
()
!=
ERROR_SUCCESS
)
{
{
mWindowSubclassed
=
false
;
mWindowSubclassed
=
false
;
...
@@ -327,7 +327,7 @@ void Surface::unsubclassWindow()
...
@@ -327,7 +327,7 @@ void Surface::unsubclassWindow()
}
}
// un-subclass
// un-subclass
LONG
parentWndFunc
=
reinterpret_cast
<
LONG
>
(
GetProp
(
mWindow
,
kParentWndProc
));
LONG
_PTR
parentWndFunc
=
reinterpret_cast
<
LONG_PTR
>
(
GetProp
(
mWindow
,
kParentWndProc
));
// Check the windowproc is still SurfaceWindowProc.
// Check the windowproc is still SurfaceWindowProc.
// If this assert fails, then it is likely the application has subclassed the
// If this assert fails, then it is likely the application has subclassed the
...
@@ -336,8 +336,8 @@ void Surface::unsubclassWindow()
...
@@ -336,8 +336,8 @@ void Surface::unsubclassWindow()
// EGL context, or to unsubclass before destroying the EGL context.
// EGL context, or to unsubclass before destroying the EGL context.
if
(
parentWndFunc
)
if
(
parentWndFunc
)
{
{
LONG
prevWndFunc
=
SetWindowLong
(
mWindow
,
GWL
_WNDPROC
,
parentWndFunc
);
LONG
_PTR
prevWndFunc
=
SetWindowLongPtr
(
mWindow
,
GWLP
_WNDPROC
,
parentWndFunc
);
ASSERT
(
prevWndFunc
==
reinterpret_cast
<
LONG
>
(
SurfaceWindowProc
));
ASSERT
(
prevWndFunc
==
reinterpret_cast
<
LONG
_PTR
>
(
SurfaceWindowProc
));
}
}
RemoveProp
(
mWindow
,
kSurfaceProperty
);
RemoveProp
(
mWindow
,
kSurfaceProperty
);
...
...
src/libGLESv2/VertexDataManager.cpp
View file @
58f76fe0
...
@@ -55,14 +55,14 @@ VertexDataManager::~VertexDataManager()
...
@@ -55,14 +55,14 @@ VertexDataManager::~VertexDataManager()
}
}
}
}
UINT
VertexDataManager
::
writeAttributeData
(
ArrayVertexBuffer
*
vertexBuffer
,
GLint
start
,
GLsizei
count
,
const
VertexAttribute
&
attribute
)
std
::
size_t
VertexDataManager
::
writeAttributeData
(
ArrayVertexBuffer
*
vertexBuffer
,
GLint
start
,
GLsizei
count
,
const
VertexAttribute
&
attribute
)
{
{
Buffer
*
buffer
=
attribute
.
mBoundBuffer
.
get
();
Buffer
*
buffer
=
attribute
.
mBoundBuffer
.
get
();
int
inputStride
=
attribute
.
stride
();
int
inputStride
=
attribute
.
stride
();
int
elementSize
=
attribute
.
typeSize
();
int
elementSize
=
attribute
.
typeSize
();
const
FormatConverter
&
converter
=
formatConverter
(
attribute
);
const
FormatConverter
&
converter
=
formatConverter
(
attribute
);
UINT
streamOffset
=
0
;
std
::
size_t
streamOffset
=
0
;
void
*
output
=
NULL
;
void
*
output
=
NULL
;
...
@@ -189,7 +189,7 @@ GLenum VertexDataManager::prepareVertexData(GLint start, GLsizei count, Translat
...
@@ -189,7 +189,7 @@ GLenum VertexDataManager::prepareVertexData(GLint start, GLsizei count, Translat
StaticVertexBuffer
*
staticBuffer
=
buffer
?
buffer
->
getStaticVertexBuffer
()
:
NULL
;
StaticVertexBuffer
*
staticBuffer
=
buffer
?
buffer
->
getStaticVertexBuffer
()
:
NULL
;
ArrayVertexBuffer
*
vertexBuffer
=
staticBuffer
?
staticBuffer
:
static_cast
<
ArrayVertexBuffer
*>
(
mStreamingBuffer
);
ArrayVertexBuffer
*
vertexBuffer
=
staticBuffer
?
staticBuffer
:
static_cast
<
ArrayVertexBuffer
*>
(
mStreamingBuffer
);
UINT
streamOffset
=
-
1
;
std
::
size_t
streamOffset
=
-
1
;
if
(
staticBuffer
)
if
(
staticBuffer
)
{
{
...
@@ -662,7 +662,7 @@ StaticVertexBuffer::~StaticVertexBuffer()
...
@@ -662,7 +662,7 @@ StaticVertexBuffer::~StaticVertexBuffer()
{
{
}
}
void
*
StaticVertexBuffer
::
map
(
const
VertexAttribute
&
attribute
,
std
::
size_t
requiredSpace
,
UINT
*
streamOffset
)
void
*
StaticVertexBuffer
::
map
(
const
VertexAttribute
&
attribute
,
std
::
size_t
requiredSpace
,
std
::
size_t
*
streamOffset
)
{
{
void
*
mapPtr
=
NULL
;
void
*
mapPtr
=
NULL
;
...
...
src/libGLESv2/VertexDataManager.h
View file @
58f76fe0
...
@@ -35,7 +35,7 @@ struct TranslatedAttribute
...
@@ -35,7 +35,7 @@ struct TranslatedAttribute
class
VertexBuffer
class
VertexBuffer
{
{
public
:
public
:
VertexBuffer
(
IDirect3DDevice9
*
device
,
UINT
size
,
DWORD
usageFlags
);
VertexBuffer
(
IDirect3DDevice9
*
device
,
std
::
size_t
size
,
DWORD
usageFlags
);
virtual
~
VertexBuffer
();
virtual
~
VertexBuffer
();
void
unmap
();
void
unmap
();
...
@@ -60,28 +60,28 @@ class ConstantVertexBuffer : public VertexBuffer
...
@@ -60,28 +60,28 @@ class ConstantVertexBuffer : public VertexBuffer
class
ArrayVertexBuffer
:
public
VertexBuffer
class
ArrayVertexBuffer
:
public
VertexBuffer
{
{
public
:
public
:
ArrayVertexBuffer
(
IDirect3DDevice9
*
device
,
UINT
size
,
DWORD
usageFlags
);
ArrayVertexBuffer
(
IDirect3DDevice9
*
device
,
std
::
size_t
size
,
DWORD
usageFlags
);
~
ArrayVertexBuffer
();
~
ArrayVertexBuffer
();
UINT
size
()
const
{
return
mBufferSize
;
}
std
::
size_t
size
()
const
{
return
mBufferSize
;
}
virtual
void
*
map
(
const
VertexAttribute
&
attribute
,
UINT
requiredSpace
,
UINT
*
streamOffset
)
=
0
;
virtual
void
*
map
(
const
VertexAttribute
&
attribute
,
std
::
size_t
requiredSpace
,
std
::
size_t
*
streamOffset
)
=
0
;
virtual
void
reserveRequiredSpace
()
=
0
;
virtual
void
reserveRequiredSpace
()
=
0
;
void
addRequiredSpace
(
UINT
requiredSpace
);
void
addRequiredSpace
(
UINT
requiredSpace
);
void
addRequiredSpaceFor
(
ArrayVertexBuffer
*
buffer
);
void
addRequiredSpaceFor
(
ArrayVertexBuffer
*
buffer
);
protected
:
protected
:
UINT
mBufferSize
;
std
::
size_t
mBufferSize
;
UINT
mWritePosition
;
std
::
size_t
mWritePosition
;
UINT
mRequiredSpace
;
std
::
size_t
mRequiredSpace
;
};
};
class
StreamingVertexBuffer
:
public
ArrayVertexBuffer
class
StreamingVertexBuffer
:
public
ArrayVertexBuffer
{
{
public
:
public
:
StreamingVertexBuffer
(
IDirect3DDevice9
*
device
,
UINT
initialSize
);
StreamingVertexBuffer
(
IDirect3DDevice9
*
device
,
std
::
size_t
initialSize
);
~
StreamingVertexBuffer
();
~
StreamingVertexBuffer
();
void
*
map
(
const
VertexAttribute
&
attribute
,
UINT
requiredSpace
,
UINT
*
streamOffset
);
void
*
map
(
const
VertexAttribute
&
attribute
,
std
::
size_t
requiredSpace
,
std
::
size_t
*
streamOffset
);
void
reserveRequiredSpace
();
void
reserveRequiredSpace
();
};
};
...
@@ -91,7 +91,7 @@ class StaticVertexBuffer : public ArrayVertexBuffer
...
@@ -91,7 +91,7 @@ class StaticVertexBuffer : public ArrayVertexBuffer
explicit
StaticVertexBuffer
(
IDirect3DDevice9
*
device
);
explicit
StaticVertexBuffer
(
IDirect3DDevice9
*
device
);
~
StaticVertexBuffer
();
~
StaticVertexBuffer
();
void
*
map
(
const
VertexAttribute
&
attribute
,
UINT
requiredSpace
,
UINT
*
streamOffset
);
void
*
map
(
const
VertexAttribute
&
attribute
,
std
::
size_t
requiredSpace
,
std
::
size_t
*
streamOffset
);
void
reserveRequiredSpace
();
void
reserveRequiredSpace
();
UINT
lookupAttribute
(
const
VertexAttribute
&
attribute
);
// Returns the offset into the vertex buffer, or -1 if not found
UINT
lookupAttribute
(
const
VertexAttribute
&
attribute
);
// Returns the offset into the vertex buffer, or -1 if not found
...
@@ -104,7 +104,7 @@ class StaticVertexBuffer : public ArrayVertexBuffer
...
@@ -104,7 +104,7 @@ class StaticVertexBuffer : public ArrayVertexBuffer
bool
normalized
;
bool
normalized
;
int
attributeOffset
;
int
attributeOffset
;
UINT
streamOffset
;
std
::
size_t
streamOffset
;
};
};
std
::
vector
<
VertexElement
>
mCache
;
std
::
vector
<
VertexElement
>
mCache
;
...
@@ -123,8 +123,8 @@ class VertexDataManager
...
@@ -123,8 +123,8 @@ class VertexDataManager
private
:
private
:
DISALLOW_COPY_AND_ASSIGN
(
VertexDataManager
);
DISALLOW_COPY_AND_ASSIGN
(
VertexDataManager
);
UINT
spaceRequired
(
const
VertexAttribute
&
attrib
,
std
::
size_t
count
)
const
;
std
::
size_t
spaceRequired
(
const
VertexAttribute
&
attrib
,
std
::
size_t
count
)
const
;
UINT
writeAttributeData
(
ArrayVertexBuffer
*
vertexBuffer
,
GLint
start
,
GLsizei
count
,
const
VertexAttribute
&
attribute
);
std
::
size_t
writeAttributeData
(
ArrayVertexBuffer
*
vertexBuffer
,
GLint
start
,
GLsizei
count
,
const
VertexAttribute
&
attribute
);
Context
*
const
mContext
;
Context
*
const
mContext
;
IDirect3DDevice9
*
const
mDevice
;
IDirect3DDevice9
*
const
mDevice
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment