[ home / overboard ] [ soy / qa / raid / r ] [ ss / craft ] [ int / pol ] [ a / an / asp / biz / mtv / r9k / tech / v / sude / x ] [ q / news / chive / rules / pass / bans / status ] [ wiki / booru / irc ]

A banner for soyjak.party

/tech/ - Soyence and Technology

Download more RAM for your Mac here
Catalog
Email
Subject
Comment
File
Password (For file deletion.)

File: ClipboardImage.png 📥︎ (10.63 KB, 960x480) ImgOps

 â„–24663[Quote]

Soylib is the most keyed gamedev framework and recently it updated to having 0 dependency libs.

What is soylib? Soylib(raylib) is a game framework where all the stuff just werks. It is not bloated, easy to set up, and easy to get going.

Make game with soylib or something like that.

 â„–24664[Quote]

>>24663 (OP)
even doe using raw opengl is easier

 â„–24665[Quote]

>>24664
raw 'gl requires gazillion lines of code to set up a window. Also soylib provides lots of multimedia features like playing sounds and whatnot

 â„–24666[Quote]

>>24665
bro never watched a tutorial
```
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <iostream>

// Callback function for error handling
void error_callback(int error, const char* description) {
stdcerr << "Error: " << description << stdendl;
}

// Function to display the scene
void display() {
glClear(GL_COLOR_BUFFER_BIT); // Clear the color buffer
glBegin(GL_TRIANGLES); // Draw a triangle
glColor3f(1.0f, 0.0f, 0.0f); // Red
glVertex2f(0.0f, 1.0f); // Top vertex
glColor3f(0.0f, 1.0f, 0.0f); // Green
glVertex2f(-1.0f, -1.0f); // Bottom left vertex
glColor3f(0.0f, 0.0f, 1.0f); // Blue
glVertex2f(1.0f, -1.0f); // Bottom right vertex
glEnd();
}

int main() {
glfwSetErrorCallback(error_callback); // Set error callback

if (!glfwInit()) return -1; // Initialize GLFW

GLFWwindow* window = glfwCreateWindow(800, 600, "OpenGL with GLFW", nullptr, nullptr); // Create window
if (!window) {
glfwTerminate(); // Terminate if window creation failed
return -1;
}

glfwMakeContextCurrent(window); // Make the window's context current
if (glewInit() != GLEW_OK) {
error_callback(0, "glewInit");
}

stdcout << glGetString(GL_VERSION) << stdendl;

float positions[] {
-0.5f, -0.5f,
0.0f, 0.5f,
0.5f, -0.5f,
};

unsigned int buffer;
glGenBuffers(1, &buffer);
glBindBuffer(GL_ARRAY_BUFFER, buffer);
glBufferData(GL_ARRAY_BUFFER, 6 * sizeof(float), positions, GL_STATIC_DRAW);

glEnableVertexAttribArray(0);
glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 2 * sizeof(float), 0);


while (!glfwWindowShouldClose(window)) {
// display(); // Render the scene

glClear(GL_COLOR_BUFFER_BIT);

glDrawArrays(GL_TRIANGLES, 0, 3); // without index buffer
// glDrawElements(GL_TRIANGLES, 3, ) // with index buffer

glfwSwapBuffers(window); // Swap front and back buffers
glfwPollEvents(); // Poll for and process events
}

glfwDestroyWindow(window); // Destroy window
glfwTerminate(); // Terminate GLFW
return 0;
}
```

 â„–24668[Quote]

>>24666
>it's not a gazillion of lines bro!!
>proceeds to write a gazillion lines to draw a triangle

 â„–24671[Quote]

>>24668
its just boilerplate. copy paste and forget

 â„–25085[Quote]

I don't like Raylib because C sucks

>>24666
>using #includes instead of imports
>using iostreams instead of print/println
>not using C++ wrapper libraries
>using T[] instead of Array<T>
ngmi

 â„–25109[Quote]

>>25085
ev&oe functional programming is superior and aryan as opposed to OOP

 â„–25112[Quote]

>>25109
c isn't a functional programming language lil bro

 â„–25113[Quote]

