git.haldean.org ana / 0c5441e
start working on data packing Haldean Brown 2 years ago
9 changed file(s) with 12 addition(s) and 11 deletion(s). Raw diff Collapse all Expand all
00 include_rules
11
2 # : src/*.o lib/*.o |> g++ %f -Llib -lglfw3 -lglew32 -o %o |> ana
3 : src/*.o lib/*.o |> !link_exe |> build/ana.exe ^/AppData/
2 : src/*.o lib/*.o |> !link_exe |> build/ana.exe | build/ana.pdb
43 : lib/glfw-3.2.1.bin.WIN64/lib-vc2015/glfw3.dll |> cp %f %o |> build/glfw3.dll
54 : lib/glew-2.1.0/bin/Release/x64/glew32.dll |> cp %f %o |> build/glew32.dll
1010 CCFLAGS += /errorReport:prompt
1111 CCFLAGS += /W3
1212 CCFLAGS += /TP
13 CCFLAGS += /Od
1413 CCFLAGS += /Z7
1514 CCFLAGS += /EHsc
1615 CCFLAGS += /MD
16 CCFLAGS += /WX
1717 CCFLAGS += /I../lib/glew-2.1.0/include
1818 CCFLAGS += /I../lib/glfw-3.2.1.bin.WIN64/include
1919 CCFLAGS += /I../lib/glm
2020 CCFLAGS += /I../lib/imgui
2121 CCFLAGS += /I../lib/imgui/examples
2222
23 LINKFLAGS += /nologo
24 LINKFLAGS += /DEBUG
25 LINKFLAGS += /INCREMENTAL:NO
26 LINKFLAGS += /SUBSYSTEM:CONSOLE
23 LINKFLAGS += /NOLOGO
2724 LINKFLAGS += /WX
2825
2926 LIBRARIES += lib\glew-2.1.0\lib\Release\x64\glew32.lib
3633 # !cxx = |> g++ $(CFLAGS) -c %f -o %o |> %B.o
3734 !cxx = |> cl %f $(CCFLAGS) /Fo%B.o |> %B.o
3835 # !ar = |> ar crs %o %f |>
39 !link_exe = |> link $(LINKFLAGS) %f /OUT:%o $(LIBRARIES) |> %O.ilk ^/AppData/
36 !link_exe = |> link $(LINKFLAGS) %f /OUT:%o $(LIBRARIES) |> %O.ilk
0 XD = ../lib/xd-1.4/xd.exe
1
2 !xd = | $(XD) |> $(XD) -d%O %f %o |>
3
4 : InputMonoNarrow-Regular.ttf |> !xd |> font.c
00 include_rules
11
22 : xd.c |> cl %f /c /Z7 /MD /Fo%o |> %B.o
3 : xd.o |> link %f /OUT:%o |> xd ^/AppData/
3 : xd.o |> link %f /OUT:%o |> xd.exe
9292 GLuint create_shader_from_string(const std::string &src, GLenum type) {
9393 GLuint res = glCreateShader(type);
9494 const GLchar *csrc = src.c_str();
95 GLint len = src.length();
95 GLint len = (GLint) src.length();
9696 glShaderSource(res, 1, &csrc, &len);
9797 glCompileShader(res);
9898
194194 glBindBuffer(GL_ARRAY_BUFFER, node_data_buf); INSERT_GL_ERROR_CHECK;
195195 glVertexAttribPointer(node_data_attr, 4, GL_FLOAT, GL_FALSE, 0, 0); INSERT_GL_ERROR_CHECK;
196196
197 glDrawArrays(GL_POINTS, 0, nodes.size()); INSERT_GL_ERROR_CHECK;
197 glDrawArrays(GL_POINTS, 0, (GLint) nodes.size()); INSERT_GL_ERROR_CHECK;
198198 glDisableVertexAttribArray(node_data_attr); INSERT_GL_ERROR_CHECK;
199199 glBindVertexArray(0);
200200 }