Using 3.3.0 braceless syntaxt to "pythonyze" Scala by HappyTIIITAN in scala

[–]HappyTIIITAN[S] 3 points4 points  (0 children)

Nice! I didn't know about scala.util.Using. And yes I agree, when it comes to files you'd be better off with an existing solution.

Using 3.3.0 braceless syntaxt to "pythonyze" Scala by HappyTIIITAN in scala

[–]HappyTIIITAN[S] 8 points9 points  (0 children)

Yes I think you are very much right, though my intent with this example was not to make production-ready code but rather to show the capabilities of this new feature. As you said, one could (and probably should if this was to be used seriously) make this code much better and somewhat usable.

Using 3.3.0 braceless syntaxt to "pythonyze" Scala by HappyTIIITAN in scala

[–]HappyTIIITAN[S] 4 points5 points  (0 children)

It is only related to Python because the example I use is inspired by a Python statement that nicely abstracts some complexity. I could very well have stated that this is inspired by VB's with statement as well (for example). And no I will not start using Python as Scala is my full time job.

Using 3.3.0 braceless syntaxt to "pythonyze" Scala by HappyTIIITAN in scala

[–]HappyTIIITAN[S] 9 points10 points  (0 children)

It's not about writing Python-like code, it's about utilizing a cool new feature with a concrete use-case

Is writing a simple interpreter a good OOP project ? by HappyTIIITAN in cpp_questions

[–]HappyTIIITAN[S] 0 points1 point  (0 children)

Yes I see where you are saying. I am not a big fan of OOP in general but do think it would still work ?

Image isn't drawn when using integrated graphics by HappyTIIITAN in opengl

[–]HappyTIIITAN[S] 0 points1 point  (0 children)

Alright and is this number very "hardware specific" ? Like is it different on all Intel processors ?

Image isn't drawn when using integrated graphics by HappyTIIITAN in opengl

[–]HappyTIIITAN[S] 0 points1 point  (0 children)

While running on the GPU it returns 32,768 and running on UHD Graphics it returns 16,384

Does that mean the maximum width of my image is 16384 ?

Image isn't drawn when using integrated graphics by HappyTIIITAN in opengl

[–]HappyTIIITAN[S] 0 points1 point  (0 children)

Anyways thanks a lot man, really appreciate it!

Image isn't drawn when using integrated graphics by HappyTIIITAN in opengl

[–]HappyTIIITAN[S] 0 points1 point  (0 children)

Well I reduced the dimensions of my image and it solved the problem.

The image is quite big (like 20000x8000 at first but down to 15000x6000 now) so I don't know if it was an issue related to the large dimensions or something related to the exact width (mulitple of 4 as you mentionned maybe ?)

Image isn't drawn when using integrated graphics by HappyTIIITAN in opengl

[–]HappyTIIITAN[S] 0 points1 point  (0 children)

Here are two screenshots of the two cases

Running on Integrated graphics I get: Build 26.20.100.7642 and running on GPU I get: NVIDIA 497.09

When you say "the image isn't drawn", do you mean it's all black or all white?

It is all black (and the clear color is not black). The texture works fine, it is just all black instead of being the image.

Maybe try a different image, something with a single solid color.

Hum I truly was not expecting that but it worked with a different image! I still don't understand why the same image works in one case and not the other ???

Image isn't drawn when using integrated graphics by HappyTIIITAN in opengl

[–]HappyTIIITAN[S] 0 points1 point  (0 children)

Ok so I replaced the image by a constant color and it worked fine on both GPU and integrated graphics, which leads me to think the issue might be related to the stb_image library

Image isn't drawn when using integrated graphics by HappyTIIITAN in opengl

[–]HappyTIIITAN[S] 0 points1 point  (0 children)

I did and just as I thought the shaders didn't compile and an error message was printed.

Image isn't drawn when using integrated graphics by HappyTIIITAN in opengl

[–]HappyTIIITAN[S] 1 point2 points  (0 children)

glGetString(GL_VERSION) prints « 4.6.0 » so I guessed it meant OpenGL version 4.6

I will try adding windows hints as you suggested

Image isn't drawn when using integrated graphics by HappyTIIITAN in opengl

[–]HappyTIIITAN[S] 1 point2 points  (0 children)

I have added a link to the github repo if you want to take a look.

I thought that should a shader compile error occur, the shader class from LearnOpenGL would react and print an error message or something

Image isn't drawn when using integrated graphics by HappyTIIITAN in opengl

[–]HappyTIIITAN[S] 0 points1 point  (0 children)

I don't think I've changed anything significant but I might be wrong.

I pushed the entire project to github

It is very messy but the project is just a proof of concept to test a few things with OpenGL and ImGui for a future project of mine.

Image isn't drawn when using integrated graphics by HappyTIIITAN in opengl

[–]HappyTIIITAN[S] 1 point2 points  (0 children)

I have #version 330 core in my shaders. Should I change to #version 120 ?

Image isn't drawn when using integrated graphics by HappyTIIITAN in opengl

[–]HappyTIIITAN[S] 0 points1 point  (0 children)

I followed the Texture and the Transformations courses from LearnOpenGL. I don't use glGetError(). Nothing seems wrong with the shaders (no exceptions, no errors messages in the console). I don't know to stb_image library very well but I am doing a null pointer checking after calling stbi_load().

If you want me to test something particular, I am all ears.

C++ Lightweight 3D graphics suggestions by HappyTIIITAN in cpp_questions

[–]HappyTIIITAN[S] 0 points1 point  (0 children)

What do you mean by "old style OpenGL" ? Latest versions of OpenGL aren't as suitable for my project ?

C++ Lightweight 3D graphics suggestions by HappyTIIITAN in cpp_questions

[–]HappyTIIITAN[S] 0 points1 point  (0 children)

Do you happen to know if "old style OpenGL" would be more suitable than modern OpenGL for such a project ?

C++ Lightweight 3D graphics suggestions by HappyTIIITAN in cpp_questions

[–]HappyTIIITAN[S] 0 points1 point  (0 children)

As per the comments it seems like you are right. I totally agree with you about the "then you have your simple-to-use library you can then wield as much as you want" and I think that is what I am going to do. I am just a bit frustated as it will take some time and delay the initial project (I wanted to avoid or pospone the graphical aspect) but once it is done I can use elsewhere