Skip to content

Commit b174440

Browse files
committed
example3: replace old stb_image 1.18 with stb_image 2.30 and stb_image_write 1.16
Pulled from https://github.com/nothings/stb Commit 013ac3beddff3dbffafd5177e7972067cd2b5083
1 parent 12f3fcc commit b174440

3 files changed

Lines changed: 6 additions & 4204 deletions

File tree

example3/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ include_directories(
66
# Defines the source code for the library
77
set(EXAMPLE3_SRCS
88
${CMAKE_CURRENT_SOURCE_DIR}/example3.cpp
9-
${CMAKE_CURRENT_SOURCE_DIR}/stb_image.h
109
)
1110

1211
add_executable(example3 ${EXAMPLE3_SRCS})

example3/example3.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,16 @@
2020
#pragma warning(disable : 4100) // unreferenced formal parameter
2121
#pragma warning(disable : 4127) // conditional expression is constant
2222
#endif
23+
24+
#define STB_IMAGE_IMPLEMENTATION
2325
#include "stb_image.h"
26+
#define STB_IMAGE_WRITE_IMPLEMENTATION
27+
#include "stb_image_write.h"
2428

2529
using namespace crnlib;
2630

31+
typedef unsigned int uint;
32+
2733
const uint cDXTBlockSize = 4;
2834

2935
static int print_usage() {

0 commit comments

Comments
 (0)