Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Suyu
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
many-archive
Suyu
Commits
71b87898
There was an error fetching the commit references. Please try again later.
Commit
71b87898
authored
10 years ago
by
archshift
Browse files
Options
Downloads
Patches
Plain Diff
Indent fixes
parent
603ef89d
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+1
-1
1 addition, 1 deletion
CMakeLists.txt
externals/cmake-modules/FindGLEW.cmake
+29
-29
29 additions, 29 deletions
externals/cmake-modules/FindGLEW.cmake
src/video_core/utils.cpp
+31
-31
31 additions, 31 deletions
src/video_core/utils.cpp
with
61 additions
and
61 deletions
CMakeLists.txt
+
1
−
1
View file @
71b87898
...
@@ -23,7 +23,7 @@ pkg_search_module(GLFW REQUIRED glfw3)
...
@@ -23,7 +23,7 @@ pkg_search_module(GLFW REQUIRED glfw3)
IF
(
APPLE
)
IF
(
APPLE
)
FIND_LIBRARY
(
COREFOUNDATION_LIBRARY CoreFoundation
)
FIND_LIBRARY
(
COREFOUNDATION_LIBRARY CoreFoundation
)
SET
(
CMAKE_CXX_FLAGS
"-stdlib=libc++"
)
SET
(
CMAKE_CXX_FLAGS
"-stdlib=libc++"
)
SET
(
CMAKE_EXE_LINKER_FLAGS
"-stdlib=libc++"
)
SET
(
CMAKE_EXE_LINKER_FLAGS
"-stdlib=libc++"
)
ENDIF
(
APPLE
)
ENDIF
(
APPLE
)
#external includes
#external includes
...
...
This diff is collapsed.
Click to expand it.
externals/cmake-modules/FindGLEW.cmake
+
29
−
29
View file @
71b87898
...
@@ -8,40 +8,40 @@
...
@@ -8,40 +8,40 @@
#
#
IF
(
WIN32
)
IF
(
WIN32
)
FIND_PATH
(
GLEW_INCLUDE_PATH GL/glew.h
FIND_PATH
(
GLEW_INCLUDE_PATH GL/glew.h
$ENV{PROGRAMFILES}/GLEW/include
$ENV{PROGRAMFILES}/GLEW/include
${
PROJECT_SOURCE_DIR
}
/src/nvgl/glew/include
${
PROJECT_SOURCE_DIR
}
/src/nvgl/glew/include
DOC
"The directory where GL/glew.h resides"
)
DOC
"The directory where GL/glew.h resides"
)
FIND_LIBRARY
(
GLEW_LIBRARY
FIND_LIBRARY
(
GLEW_LIBRARY
NAMES glew GLEW glew32 glew32s
NAMES glew GLEW glew32 glew32s
PATHS
PATHS
$ENV{PROGRAMFILES}/GLEW/lib
$ENV{PROGRAMFILES}/GLEW/lib
${
PROJECT_SOURCE_DIR
}
/src/nvgl/glew/bin
${
PROJECT_SOURCE_DIR
}
/src/nvgl/glew/bin
${
PROJECT_SOURCE_DIR
}
/src/nvgl/glew/lib
${
PROJECT_SOURCE_DIR
}
/src/nvgl/glew/lib
DOC
"The GLEW library"
)
DOC
"The GLEW library"
)
ELSE
(
WIN32
)
ELSE
(
WIN32
)
FIND_PATH
(
GLEW_INCLUDE_PATH GL/glew.h
FIND_PATH
(
GLEW_INCLUDE_PATH GL/glew.h
/usr/include
/usr/include
/usr/local/include
/usr/local/include
/sw/include
/sw/include
/opt/local/include
/opt/local/include
DOC
"The directory where GL/glew.h resides"
)
DOC
"The directory where GL/glew.h resides"
)
FIND_LIBRARY
(
GLEW_LIBRARY
FIND_LIBRARY
(
GLEW_LIBRARY
NAMES GLEW glew
NAMES GLEW glew
PATHS
PATHS
/usr/lib64
/usr/lib64
/usr/lib
/usr/lib
/usr/local/lib64
/usr/local/lib64
/usr/local/lib
/usr/local/lib
/sw/lib
/sw/lib
/opt/local/lib
/opt/local/lib
DOC
"The GLEW library"
)
DOC
"The GLEW library"
)
ENDIF
(
WIN32
)
ENDIF
(
WIN32
)
IF
(
GLEW_INCLUDE_PATH
)
IF
(
GLEW_INCLUDE_PATH
)
SET
(
GLEW_FOUND 1 CACHE STRING
"Set to 1 if GLEW is found, 0 otherwise"
)
SET
(
GLEW_FOUND 1 CACHE STRING
"Set to 1 if GLEW is found, 0 otherwise"
)
ELSE
(
GLEW_INCLUDE_PATH
)
ELSE
(
GLEW_INCLUDE_PATH
)
SET
(
GLEW_FOUND 0 CACHE STRING
"Set to 1 if GLEW is found, 0 otherwise"
)
SET
(
GLEW_FOUND 0 CACHE STRING
"Set to 1 if GLEW is found, 0 otherwise"
)
ENDIF
(
GLEW_INCLUDE_PATH
)
ENDIF
(
GLEW_INCLUDE_PATH
)
MARK_AS_ADVANCED
(
GLEW_FOUND
)
MARK_AS_ADVANCED
(
GLEW_FOUND
)
This diff is collapsed.
Click to expand it.
src/video_core/utils.cpp
+
31
−
31
View file @
71b87898
...
@@ -8,37 +8,37 @@
...
@@ -8,37 +8,37 @@
#include
"video_core/utils.h"
#include
"video_core/utils.h"
namespace
VideoCore
{
namespace
VideoCore
{
/**
/**
* Dumps a texture to TGA
* Dumps a texture to TGA
* @param filename String filename to dump texture to
* @param filename String filename to dump texture to
* @param width Width of texture in pixels
* @param width Width of texture in pixels
* @param height Height of texture in pixels
* @param height Height of texture in pixels
* @param raw_data Raw RGBA8 texture data to dump
* @param raw_data Raw RGBA8 texture data to dump
* @todo This should be moved to some general purpose/common code
* @todo This should be moved to some general purpose/common code
*/
*/
void
DumpTGA
(
std
::
string
filename
,
int
width
,
int
height
,
u8
*
raw_data
)
{
void
DumpTGA
(
std
::
string
filename
,
int
width
,
int
height
,
u8
*
raw_data
)
{
TGAHeader
hdr
;
TGAHeader
hdr
;
FILE
*
fout
;
FILE
*
fout
;
u8
r
,
g
,
b
;
u8
r
,
g
,
b
;
memset
(
&
hdr
,
0
,
sizeof
(
hdr
));
memset
(
&
hdr
,
0
,
sizeof
(
hdr
));
hdr
.
datatypecode
=
2
;
// uncompressed RGB
hdr
.
datatypecode
=
2
;
// uncompressed RGB
hdr
.
bitsperpixel
=
24
;
// 24 bpp
hdr
.
bitsperpixel
=
24
;
// 24 bpp
hdr
.
width
=
width
;
hdr
.
width
=
width
;
hdr
.
height
=
height
;
hdr
.
height
=
height
;
fout
=
fopen
(
filename
.
c_str
(),
"wb"
);
fout
=
fopen
(
filename
.
c_str
(),
"wb"
);
fwrite
(
&
hdr
,
sizeof
(
TGAHeader
),
1
,
fout
);
fwrite
(
&
hdr
,
sizeof
(
TGAHeader
),
1
,
fout
);
for
(
int
i
=
0
;
i
<
height
;
i
++
)
{
for
(
int
i
=
0
;
i
<
height
;
i
++
)
{
for
(
int
j
=
0
;
j
<
width
;
j
++
)
{
for
(
int
j
=
0
;
j
<
width
;
j
++
)
{
b
=
raw_data
[(
3
*
(
i
*
width
))
+
(
3
*
j
)
+
0
];
b
=
raw_data
[(
3
*
(
i
*
width
))
+
(
3
*
j
)
+
0
];
g
=
raw_data
[(
3
*
(
i
*
width
))
+
(
3
*
j
)
+
1
];
g
=
raw_data
[(
3
*
(
i
*
width
))
+
(
3
*
j
)
+
1
];
r
=
raw_data
[(
3
*
(
i
*
width
))
+
(
3
*
j
)
+
2
];
r
=
raw_data
[(
3
*
(
i
*
width
))
+
(
3
*
j
)
+
2
];
putc
(
b
,
fout
);
putc
(
b
,
fout
);
putc
(
g
,
fout
);
putc
(
g
,
fout
);
putc
(
r
,
fout
);
putc
(
r
,
fout
);
}
}
}
fclose
(
fout
);
}
}
fclose
(
fout
);
}
}
// namespace
}
// namespace
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment