Search found 10 matches

by BillBoard_67
Fri Mar 08, 2024 3:30 pm
Forum: Coding Questions
Topic: PixelFormat in ScreenOutput() : Bug or Code error ?!
Replies: 0
Views: 329

PixelFormat in ScreenOutput() : Bug or Code error ?!

Hi Everyone,

I'm curious to know why the DrawingBufferPixelFormat is always at 3 octets in my code when drawing on a screen even if ScreenDepth is 32 :

Is it a bug or an error in my code (code reduced for testing) ?


width_screen = 1000
height_screen = 1000
InitSprite()
InitKeyboard ...
by BillBoard_67
Tue Mar 05, 2024 11:24 pm
Forum: Coding Questions
Topic: Shaders / 2D
Replies: 1
Views: 377

Shaders / 2D

Hi Everyone,

My question is about applying shaders to sprites in a Screen (in a simple 2D context).

Let's say we have a layer where a series of sprites are supposed to be displayed (in a windowscreen ) and to which we would like to apply a shader. then a 2nd layer of new sprites where another ...
by BillBoard_67
Fri Mar 01, 2024 12:28 pm
Forum: Tricks 'n' Tips
Topic: Fast noise generation module
Replies: 7
Views: 1672

Re: Fast noise generation module

Hi everyone,

@pf Shadoko : To complete Fred's answer, here is the shader code (in GLSL)


#version 330

layout (location = 0) in vec2 pos;

void main() {
gl_Position = vec4(pos, 0.0f, 1);
}

#version 330

uniform vec2 uResolution;
uniform float uTime;
uniform int uNoiseMethod;
uniform int ...
by BillBoard_67
Fri Feb 23, 2024 10:41 am
Forum: Tricks 'n' Tips
Topic: Fast noise generation module
Replies: 7
Views: 1672

Re: Fast noise generation module

Hello pjay,

Thanks a lot for this nice piece of code.

I haven't tested it yet. I'm still studying your code line by line and i think that the solution to my initial problem is in your procedures get_image and get_array with the use of glReadBuffer_, glPixelStorei_ and glReadPixels_. Very smart ...
by BillBoard_67
Thu Feb 22, 2024 6:30 pm
Forum: Coding Questions
Topic: OpenGL dot / cross Functions
Replies: 10
Views: 2331

Re: OpenGL dot / cross Functions

Thanks pjay for your post !!

I put a link here to your post for other users : https://www.purebasic.fr/english/viewtopic.php?t=83634

I'm going there now to see what it looks like . I'm curious to see how you did:)
by BillBoard_67
Thu Feb 22, 2024 8:40 am
Forum: Coding Questions
Topic: OpenGL dot / cross Functions
Replies: 10
Views: 2331

Re: OpenGL dot / cross Functions

Hi Olli and Pjay,

I've made some tests with glGenBuffers() function , and PB sens back an error message "glGenBuffers_() is not a function, map pr list ...."

Do you have some code to study to understand what you mean when you say "you specify the buffers address got in the shader program"

pjay ...
by BillBoard_67
Wed Feb 21, 2024 11:01 pm
Forum: Coding Questions
Topic: AI output coding for purebasic
Replies: 11
Views: 2515

Re: AI output coding for purebasic

Hi,

I think it's ChatGPT 0.0.1 :)
by BillBoard_67
Wed Feb 21, 2024 10:29 pm
Forum: Coding Questions
Topic: OpenGL dot / cross Functions
Replies: 10
Views: 2331

Re: OpenGL dot / cross Functions

Hi Olli,

Thanks for your answer.

You mean that i should send an array of data to the Vertex Buffer, which will do the calculcations ? How can i access the data after calculations ? Any idea ?

Moreover, to use VBO, i'll need to use some OpenGL functions such glGenBuffers..... which are not ...
by BillBoard_67
Wed Feb 21, 2024 1:08 pm
Forum: Coding Questions
Topic: OpenGL dot / cross Functions
Replies: 10
Views: 2331

Re: OpenGL dot / cross Functions

Hi,

Thanks Luis And Daniel for your answers.

You're right. dot and cross are parts of the GLSL (not the openGL strictly ) .

My objective is to generate Perlin Noise for Procedural Map generation. With a CPU based algorithm, the performance is very limited when it comes to arrays of 1000 x 1000 ...
by BillBoard_67
Wed Feb 21, 2024 10:08 am
Forum: Coding Questions
Topic: OpenGL dot / cross Functions
Replies: 10
Views: 2331

OpenGL dot / cross Functions

Hi Everyone,

I'm new on this forum and it's my first post !

In the PB Doc, it's mentionned that native OpenGL functions are supported in PB by adding a simple underscore (glbegin_ , gelEnd_ ....)

The dot and Cross fonctions are not recognized. Is it normal ? Is there any limitations around the ...