File: ClipboardImage.png 📥︎ (22.71 KB, 399x398) ImgOps


 â„–25114[Quote]

>>25113
Kys javacuck

 â„–25115[Quote]

Uh actually using a rust library mogs because rust is actually the bestest language and all ctroons fucking lost

 â„–25116[Quote]

File: trans_ferris.jpg 📥︎ (64.72 KB, 975x975) ImgOps

>Uh actually using a rust library mogs because rust is actually the bestest language and all ctroons fucking lost

 â„–25118[Quote]

File: fact.PNG 📥︎ (40.18 KB, 341x498) ImgOps

>>25109
OOP is aryan and seething about it makes you an ecelebcuck who has zero original thought and derives all opinions from what other sloptubers tell you

>>25113
this is literally java, not c
c still sucks btw

>>25116
>saaar rust is the troon language ignore the fact that c is literally the most tranny language because you can unsafely cast any data to any type just like how trannies cast themselves to women by cutting off xheir cocks

 â„–25119[Quote]

File: image.jpg 📥︎ (808.4 KB, 2048x1554) ImgOps

>>25114
java is aryan thoughbeit

 â„–25122[Quote]

File: ClipboardImage.png 📥︎ (9.93 KB, 501x90) ImgOps

>>25118
rust is the tranny language because trannies use it.

 â„–25141[Quote]

>>25122
Every language has trannies nigger

 â„–25157[Quote]

>>25141
NIGGER its made by trannies for trannies

 â„–25158[Quote]

File: ClipboardImage.png 📥︎ (286.55 KB, 795x711) ImgOps

>>25157
Your mother is a tranny made by trannies for trannies

 â„–25162[Quote]

File: ClipboardImage.png 📥︎ (510.62 KB, 1019x546) ImgOps

>Man* you = (Man*)malloc(sizeof(struct TrannyRetard));
>Woman* troon = (Woman*)you;
>printf("my name is %s and i say trans rights are hum-ACK!!!!!!", you.name);

 â„–25166[Quote]

File: 14676543456789.png 📥︎ (535.3 KB, 631x905) ImgOps

>>>25157 (You)
>Your mother is a tranny made by trannies for trannies

 â„–25170[Quote]

File: ClipboardImage.png 📥︎ (267.09 KB, 471x476) ImgOps

>>>>25157 (You)
>>Your mother is a tranny made by trannies for trannies

 â„–25173[Quote]

File: w2t5.png 📥︎ (626.41 KB, 816x750) ImgOps

>>>>>25157 (You)
>>>Your mother is a tranny made by trannies for trannies

 â„–25177[Quote]

File: ClipboardImage.png 📥︎ (197.87 KB, 294x360) ImgOps

>>>>>>25157 (You)
>>>>Your mother is a tranny made by trannies for trannies

 â„–25184[Quote]

File: 568899887.png 📥︎ (17.57 KB, 600x800) ImgOps

>>>>>>>25157 (You)
>>>>>Your mother is a tranny made by trannies for trannies

 â„–25185[Quote]

File: ClipboardImage.png 📥︎ (1.23 MB, 1179x1075) ImgOps

>>>>>>>>25157 (You)
>>>>>>Your mother is a tranny made by trannies for trannies

 â„–25187[Quote]

File: 9363688.png 📥︎ (41.51 KB, 768x719) ImgOps

>>>>>>>>>25157 (You)
>>>>>>>Your mother is a tranny made by trannies for trannies

 â„–25190[Quote]

File: ClipboardImage.png 📥︎ (3.74 MB, 2014x2320) ImgOps

>>>>>>>>>>25157 (You)
>>>>>>>>Your mother is a tranny made by trannies for trannies

 â„–25200[Quote]

>>25118
C is like alchemy. fuck up like a tranny whom it thinks that it can change or morph but cant because even if you can mold reality, reality will keep order else it will crash like a shitskin.

 â„–25202[Quote]

>>25200
>>25162
Ever heard of move assignment overloads

 â„–25207[Quote]

File: 8323456.png 📥︎ (333.69 KB, 785x1000) ImgOps

>>>>>>>>>>>25157 (You)
>>>>>>>>>Your mother is a tranny made by trannies for trannies

 â„–25218[Quote]

