MCPcopy Create free account
hub / github.com/PacktPublishing/3D-Graphics-Rendering-Cookbook / printShaderSource

Function printShaderSource

shared/Utils.cpp:11–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9#include "Utils.h"
10
11void printShaderSource(const char* text)
12{
13 int line = 1;
14
15 printf("\n(%3i) ", line);
16
17 while (text && *text++)
18 {
19 if (*text == '\n')
20 {
21 printf("\n(%3i) ", ++line);
22 }
23 else if (*text == '\r')
24 {
25 }
26 else
27 {
28 printf("%c", *text);
29 }
30 }
31
32 printf("\n");
33}
34
35int endsWith(const char* s, const char* part)
36{

Callers 2

compileShaderFunction · 0.85
GLShaderMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected