Install nginx
sudo apt install nginx
cek firewall
sudo ufw app list
buka port 80
| # Mengimpor kelas-kelas yang diperlukan dari direktori core | |
| from core.base import Base # Kelas dasar untuk aplikasi OpenGL | |
| from core.openGLUtils import OpenGLUtils # Utilitas untuk mengelola program shader | |
| from core.attribute import Attribute # Mengelola data atribut vertex | |
| from core.uniform import Uniform # Mengelola data uniform shader | |
| from OpenGL.GL import * # Mengimpor semua fungsi inti OpenGL | |
| # Mendefinisikan kelas Test yang merupakan turunan dari kelas Base | |
| class Test(Base): | |
| # Metode inisialisasi, dipanggil sekali saat program dimulai |
| # --- Impor Modul --- | |
| from core.base import Base | |
| from core.openGLUtils import OpenGLUtils | |
| from core.attribute import Attribute | |
| from core.uniform import Uniform # Mengimpor kelas Uniform yang sudah dibuat. | |
| from OpenGL.GL import * | |
| class Test(Base): | |
| def initialize(self): | |
| print("Initializing program...") |
| # Mengimpor kelas-kelas yang diperlukan dari direktori 'core' dan library PyOpenGL | |
| from core.base import Base | |
| from core.openGLUtils import OpenGLUtils | |
| from core.attribute import Attribute | |
| from OpenGL.GL import * | |
| # --- Definisi Kelas Utama --- | |
| # Membuat kelas 'Test' yang mewarisi fungsionalitas dari kelas 'Base' (kemungkinan besar untuk membuat window dan menjalankan loop utama) | |
| class Test(Base): | |
| # --- Metode Inisialisasi --- |
| from core.base import Base | |
| from core.openGLUtils import OpenGLUtils | |
| from core.attribute import Attribute | |
| from OpenGL.GL import * | |
| class Test(Base): | |
| def initialize(self): | |
| print("init") | |
| # Vertex Shader | |
| vsCode = """ |
| from core.base import Base | |
| from core.openGLUtils import OpenGLUtils | |
| from core.attribute import Attribute | |
| from OpenGL.GL import * | |
| class Test(Base): | |
| def initialize(self): | |
| print("init...") | |
| # position merujuk dari referensi associateVariable |
| from core.base import Base | |
| from core.openGLUtils import OpenGLUtils | |
| from OpenGL.GL import * | |
| class Test(Base): | |
| def initialize(self): | |
| print("init...") | |
| vsCode = """ | |
| void main() | |
| { |
| import pygame | |
| import sys | |
| from core.input import Input | |
| class Base(object): | |
| def __init__ (self, screenSize=[512,512]): | |
| pygame.init() | |
| displayFlags = pygame.DOUBLEBUF | pygame.OPENGL | |
| pygame.display.gl_set_attribute(pygame.GL_MULTISAMPLEBUFFERS, 1) | |
| pygame.display.gl_set_attribute(pygame.GL_MULTISAMPLESAMPLES, 4) |
Install nginx
sudo apt install nginx
cek firewall
sudo ufw app list
buka port 80
| /* General Body Styles */ | |
| body { | |
| margin: 0; | |
| font-family: | |
| -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", | |
| Arial, sans-serif; | |
| line-height: 1.6; | |
| background-color: #f4f4f4; | |
| color: #333; | |
| display: flex; |