File: ClipboardImage.png 📥︎ (989.46 KB, 674x1024) ImgOps

>>>>>>>>>>>>25157 (You)
>>>>>>>>>>Your mother is a tranny made by trannies for trannies

 â„–25219[Quote]

File: 1712952291378r.jpg 📥︎ (11.82 KB, 255x255) ImgOps

>>>>>>>>>>>>>25157 (You)
>>>>>>>>>>>Your mother is a tranny made by trannies for trannies

 â„–25238[Quote]

File: ClipboardImage.png 📥︎ (98.34 KB, 766x932) ImgOps

>>>>>>>>>>>>>>25157 (You)
>>>>>>>>>>>>Your mother is a tranny made by trannies for trannies

 â„–25243[Quote]

File: ret45678.png 📥︎ (42.41 KB, 564x699) ImgOps

>>>>>>>>>>>>>>>25157 (You)
>>>>>>>>>>>>>Your mother is a tranny made by trannies for trannies

 â„–25246[Quote]

File: ClipboardImage.png 📥︎ (371.39 KB, 620x720) ImgOps

>>>>>>>>>>>>>>>>25157 (You)
>>>>>>>>>>>>>>Your mother is a tranny made by trannies for trannies

 â„–25257[Quote]

File: 1704647263316.gif 📥︎ (546.96 KB, 220x252) ImgOps

>>>>>>>>>>>>>>>>>25157 (You)
>>>>>>>>>>>>>>>Your mother is a tranny made by trannies for trannies

 â„–25262[Quote]

File: ClipboardImage.png 📥︎ (952.06 KB, 1024x889) ImgOps

>>>>>>>>>>>>>>>>>>25157 (You)
>>>>>>>>>>>>>>>>Your mother is a tranny made by trannies for trannies

 â„–25303[Quote]

File: 1703318275579.png 📥︎ (391.17 KB, 720x480) ImgOps

>>>>>>>>>>>>>>>>>>>25157 (You)
>>>>>>>>>>>>>>>>>Your mother is a tranny made by trannies for trannies

 â„–25305[Quote]

yooooo

 â„–25306[Quote]

File: (You).gif 📥︎ (33.15 KB, 463x489) ImgOps

>>25305
>yooooo

 â„–25307[Quote]

gem

 â„–25309[Quote]

>>25202
Not possible in C, retard

 â„–25310[Quote]

>>25109
you can write OOP in C. most games that use C are OOP. it's just structs with function pointers instead of classes. people who argue about C vs C++ are retarded.

 â„–25311[Quote]

>>25310
This is retarded.

 â„–25313[Quote]

>>25311
it depends on how many layers of inheritance there are. once you get to the 3rd layer or so it starts to look very ugly. quake 3 was written in C, and it used switch statements for a lot of things. instead of individual weapons being structs based on a base weapons struct, there is one weapons source file with a struct for all the weapons variables and functions, and then those functions have switch statements that determine what kind of weapon is being used. even still, there are a lot of instances in the code where it looks ugly like nigger->sigma.coal->ohio. you can avoid that by using #defines THOUGH and then it's basically like c++

 â„–25314[Quote]

>>25313
you could use #define vril nigger->aryan->hyperborea->vril so that you can access the vril directly and then it'll look like c++

 â„–25315[Quote]

File: ClipboardImage.png 📥︎ (321.31 KB, 596x456) ImgOps

>>>>>>>>>>>>>>>>>>>>25157 (You)
>>>>>>>>>>>>>>>>>>Your mother is a tranny made by trannies for trannies

 â„–25336[Quote]

>>25310
He is right, just look at the popular mainstream GUI libraries written in c. They implement their own OOP system.

 â„–25356[Quote]

>>25310
evendoe function pointers take up more space then the compiler figuring out which function you want unless its virtual functions



[Return][Catalog][Go to top][Post a Reply]
Delete Post [ ]
[ home / overboard ] [ soy / qa / raid / r ] [ ss / craft ] [ int / pol ] [ a / an / asp / biz / mtv / r9k / tech / v / sude / x ] [ q / news / chive / rules / pass / bans / status ] [ wiki / booru / irc ]