This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package gl; | |
import java.nio.FloatBuffer; | |
import java.nio.IntBuffer; | |
import java.util.ArrayList; | |
import org.lwjgl.BufferUtils; | |
import org.lwjgl.opengl.ARBVertexBufferObject; | |
import org.lwjgl.opengl.ContextCapabilities; | |
import org.lwjgl.opengl.GLContext; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package gl; | |
import org.lwjgl.opengl.ARBBufferObject; | |
import org.lwjgl.opengl.GL11; | |
import org.lwjgl.opengl.GL12; | |
public class GeometryBuffer | |
{ | |
private final int indexBuffer; | |
private final int vertexBuffer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package gl; | |
public enum BufferDataFormatType | |
{ | |
VERTICES(3), VERTICES_AND_TEXTURES(5), VERTICES_AND_NORMALS(6), VERTICES_TEXTURES_NORMALS(8); | |
public final int elementsPerVertex; | |
private BufferDataFormatType(int elementSize) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package gl; | |
import java.nio.FloatBuffer; | |
import java.nio.IntBuffer; | |
import org.lwjgl.BufferUtils; | |
public class GeometryBufferGenerator | |
{ | |
public static GeometryBuffer generateGeometryBuffer(BufferDataFormatType dataFormat, float[] vertices, IntBuffer indexes) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package brickLoader; | |
import gl.BufferDataFormatType; | |
import gl.GeometryBuffer; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.IOException; | |
import java.nio.ByteBuffer; | |
import java.nio.IntBuffer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Очищает БД, подготавливая её к новй распаковке | |
* Зависит от трех глобалок $mysqlDatabase, $mysqlPassword, $mysqlUser | |
* @throws \Exception Если не удалось это сделать | |
*/ | |
function clear_database() | |
{ | |
global $maxAttempts; | |
$realClearDatabase = function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Производит обрезку текста, не разрывая слова, так, чтобы он не попадал в длину | |
* если длина равна 1 или 2, а длина слова больше этой длины, то многоточие так же обрезается | |
* @param string $string строка | |
* @param int $length длина строки | |
* @return новая, преобразованная строка | |
*/ | |
function trimText(string $string, int $length) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void testTextureUploadError() | |
{ | |
class RecoverableLogTarget: public sad::log::Target | |
{ | |
public: | |
RecoverableLogTarget() | |
{ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <math.h> | |
#include <cstdio> | |
#include "timerimpl.h" | |
struct Mass; | |
struct Acceleration; | |
struct Time; | |
struct Force | |
{ | |
double m_value; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<meta name="csrf-token" content="{{ csrf_token() }}"> |